From bf9165315641b0eff43a242f92bc43c28a6a715d Mon Sep 17 00:00:00 2001 From: andrex47 Date: Thu, 28 Aug 2025 17:22:37 -0300 Subject: [PATCH 1/5] Update composer.json --- composer.json | 27 ++++++--------------------- 1 file changed, 6 insertions(+), 21 deletions(-) diff --git a/composer.json b/composer.json index 9014b9e..1e8fa97 100644 --- a/composer.json +++ b/composer.json @@ -1,6 +1,6 @@ { "name": "uepg/laravel-sybase", - "description": "Sybase based Eloquent module extension for Laravel 10.x", + "description": "Sybase based Eloquent module extension for Laravel 5.x.", "keywords": [ "sybase" ], @@ -13,10 +13,6 @@ { "name": "Ademir Mazer Junior", "email": "ademir.mazer.jr@gmail.com" - }, - { - "name": "Matheus Bueno Bartkevicius", - "email": "matheusbartkev@gmail.com" } ], "support": { @@ -24,15 +20,10 @@ "wiki": "https://github.com/uepg/laravel-sybase/wiki" }, "require": { - "php": ">=8.1", - "doctrine/dbal": "^3.5.1", - "illuminate/database": ">=8.0", - "illuminate/support": ">=8.0", - "ext-pdo": "*" - }, - "require-dev": { - "orchestra/testbench": "^8.5", - "nunomaduro/collision": "^7.4" + "php": "^5.6.4 || ^7.0 || ^8.0", + "doctrine/dbal": "^2.5 || ^3.5.1", + "illuminate/database": "5.4.*|5.5.*|5.6.*|5.7.*|5.8.*|6.*|7.*|8.*|9.*", + "illuminate/support": "5.4.*|5.5.*|5.6.*|5.7.*|5.8.*|6.*|7.*|8.*|9.*" }, "extra": { "laravel": { @@ -46,13 +37,7 @@ }, "autoload": { "psr-4": { - "Uepg\\LaravelSybase\\": "src/", - "Tests\\": "tests/" + "Uepg\\LaravelSybase\\": "src/" } - }, - "scripts": { - "post-autoload-dump": [ - "@php vendor/bin/testbench package:discover --ansi" - ] } } From 3f8ca4e0fa60a4965d0f43b03c2d2484170a9a1a Mon Sep 17 00:00:00 2001 From: andrex47 Date: Thu, 28 Aug 2025 17:48:40 -0300 Subject: [PATCH 2/5] Update composer.json --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 1e8fa97..e77e11f 100644 --- a/composer.json +++ b/composer.json @@ -21,7 +21,7 @@ }, "require": { "php": "^5.6.4 || ^7.0 || ^8.0", - "doctrine/dbal": "^2.5 || ^3.5.1", + "doctrine/dbal": "^2.5", "illuminate/database": "5.4.*|5.5.*|5.6.*|5.7.*|5.8.*|6.*|7.*|8.*|9.*", "illuminate/support": "5.4.*|5.5.*|5.6.*|5.7.*|5.8.*|6.*|7.*|8.*|9.*" }, From 7099bb9e548a2cfe8cd693f5562e2a9642b436ff Mon Sep 17 00:00:00 2001 From: andrex47 Date: Fri, 29 Aug 2025 09:44:57 -0300 Subject: [PATCH 3/5] Update Connection.php --- src/Database/Connection.php | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/src/Database/Connection.php b/src/Database/Connection.php index 5ffad92..76b3ee9 100644 --- a/src/Database/Connection.php +++ b/src/Database/Connection.php @@ -376,11 +376,22 @@ private function compileNewQuery($query, $bindings) $bindings = $this->compileBindings($query, $bindings); $partQuery = explode('?', $query); - $bindings = array_map(fn ($v) => gettype($v) === 'string' ? str_replace('\'', '\'\'', $v) : $v, $bindings); - $bindings = array_map(fn ($v) => gettype($v) === 'string' ? "'{$v}'" : $v, $bindings); - $bindings = array_map(fn ($v) => gettype($v) === 'NULL' ? 'NULL' : $v, $bindings); + $bindings = array_map(function ($v) { + return gettype($v) === 'string' ? str_replace('\'', '\'\'', $v) : $v; + }, $bindings); + + $bindings = array_map(function ($v) { + return gettype($v) === 'string' ? "'{$v}'" : $v; + }, $bindings); + + $bindings = array_map(function ($v) { + return gettype($v) === 'NULL' ? 'NULL' : $v; + }, $bindings); + + $newQuery = join(array_map(function ($k1, $k2) { + return $k1.$k2; + }, $partQuery, $bindings)); - $newQuery = join(array_map(fn ($k1, $k2) => $k1.$k2, $partQuery, $bindings)); $newQuery = str_replace('[]', '', $newQuery); $application_encoding = $this->applicationEncoding; if (is_null($application_encoding) || $application_encoding == false) { @@ -427,7 +438,7 @@ public function select($query, $bindings = [], $useReadPdo = true) $result += $statement->fetchAll($this->getFetchMode()); } while ($statement->nextRowset()); - $result = [...$result]; + $result = array_merge([], $result); $application_encoding = $this->applicationEncoding; if (is_null($application_encoding) || $application_encoding == false) { From e195d0905711f6cc73629f1707aad3b7fd102eba Mon Sep 17 00:00:00 2001 From: andrehanke Date: Tue, 28 Oct 2025 10:01:28 -0300 Subject: [PATCH 4/5] fix: typo in database charset property --- src/Database/Connection.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Database/Connection.php b/src/Database/Connection.php index 58dd798..39db514 100644 --- a/src/Database/Connection.php +++ b/src/Database/Connection.php @@ -83,7 +83,7 @@ public function configureExtraSettings($config = []) throw new \Exception('When application encoding is configured, you need to set up application_charset and database_charset'); } $this->applicationCharset = $config['application_charset']; - $this->databaseCharset = $config['charset']; + $this->databaseCharset = $config['database_charset']; } } From bd7a4847a876d9a541fcc393804bf64a044bb785 Mon Sep 17 00:00:00 2001 From: andrehanke Date: Tue, 28 Oct 2025 10:16:44 -0300 Subject: [PATCH 5/5] fix: acertado arquivo de dependencias --- composer.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/composer.json b/composer.json index e77e11f..67115de 100644 --- a/composer.json +++ b/composer.json @@ -20,10 +20,10 @@ "wiki": "https://github.com/uepg/laravel-sybase/wiki" }, "require": { - "php": "^5.6.4 || ^7.0 || ^8.0", + "php": ">=5.5.9 <7.4", "doctrine/dbal": "^2.5", - "illuminate/database": "5.4.*|5.5.*|5.6.*|5.7.*|5.8.*|6.*|7.*|8.*|9.*", - "illuminate/support": "5.4.*|5.5.*|5.6.*|5.7.*|5.8.*|6.*|7.*|8.*|9.*" + "illuminate/database": "5.1.*|5.2.*|5.3.*|5.4.*|5.5.*|5.6.*|5.7.*|5.8.*|6.*|7.*", + "illuminate/support": "5.1.*|5.2.*|5.3.*|5.4.*|5.5.*|5.6.*|5.7.*|5.8.*|6.*|7.*" }, "extra": { "laravel": {