From 93bec92a2dd9e207d1ee23eea8703a94586ee2c1 Mon Sep 17 00:00:00 2001 From: schengawegga Date: Tue, 13 May 2025 08:47:15 +0200 Subject: [PATCH 01/51] Add github ci --- .github/workflows/ci.yml | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..820339c --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,32 @@ +--- +name: CI + +on: + push: + branches: + - trunk + pull_request: + branches: + - trunk + +jobs: + test: + runs-on: ubuntu-latest + strategy: + matrix: + php-version: ['5.0', '5.1', '5.2', '5.3', '5.4', '5.5', '5.6', '7.0', '7.1', '7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3', '8.4'] + + steps: + - uses: actions/checkout@v4 + - name: Set up PHP ${{ matrix.php-version }} + uses: shivammathur/setup-php@v2 + with: + php-version: ${{ matrix.php-version }} + ini-values: include_path=.:/usr/share/php:pear/usr/share/php + - name: Set up MySQL + run: | + sudo systemctl start mysql.service + mysql -e 'CREATE DATABASE pear_db;' -uroot -p + - name: Run tests + run: | + pear run-tests -d tests/ \ No newline at end of file From 8f4a4f4def14e4889b0ad36986296f6d362ce3ea Mon Sep 17 00:00:00 2001 From: schengawegga Date: Tue, 13 May 2025 09:03:35 +0200 Subject: [PATCH 02/51] New mysqli method multiquery --- .github/workflows/ci.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 820339c..513440e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -14,7 +14,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - php-version: ['5.0', '5.1', '5.2', '5.3', '5.4', '5.5', '5.6', '7.0', '7.1', '7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3', '8.4'] + php-version: ['5.6', '7.0', '7.1', '7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3', '8.4', '8.5'] steps: - uses: actions/checkout@v4 @@ -23,10 +23,11 @@ jobs: with: php-version: ${{ matrix.php-version }} ini-values: include_path=.:/usr/share/php:pear/usr/share/php + tools: none - name: Set up MySQL run: | sudo systemctl start mysql.service - mysql -e 'CREATE DATABASE pear_db;' -uroot -p + mysql -e 'CREATE DATABASE pear_db;' -uroot -proot - name: Run tests run: | pear run-tests -d tests/ \ No newline at end of file From 2c7e4cc9f57b887dc7f28fa1a7548ad384c4c4b7 Mon Sep 17 00:00:00 2001 From: schengawegga Date: Tue, 13 May 2025 09:07:09 +0200 Subject: [PATCH 03/51] New mysqli method multiquery --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 513440e..f11d8d8 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -14,7 +14,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - php-version: ['5.6', '7.0', '7.1', '7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3', '8.4', '8.5'] + php-version: ['5.6', '7.0', '7.1', '7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3'] steps: - uses: actions/checkout@v4 From ce5de2f904bcf2ec024699ba775edd728f2fe6b7 Mon Sep 17 00:00:00 2001 From: schengawegga Date: Tue, 13 May 2025 09:10:46 +0200 Subject: [PATCH 04/51] New mysqli method multiquery --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f11d8d8..06f31fb 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -14,7 +14,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - php-version: ['5.6', '7.0', '7.1', '7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3'] + php-version: ['5.3', '5.4', '5.5', '5.6', '7.0', '7.1', '7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3'] steps: - uses: actions/checkout@v4 From c2e538a31e250a203cf26748d357d0cc9de5d268 Mon Sep 17 00:00:00 2001 From: schengawegga Date: Tue, 13 May 2025 09:15:31 +0200 Subject: [PATCH 05/51] New mysqli method multiquery --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 06f31fb..78d1f93 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -14,7 +14,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - php-version: ['5.3', '5.4', '5.5', '5.6', '7.0', '7.1', '7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3'] + php-version: ['5.4', '5.5', '5.6', '7.0', '7.1', '7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3'] steps: - uses: actions/checkout@v4 From b9e6127d82de29a656c22c138838a904d75d03bd Mon Sep 17 00:00:00 2001 From: schengawegga Date: Tue, 13 May 2025 09:19:11 +0200 Subject: [PATCH 06/51] New mysqli method multiquery --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 78d1f93..4716e2f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -30,4 +30,4 @@ jobs: mysql -e 'CREATE DATABASE pear_db;' -uroot -proot - name: Run tests run: | - pear run-tests -d tests/ \ No newline at end of file + pear run-tests -r tests/ \ No newline at end of file From d2513e247df31fc123a75e05ad30ac9b34c0ac0e Mon Sep 17 00:00:00 2001 From: schengawegga Date: Tue, 13 May 2025 09:25:40 +0200 Subject: [PATCH 07/51] New mysqli method multiquery --- tests/driver/setup.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/driver/setup.inc b/tests/driver/setup.inc index 649ce88..42dc02e 100644 --- a/tests/driver/setup.inc +++ b/tests/driver/setup.inc @@ -106,7 +106,7 @@ $dsns = array( // 'sybase' => 'sybase://sa@somehost/pubs', // 'mysql' => 'mysql://root@localhost/test', - // 'mysqli' => 'mysqli://root@localhost/test', // $_ENV overrides if set. + 'mysqli' => 'mysqli://root@localhost/pear_db', // $_ENV overrides if set. // 'oci8' => 'oci8://system:manager@', // 'access' => 'odbc(access)://admin@/SystemDsnName', // 'db2' => 'odbc(db2)://db2inst1:XXXX@/SAMPLE', From 271bf70a4491364bf73af56db4040bf9bc6489d2 Mon Sep 17 00:00:00 2001 From: schengawegga Date: Tue, 13 May 2025 09:34:54 +0200 Subject: [PATCH 08/51] New mysqli method multiquery --- .github/workflows/ci.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4716e2f..a61c21c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -28,6 +28,12 @@ jobs: run: | sudo systemctl start mysql.service mysql -e 'CREATE DATABASE pear_db;' -uroot -proot + - name: Set env + run: | + echo "MYSQL_TEST_USER=root" >> $GITHUB_ENV + echo "MYSQL_TEST_PASSWD=root" >> $GITHUB_ENV + echo "MYSQL_TEST_DB=pear_db" >> $GITHUB_ENV + echo "MYSQL_TEST_HOST=127.0.0.1" >> $GITHUB_ENV - name: Run tests run: | pear run-tests -r tests/ \ No newline at end of file From c9485191a081edc79206d6e3dbcb20bc137d03e7 Mon Sep 17 00:00:00 2001 From: schengawegga Date: Tue, 13 May 2025 09:41:40 +0200 Subject: [PATCH 09/51] New mysqli method multiquery --- .github/workflows/ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a61c21c..390b67b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -11,6 +11,7 @@ on: jobs: test: + continue-on-error: true runs-on: ubuntu-latest strategy: matrix: From 0e0fb8a00380649d853d70a2f5dca69917ebb6fb Mon Sep 17 00:00:00 2001 From: schengawegga Date: Tue, 13 May 2025 09:48:04 +0200 Subject: [PATCH 10/51] New mysqli method multiquery --- .github/workflows/ci.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 390b67b..fa748b0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -37,4 +37,5 @@ jobs: echo "MYSQL_TEST_HOST=127.0.0.1" >> $GITHUB_ENV - name: Run tests run: | - pear run-tests -r tests/ \ No newline at end of file + pear run-tests -r tests/ + for i in `find tests/ -name '*.out'`; do echo "$i"; cat "$i"; done \ No newline at end of file From d36fcaf5af5df5ad06dc2c7250795a493f1fd7fb Mon Sep 17 00:00:00 2001 From: schengawegga Date: Tue, 13 May 2025 09:53:48 +0200 Subject: [PATCH 11/51] New mysqli method multiquery --- tests/driver/10errormap.phpt | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/driver/10errormap.phpt b/tests/driver/10errormap.phpt index a6893d3..5246d24 100644 --- a/tests/driver/10errormap.phpt +++ b/tests/driver/10errormap.phpt @@ -4,6 +4,7 @@ DB_driver::error mapping --FILE-- From b676769c03675adaa31c11327c4f2f7d9dc82d9b Mon Sep 17 00:00:00 2001 From: schengawegga Date: Tue, 13 May 2025 09:55:33 +0200 Subject: [PATCH 12/51] New mysqli method multiquery --- .github/workflows/ci.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index fa748b0..4ae4bc3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -38,4 +38,6 @@ jobs: - name: Run tests run: | pear run-tests -r tests/ + - name: Display results + run: | for i in `find tests/ -name '*.out'`; do echo "$i"; cat "$i"; done \ No newline at end of file From d3911600e53e448b8259c10418329b577f2d3724 Mon Sep 17 00:00:00 2001 From: schengawegga Date: Tue, 13 May 2025 09:58:27 +0200 Subject: [PATCH 13/51] New mysqli method multiquery --- .github/workflows/ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4ae4bc3..1cca5fa 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -36,6 +36,7 @@ jobs: echo "MYSQL_TEST_DB=pear_db" >> $GITHUB_ENV echo "MYSQL_TEST_HOST=127.0.0.1" >> $GITHUB_ENV - name: Run tests + continue-on-error: true run: | pear run-tests -r tests/ - name: Display results From 35fb7bfa49601a5ecb6d40adf1f6c9a68052b794 Mon Sep 17 00:00:00 2001 From: schengawegga Date: Tue, 13 May 2025 10:04:00 +0200 Subject: [PATCH 14/51] New mysqli method multiquery --- .github/workflows/ci.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1cca5fa..649d468 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -36,9 +36,9 @@ jobs: echo "MYSQL_TEST_DB=pear_db" >> $GITHUB_ENV echo "MYSQL_TEST_HOST=127.0.0.1" >> $GITHUB_ENV - name: Run tests - continue-on-error: true - run: | - pear run-tests -r tests/ - - name: Display results - run: | - for i in `find tests/ -name '*.out'`; do echo "$i"; cat "$i"; done \ No newline at end of file + uses: gacts/run-and-post-run@v1 + with: + run: | + pear run-tests -r tests/ + post: | + for i in `find tests/ -name '*.out'`; do echo "$i"; cat "$i"; done \ No newline at end of file From a63b0432f33d32d09ed72ff05911adf04bc0038d Mon Sep 17 00:00:00 2001 From: schengawegga Date: Tue, 13 May 2025 10:11:26 +0200 Subject: [PATCH 15/51] New mysqli method multiquery --- tests/driver/10errormap.phpt | 1 - 1 file changed, 1 deletion(-) diff --git a/tests/driver/10errormap.phpt b/tests/driver/10errormap.phpt index 5246d24..a6893d3 100644 --- a/tests/driver/10errormap.phpt +++ b/tests/driver/10errormap.phpt @@ -4,7 +4,6 @@ DB_driver::error mapping --FILE-- From 0ffad39881917ee8a7df9c9a67c8b045ac6739e5 Mon Sep 17 00:00:00 2001 From: schengawegga Date: Tue, 13 May 2025 10:14:50 +0200 Subject: [PATCH 16/51] New mysqli method multiquery --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 649d468..a4d5538 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -15,7 +15,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - php-version: ['5.4', '5.5', '5.6', '7.0', '7.1', '7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3'] + php-version: ['5.4', '5.5', '5.6', '7.0', '7.1', '7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3', '8.4', '8.5'] steps: - uses: actions/checkout@v4 From 4059f3b6c596fa22c33abc3770bb55045a6b13e0 Mon Sep 17 00:00:00 2001 From: schengawegga Date: Tue, 13 May 2025 10:31:19 +0200 Subject: [PATCH 17/51] New mysqli method multiquery --- .github/workflows/ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a4d5538..14706b0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -29,6 +29,7 @@ jobs: run: | sudo systemctl start mysql.service mysql -e 'CREATE DATABASE pear_db;' -uroot -proot + mysql -v - name: Set env run: | echo "MYSQL_TEST_USER=root" >> $GITHUB_ENV From b2a771a7478e528f3500f32216a4a22d5e320081 Mon Sep 17 00:00:00 2001 From: schengawegga Date: Tue, 13 May 2025 10:34:29 +0200 Subject: [PATCH 18/51] New mysqli method multiquery --- .github/workflows/ci.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 14706b0..e3bd1e2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -29,7 +29,9 @@ jobs: run: | sudo systemctl start mysql.service mysql -e 'CREATE DATABASE pear_db;' -uroot -proot - mysql -v + - name: Get MySQL Version + run: | + mysqld --version - name: Set env run: | echo "MYSQL_TEST_USER=root" >> $GITHUB_ENV From 9b50514cdab136ed9610d26b2d3567c67fe92126 Mon Sep 17 00:00:00 2001 From: schengawegga Date: Tue, 13 May 2025 10:47:15 +0200 Subject: [PATCH 19/51] New mysqli method multiquery --- tests/errors.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/errors.inc b/tests/errors.inc index cd6940e..0e4c084 100644 --- a/tests/errors.inc +++ b/tests/errors.inc @@ -258,7 +258,7 @@ $res = $dbh->query("INSERT INTO peartestnull VALUES ('one')"); $res = $dbh->query("UPDATE peartestnull SET a = NULL WHERE a = 'one'"); switch ($dbh->phptype) { case 'mysql': - case 'mysqli': + case 'mysqli' && PHP_VERSION_ID < 70400: check_error($res, DB_ERROR_CONSTRAINT_NOT_NULL, false); break; default: From 10674720c0b542a7a1594bb14dc238687ce57555 Mon Sep 17 00:00:00 2001 From: schengawegga Date: Tue, 13 May 2025 10:49:52 +0200 Subject: [PATCH 20/51] New mysqli method multiquery --- tests/errors.inc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/errors.inc b/tests/errors.inc index 0e4c084..05a1221 100644 --- a/tests/errors.inc +++ b/tests/errors.inc @@ -339,7 +339,7 @@ print 'DB_ERROR_INVALID_NUMBER putting chars in INT column: '; $res = $dbh->query("UPDATE phptest SET a = 'abc' WHERE a = 42"); switch ($dbh->phptype) { case 'mysql': - case 'mysqli': + case 'mysqli' && PHP_VERSION_ID < 70400: case 'sqlite': case 'sqlite3': check_error($res, DB_ERROR_INVALID_NUMBER, false); @@ -443,7 +443,7 @@ switch ($dbh->phptype . ':' . $dbh->dbsyntax) { case 'msql:msql': case 'mssql:mssql': case 'mysql:mysql': - case 'mysqli:mysqli': + case 'mysqli:mysqli' && PHP_VERSION_ID < 70400: case 'odbc:access': case 'sqlite:sqlite': case 'sybase:sybase': @@ -465,7 +465,7 @@ switch ($dbh->phptype . ':' . $dbh->dbsyntax) { case 'msql:msql': case 'mssql:mssql': case 'mysql:mysql': - case 'mysqli:mysqli': + case 'mysqli:mysqli' && PHP_VERSION_ID < 70400: case 'odbc:access': case 'sqlite:sqlite': case 'sybase:sybase': From 3b2c4b9600457d670ae80a557aa03e32ee0b00e6 Mon Sep 17 00:00:00 2001 From: schengawegga Date: Tue, 13 May 2025 10:55:58 +0200 Subject: [PATCH 21/51] New mysqli method multiquery --- tests/errors.inc | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/tests/errors.inc b/tests/errors.inc index 05a1221..0f35866 100644 --- a/tests/errors.inc +++ b/tests/errors.inc @@ -344,6 +344,9 @@ switch ($dbh->phptype) { case 'sqlite3': check_error($res, DB_ERROR_INVALID_NUMBER, false); break; + case 'mysqli' && PHP_VERSION_ID >= 70400: + check_error($res, DB_ERROR); + break; default: check_error($res, DB_ERROR_INVALID_NUMBER); } @@ -450,6 +453,9 @@ switch ($dbh->phptype . ':' . $dbh->dbsyntax) { case 'sqlite3:sqlite': check_error($res, DB_ERROR_INVALID, false); break; + case 'mysqli:mysqli' && PHP_VERSION_ID >= 70400: + check_error($res, DB_ERROR); + break; case 'fbsql:fbsql': check_error($res, DB_ERROR_TRUNCATED); break; @@ -472,6 +478,9 @@ switch ($dbh->phptype . ':' . $dbh->dbsyntax) { case 'sqlite3:sqlite': check_error($res, DB_ERROR_INVALID, false); break; + case 'mysqli:mysqli' && PHP_VERSION_ID >= 70400: + check_error($res, DB_ERROR); + break; case 'fbsql:fbsql': check_error($res, DB_ERROR_TRUNCATED); break; From 9354c1d96fcabc494f4b9799bd23a5223a9b3b93 Mon Sep 17 00:00:00 2001 From: schengawegga Date: Tue, 13 May 2025 15:43:14 +0200 Subject: [PATCH 22/51] New mysqli method multiquery --- tests/db_error.phpt | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/db_error.phpt b/tests/db_error.phpt index 54782f5..683704b 100644 --- a/tests/db_error.phpt +++ b/tests/db_error.phpt @@ -30,6 +30,7 @@ function test_error_handler($errno, $errmsg, $file, $line, $vars=null) { E_USER_WARNING => 'User Warning', E_USER_NOTICE => 'User Notice', E_STRICT => 'Strict Notice', + E_DEPRECATED => 'Deprecated', ); $prefix = $errortype[$errno]; print "\n$prefix: $errmsg in " . basename($file) . " on line XXX\n"; From 67aa67e49e595dd394a3b9dec40d60c9d36f99e1 Mon Sep 17 00:00:00 2001 From: schengawegga Date: Tue, 13 May 2025 15:48:33 +0200 Subject: [PATCH 23/51] New mysqli method multiquery --- DB.php | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/DB.php b/DB.php index b9fced5..5ac8241 100644 --- a/DB.php +++ b/DB.php @@ -1001,9 +1001,14 @@ public function __call($method, $arguments) if ($method == 'DB_Error') { return call_user_func_array(array($this, '__construct'), $arguments); } - trigger_error( - 'Call to undefined method DB_Error::' . $method . '()', E_USER_ERROR - ); + + if(PHP_VERSION_ID < 80400) { + trigger_error( + 'Call to undefined method DB_Error::' . $method . '()', E_USER_ERROR + ); + } else { + throw new RuntimeException('Call to undefined method DB_Error::' . $method . '()'); + } } // }}} } From 9aa501d1c5b17dc8f356611aa7f224d2ca671461 Mon Sep 17 00:00:00 2001 From: schengawegga Date: Tue, 13 May 2025 15:56:23 +0200 Subject: [PATCH 24/51] New mysqli method multiquery --- DB.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/DB.php b/DB.php index 5ac8241..0771085 100644 --- a/DB.php +++ b/DB.php @@ -1002,13 +1002,13 @@ public function __call($method, $arguments) return call_user_func_array(array($this, '__construct'), $arguments); } - if(PHP_VERSION_ID < 80400) { + /*if(PHP_VERSION_ID < 80400) { trigger_error( 'Call to undefined method DB_Error::' . $method . '()', E_USER_ERROR ); - } else { + } else {*/ throw new RuntimeException('Call to undefined method DB_Error::' . $method . '()'); - } + //} } // }}} } From 862d89f81360ab2bbba9dbb0879abd44ca8bbc88 Mon Sep 17 00:00:00 2001 From: schengawegga Date: Tue, 13 May 2025 16:03:12 +0200 Subject: [PATCH 25/51] New mysqli method multiquery --- DB.php | 6 +++--- tests/include.inc | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/DB.php b/DB.php index 0771085..5ac8241 100644 --- a/DB.php +++ b/DB.php @@ -1002,13 +1002,13 @@ public function __call($method, $arguments) return call_user_func_array(array($this, '__construct'), $arguments); } - /*if(PHP_VERSION_ID < 80400) { + if(PHP_VERSION_ID < 80400) { trigger_error( 'Call to undefined method DB_Error::' . $method . '()', E_USER_ERROR ); - } else {*/ + } else { throw new RuntimeException('Call to undefined method DB_Error::' . $method . '()'); - //} + } } // }}} } diff --git a/tests/include.inc b/tests/include.inc index 83994df..4e67238 100644 --- a/tests/include.inc +++ b/tests/include.inc @@ -48,13 +48,13 @@ if (!defined('PATH_SEPARATOR')) { * Therefore, we'll assume the tests should use the version of * DB that has come from there as well. */ -if ('@include_path@' != '@'.'include_path'.'@') { +/*if ('@include_path@' != '@'.'include_path'.'@') { ini_set('include_path', ini_get('include_path') . PATH_SEPARATOR . '.' ); -} else { +} else {*/ ini_set('include_path', realpath(dirname(__FILE__) . '/..') . PATH_SEPARATOR . '.' . PATH_SEPARATOR . ini_get('include_path') ); -} +//} From c9abfb050a2cbb56c26c9572d36a4520701521af Mon Sep 17 00:00:00 2001 From: schengawegga Date: Tue, 13 May 2025 16:06:12 +0200 Subject: [PATCH 26/51] New mysqli method multiquery --- tests/db_error.phpt | 1 + tests/include.inc | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/tests/db_error.phpt b/tests/db_error.phpt index 683704b..2a80bb6 100644 --- a/tests/db_error.phpt +++ b/tests/db_error.phpt @@ -5,6 +5,7 @@ DB::DB_Error --FILE-- Date: Tue, 13 May 2025 16:07:56 +0200 Subject: [PATCH 27/51] New mysqli method multiquery --- tests/db_error.phpt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/db_error.phpt b/tests/db_error.phpt index 2a80bb6..6f4d56b 100644 --- a/tests/db_error.phpt +++ b/tests/db_error.phpt @@ -6,7 +6,7 @@ DB::DB_Error Date: Tue, 13 May 2025 16:13:11 +0200 Subject: [PATCH 28/51] New mysqli method multiquery --- DB.php | 8 +------- tests/db_error.phpt | 3 +-- 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/DB.php b/DB.php index 5ac8241..51cd38e 100644 --- a/DB.php +++ b/DB.php @@ -1002,13 +1002,7 @@ public function __call($method, $arguments) return call_user_func_array(array($this, '__construct'), $arguments); } - if(PHP_VERSION_ID < 80400) { - trigger_error( - 'Call to undefined method DB_Error::' . $method . '()', E_USER_ERROR - ); - } else { - throw new RuntimeException('Call to undefined method DB_Error::' . $method . '()'); - } + throw new RuntimeException('Call to undefined method DB_Error::' . $method . '()', E_USER_ERROR); } // }}} } diff --git a/tests/db_error.phpt b/tests/db_error.phpt index 6f4d56b..683704b 100644 --- a/tests/db_error.phpt +++ b/tests/db_error.phpt @@ -5,8 +5,7 @@ DB::DB_Error --FILE-- Date: Wed, 25 Jun 2025 20:21:15 +0200 Subject: [PATCH 29/51] Setup ci.yml env --- tests/driver/setup.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/driver/setup.inc b/tests/driver/setup.inc index 42dc02e..649ce88 100644 --- a/tests/driver/setup.inc +++ b/tests/driver/setup.inc @@ -106,7 +106,7 @@ $dsns = array( // 'sybase' => 'sybase://sa@somehost/pubs', // 'mysql' => 'mysql://root@localhost/test', - 'mysqli' => 'mysqli://root@localhost/pear_db', // $_ENV overrides if set. + // 'mysqli' => 'mysqli://root@localhost/test', // $_ENV overrides if set. // 'oci8' => 'oci8://system:manager@', // 'access' => 'odbc(access)://admin@/SystemDsnName', // 'db2' => 'odbc(db2)://db2inst1:XXXX@/SAMPLE', From f2513ec9cff0c2c183630aba0feb7d556696ec2c Mon Sep 17 00:00:00 2001 From: schengawegga Date: Wed, 25 Jun 2025 20:34:13 +0200 Subject: [PATCH 30/51] Setup ci.yml env --- .github/workflows/ci.yml | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e3bd1e2..dec550c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -33,11 +33,16 @@ jobs: run: | mysqld --version - name: Set env + env: + MYSQL_TEST_USER: 'root' + MYSQL_TEST_PASSWD: 'root' + MYSQL_TEST_DB: 'pear_db' + MYSQL_TEST_HOST: '127.0.0.1' run: | - echo "MYSQL_TEST_USER=root" >> $GITHUB_ENV - echo "MYSQL_TEST_PASSWD=root" >> $GITHUB_ENV - echo "MYSQL_TEST_DB=pear_db" >> $GITHUB_ENV - echo "MYSQL_TEST_HOST=127.0.0.1" >> $GITHUB_ENV + echo "MYSQL_TEST_USER=root" + echo "MYSQL_TEST_PASSWD=root" + echo "MYSQL_TEST_DB=pear_db" + echo "MYSQL_TEST_HOST=127.0.0.1" - name: Run tests uses: gacts/run-and-post-run@v1 with: From 44d497eae6763442319fdd30722c17e727b5a61d Mon Sep 17 00:00:00 2001 From: schengawegga Date: Wed, 25 Jun 2025 20:36:00 +0200 Subject: [PATCH 31/51] Setup ci.yml env --- .github/workflows/ci.yml | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index dec550c..71e1fc9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -32,19 +32,13 @@ jobs: - name: Get MySQL Version run: | mysqld --version - - name: Set env + - name: Run tests + uses: gacts/run-and-post-run@v1 env: MYSQL_TEST_USER: 'root' MYSQL_TEST_PASSWD: 'root' MYSQL_TEST_DB: 'pear_db' MYSQL_TEST_HOST: '127.0.0.1' - run: | - echo "MYSQL_TEST_USER=root" - echo "MYSQL_TEST_PASSWD=root" - echo "MYSQL_TEST_DB=pear_db" - echo "MYSQL_TEST_HOST=127.0.0.1" - - name: Run tests - uses: gacts/run-and-post-run@v1 with: run: | pear run-tests -r tests/ From 4f20fc8ce599494dacc369528fc8b03623fde857 Mon Sep 17 00:00:00 2001 From: schengawegga Date: Wed, 25 Jun 2025 20:40:09 +0200 Subject: [PATCH 32/51] Setup ci.yml env --- .github/workflows/ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 71e1fc9..dca2c16 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -16,6 +16,7 @@ jobs: strategy: matrix: php-version: ['5.4', '5.5', '5.6', '7.0', '7.1', '7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3', '8.4', '8.5'] + database: ['mysql', 'pg'] steps: - uses: actions/checkout@v4 From bb4cfbdf000df9fd4a8de05299f30140165dab75 Mon Sep 17 00:00:00 2001 From: schengawegga Date: Wed, 25 Jun 2025 21:13:24 +0200 Subject: [PATCH 33/51] Setup ci.yml env --- .github/includes/mysql.yml | 13 +++++++++++++ .github/workflows/ci.yml | 14 ++------------ 2 files changed, 15 insertions(+), 12 deletions(-) create mode 100644 .github/includes/mysql.yml diff --git a/.github/includes/mysql.yml b/.github/includes/mysql.yml new file mode 100644 index 0000000..95c8ee4 --- /dev/null +++ b/.github/includes/mysql.yml @@ -0,0 +1,13 @@ + run: | + sudo systemctl start mysql.service + mysql -e 'CREATE DATABASE pear_db;' -uroot -proot +- name: Get MySQL Version + run: | + mysqld --version +- name: Run tests + uses: gacts/run-and-post-run@v1 + env: + MYSQL_TEST_USER: 'root' + MYSQL_TEST_PASSWD: 'root' + MYSQL_TEST_DB: 'pear_db' + MYSQL_TEST_HOST: '127.0.0.1' \ No newline at end of file diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index dca2c16..9658bb1 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -27,19 +27,9 @@ jobs: ini-values: include_path=.:/usr/share/php:pear/usr/share/php tools: none - name: Set up MySQL - run: | - sudo systemctl start mysql.service - mysql -e 'CREATE DATABASE pear_db;' -uroot -proot - - name: Get MySQL Version - run: | - mysqld --version - - name: Run tests - uses: gacts/run-and-post-run@v1 env: - MYSQL_TEST_USER: 'root' - MYSQL_TEST_PASSWD: 'root' - MYSQL_TEST_DB: 'pear_db' - MYSQL_TEST_HOST: '127.0.0.1' + DATABASE_YML: ".github/includes/${{ matrix.database }}.yml" + uses: ${{ env.DATABASE_YML }} with: run: | pear run-tests -r tests/ From 6b8601cd117eafc9d03a61ca271758655ccdfc90 Mon Sep 17 00:00:00 2001 From: schengawegga Date: Wed, 25 Jun 2025 21:45:04 +0200 Subject: [PATCH 34/51] Setup ci.yml env --- .github/includes/mysql.yml | 8 +++++++- .github/workflows/ci.yml | 10 +--------- 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/.github/includes/mysql.yml b/.github/includes/mysql.yml index 95c8ee4..e920cdd 100644 --- a/.github/includes/mysql.yml +++ b/.github/includes/mysql.yml @@ -1,3 +1,4 @@ +- name: Set up MySQL run: | sudo systemctl start mysql.service mysql -e 'CREATE DATABASE pear_db;' -uroot -proot @@ -10,4 +11,9 @@ MYSQL_TEST_USER: 'root' MYSQL_TEST_PASSWD: 'root' MYSQL_TEST_DB: 'pear_db' - MYSQL_TEST_HOST: '127.0.0.1' \ No newline at end of file + MYSQL_TEST_HOST: '127.0.0.1' + with: + run: | + pear run-tests -r tests/ + post: | + for i in `find tests/ -name '*.out'`; do echo "$i"; cat "$i"; done \ No newline at end of file diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9658bb1..c4cecbc 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -26,12 +26,4 @@ jobs: php-version: ${{ matrix.php-version }} ini-values: include_path=.:/usr/share/php:pear/usr/share/php tools: none - - name: Set up MySQL - env: - DATABASE_YML: ".github/includes/${{ matrix.database }}.yml" - uses: ${{ env.DATABASE_YML }} - with: - run: | - pear run-tests -r tests/ - post: | - for i in `find tests/ -name '*.out'`; do echo "$i"; cat "$i"; done \ No newline at end of file + - uses: '.github/includes/mysql.yml' \ No newline at end of file From 967727ee475f9c610c719bc267262cf022db8bef Mon Sep 17 00:00:00 2001 From: schengawegga Date: Wed, 25 Jun 2025 21:46:28 +0200 Subject: [PATCH 35/51] Setup ci.yml env --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c4cecbc..cc2f329 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -26,4 +26,4 @@ jobs: php-version: ${{ matrix.php-version }} ini-values: include_path=.:/usr/share/php:pear/usr/share/php tools: none - - uses: '.github/includes/mysql.yml' \ No newline at end of file + - uses: './DB/.github/includes/mysql.yml' \ No newline at end of file From d0192daa7ffbccc06f98a449079e2d4890c7953f Mon Sep 17 00:00:00 2001 From: schengawegga Date: Wed, 25 Jun 2025 21:51:49 +0200 Subject: [PATCH 36/51] Setup ci.yml env --- .github/includes/mysql.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/includes/mysql.yml b/.github/includes/mysql.yml index e920cdd..fa51dee 100644 --- a/.github/includes/mysql.yml +++ b/.github/includes/mysql.yml @@ -1,3 +1,4 @@ +- uses: actions/checkout@v4 - name: Set up MySQL run: | sudo systemctl start mysql.service From 9458f23cce4ca0171cc32ae5e12c0319e9f0ac12 Mon Sep 17 00:00:00 2001 From: schengawegga Date: Fri, 27 Jun 2025 23:22:39 +0200 Subject: [PATCH 37/51] Setup ci.yml env --- .github/includes/mysql.yml | 20 -------------------- .github/workflows/ci.yml | 21 +++++++++++++++++++-- 2 files changed, 19 insertions(+), 22 deletions(-) delete mode 100644 .github/includes/mysql.yml diff --git a/.github/includes/mysql.yml b/.github/includes/mysql.yml deleted file mode 100644 index fa51dee..0000000 --- a/.github/includes/mysql.yml +++ /dev/null @@ -1,20 +0,0 @@ -- uses: actions/checkout@v4 -- name: Set up MySQL - run: | - sudo systemctl start mysql.service - mysql -e 'CREATE DATABASE pear_db;' -uroot -proot -- name: Get MySQL Version - run: | - mysqld --version -- name: Run tests - uses: gacts/run-and-post-run@v1 - env: - MYSQL_TEST_USER: 'root' - MYSQL_TEST_PASSWD: 'root' - MYSQL_TEST_DB: 'pear_db' - MYSQL_TEST_HOST: '127.0.0.1' - with: - run: | - pear run-tests -r tests/ - post: | - for i in `find tests/ -name '*.out'`; do echo "$i"; cat "$i"; done \ No newline at end of file diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index cc2f329..71e1fc9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -16,7 +16,6 @@ jobs: strategy: matrix: php-version: ['5.4', '5.5', '5.6', '7.0', '7.1', '7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3', '8.4', '8.5'] - database: ['mysql', 'pg'] steps: - uses: actions/checkout@v4 @@ -26,4 +25,22 @@ jobs: php-version: ${{ matrix.php-version }} ini-values: include_path=.:/usr/share/php:pear/usr/share/php tools: none - - uses: './DB/.github/includes/mysql.yml' \ No newline at end of file + - name: Set up MySQL + run: | + sudo systemctl start mysql.service + mysql -e 'CREATE DATABASE pear_db;' -uroot -proot + - name: Get MySQL Version + run: | + mysqld --version + - name: Run tests + uses: gacts/run-and-post-run@v1 + env: + MYSQL_TEST_USER: 'root' + MYSQL_TEST_PASSWD: 'root' + MYSQL_TEST_DB: 'pear_db' + MYSQL_TEST_HOST: '127.0.0.1' + with: + run: | + pear run-tests -r tests/ + post: | + for i in `find tests/ -name '*.out'`; do echo "$i"; cat "$i"; done \ No newline at end of file From 5e21f1eec296c6c1066954462b57a7606490e09a Mon Sep 17 00:00:00 2001 From: schengawegga Date: Fri, 27 Jun 2025 23:48:53 +0200 Subject: [PATCH 38/51] Setup ci.yml env --- .github/workflows/ci.yml | 1 + tests/driver/skipif.inc | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 71e1fc9..52a7d02 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -29,6 +29,7 @@ jobs: run: | sudo systemctl start mysql.service mysql -e 'CREATE DATABASE pear_db;' -uroot -proot + mysql -e 'ALTER USER \'root\'@\'localhost\' IDENTIFIED WITH mysql_native_password BY \'root\';' -uroot -proot - name: Get MySQL Version run: | mysqld --version diff --git a/tests/driver/skipif.inc b/tests/driver/skipif.inc index 2763cb5..b9a76d4 100644 --- a/tests/driver/skipif.inc +++ b/tests/driver/skipif.inc @@ -23,7 +23,7 @@ /** * Establish the include_path, DSN's and connection $options */ -require_once dirname(__FILE__) . '/setup.inc'; +require_once __DIR__ . DIRECTORY_SEPARATOR . 'setup.inc'; if (empty($dsns)) { die('skip At least one element of $dsns must be defined in setup.inc'); From eb645d122c1cdc24155aea7906461b14689b8085 Mon Sep 17 00:00:00 2001 From: schengawegga Date: Fri, 27 Jun 2025 23:51:56 +0200 Subject: [PATCH 39/51] Setup ci.yml env --- .github/workflows/ci.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 52a7d02..5e53ad2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -15,7 +15,8 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - php-version: ['5.4', '5.5', '5.6', '7.0', '7.1', '7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3', '8.4', '8.5'] + #php-version: ['5.4', '5.5', '5.6', '7.0', '7.1', '7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3', '8.4', '8.5'] + php-version: ['7.0'] steps: - uses: actions/checkout@v4 @@ -29,6 +30,8 @@ jobs: run: | sudo systemctl start mysql.service mysql -e 'CREATE DATABASE pear_db;' -uroot -proot + - name: Set mysql_native_password for root user + run: | mysql -e 'ALTER USER \'root\'@\'localhost\' IDENTIFIED WITH mysql_native_password BY \'root\';' -uroot -proot - name: Get MySQL Version run: | From a08b20ac0b6d379b82d88eee7bf912f396765beb Mon Sep 17 00:00:00 2001 From: schengawegga Date: Fri, 27 Jun 2025 23:53:02 +0200 Subject: [PATCH 40/51] Setup ci.yml env --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5e53ad2..bc73801 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -16,7 +16,7 @@ jobs: strategy: matrix: #php-version: ['5.4', '5.5', '5.6', '7.0', '7.1', '7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3', '8.4', '8.5'] - php-version: ['7.0'] + php-version: ['7.0'] steps: - uses: actions/checkout@v4 From 24b356da4671cd1b2196c785ed50cf60a57ae52c Mon Sep 17 00:00:00 2001 From: schengawegga Date: Fri, 27 Jun 2025 23:55:08 +0200 Subject: [PATCH 41/51] Setup ci.yml env --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index bc73801..2d7afde 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -32,7 +32,7 @@ jobs: mysql -e 'CREATE DATABASE pear_db;' -uroot -proot - name: Set mysql_native_password for root user run: | - mysql -e 'ALTER USER \'root\'@\'localhost\' IDENTIFIED WITH mysql_native_password BY \'root\';' -uroot -proot + mysql -e "ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'root';" -uroot -proot - name: Get MySQL Version run: | mysqld --version From 7c4113f273f20195beacfb68a7e8327a029fef1d Mon Sep 17 00:00:00 2001 From: schengawegga Date: Sat, 28 Jun 2025 00:04:30 +0200 Subject: [PATCH 42/51] Setup ci.yml env --- .github/workflows/ci.yml | 3 +-- tests/driver/setup.inc | 42 ++++++++++++++++++++++++++++------------ 2 files changed, 31 insertions(+), 14 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2d7afde..e60dc9e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -15,8 +15,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - #php-version: ['5.4', '5.5', '5.6', '7.0', '7.1', '7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3', '8.4', '8.5'] - php-version: ['7.0'] + php-version: ['5.4', '5.5', '5.6', '7.0', '7.1', '7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3', '8.4', '8.5'] steps: - uses: actions/checkout@v4 diff --git a/tests/driver/setup.inc b/tests/driver/setup.inc index 649ce88..af470e1 100644 --- a/tests/driver/setup.inc +++ b/tests/driver/setup.inc @@ -116,19 +116,37 @@ $dsns = array( ); if (getenv('MYSQL_TEST_USER')) { - $dsns['mysqli'] = array( - 'phptype' => 'mysqli', - 'username' => getenv('MYSQL_TEST_USER'), - 'password' => getenv('MYSQL_TEST_PASSWD'), - 'database' => getenv('MYSQL_TEST_DB'), + if(version_compare(PHP_VERSION, '7.2.0', '<')) { + $dsns['mysql'] = array( + 'phptype' => 'mysql', + 'username' => getenv('MYSQL_TEST_USER'), + 'password' => getenv('MYSQL_TEST_PASSWD'), + 'database' => getenv('MYSQL_TEST_DB'), - 'hostspec' => getenv('MYSQL_TEST_HOST') == '' - ? null : getenv('MYSQL_TEST_HOST'), + 'hostspec' => getenv('MYSQL_TEST_HOST') == '' + ? null : getenv('MYSQL_TEST_HOST'), - 'port' => getenv('MYSQL_TEST_PORT') == '' - ? null : getenv('MYSQL_TEST_PORT'), + 'port' => getenv('MYSQL_TEST_PORT') == '' + ? null : getenv('MYSQL_TEST_PORT'), - 'socket' => getenv('MYSQL_TEST_SOCKET') == '' - ? null : getenv('MYSQL_TEST_SOCKET'), - ); + 'socket' => getenv('MYSQL_TEST_SOCKET') == '' + ? null : getenv('MYSQL_TEST_SOCKET'), + ); + } else { + $dsns['mysqli'] = array( + 'phptype' => 'mysqli', + 'username' => getenv('MYSQL_TEST_USER'), + 'password' => getenv('MYSQL_TEST_PASSWD'), + 'database' => getenv('MYSQL_TEST_DB'), + + 'hostspec' => getenv('MYSQL_TEST_HOST') == '' + ? null : getenv('MYSQL_TEST_HOST'), + + 'port' => getenv('MYSQL_TEST_PORT') == '' + ? null : getenv('MYSQL_TEST_PORT'), + + 'socket' => getenv('MYSQL_TEST_SOCKET') == '' + ? null : getenv('MYSQL_TEST_SOCKET'), + ); + } } From e0a63f7aa705ce6f5fbf2ba26c279658551dd305 Mon Sep 17 00:00:00 2001 From: schengawegga Date: Sat, 28 Jun 2025 00:13:27 +0200 Subject: [PATCH 43/51] Setup ci.yml env --- .github/workflows/ci.yml | 1 + tests/driver/setup.inc | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e60dc9e..adf2d43 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -23,6 +23,7 @@ jobs: uses: shivammathur/setup-php@v2 with: php-version: ${{ matrix.php-version }} + extensions: mysql, mysqli ini-values: include_path=.:/usr/share/php:pear/usr/share/php tools: none - name: Set up MySQL diff --git a/tests/driver/setup.inc b/tests/driver/setup.inc index af470e1..264cd23 100644 --- a/tests/driver/setup.inc +++ b/tests/driver/setup.inc @@ -116,7 +116,7 @@ $dsns = array( ); if (getenv('MYSQL_TEST_USER')) { - if(version_compare(PHP_VERSION, '7.2.0', '<')) { + /*if(version_compare(PHP_VERSION, '7.2.0', '<')) { $dsns['mysql'] = array( 'phptype' => 'mysql', 'username' => getenv('MYSQL_TEST_USER'), @@ -132,7 +132,7 @@ if (getenv('MYSQL_TEST_USER')) { 'socket' => getenv('MYSQL_TEST_SOCKET') == '' ? null : getenv('MYSQL_TEST_SOCKET'), ); - } else { + } else {*/ $dsns['mysqli'] = array( 'phptype' => 'mysqli', 'username' => getenv('MYSQL_TEST_USER'), @@ -148,5 +148,5 @@ if (getenv('MYSQL_TEST_USER')) { 'socket' => getenv('MYSQL_TEST_SOCKET') == '' ? null : getenv('MYSQL_TEST_SOCKET'), ); - } + //} } From 7a628456e55c4448a4b669bf35c79e4fcb77da9d Mon Sep 17 00:00:00 2001 From: schengawegga Date: Sat, 28 Jun 2025 00:15:48 +0200 Subject: [PATCH 44/51] Setup ci.yml env --- .github/workflows/ci.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index adf2d43..4fa4e34 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -30,9 +30,6 @@ jobs: run: | sudo systemctl start mysql.service mysql -e 'CREATE DATABASE pear_db;' -uroot -proot - - name: Set mysql_native_password for root user - run: | - mysql -e "ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'root';" -uroot -proot - name: Get MySQL Version run: | mysqld --version From 4864c0c0ee4e77fdee5cfe7061569454524e028f Mon Sep 17 00:00:00 2001 From: schengawegga Date: Sat, 28 Jun 2025 00:27:48 +0200 Subject: [PATCH 45/51] Setup ci.yml env --- tests/driver/connect.inc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/driver/connect.inc b/tests/driver/connect.inc index 371ac41..ac9c7a4 100644 --- a/tests/driver/connect.inc +++ b/tests/driver/connect.inc @@ -43,3 +43,7 @@ $dbh = DB::connect($dsn, $options); if (DB::isError($dbh)) { die('connect.inc: ' . $dbh->toString()); } + +if ($dbms == 'mysql' || $dbms == 'mysql') { + $dbh->query("SET CHARACTER SET ?", array('utf-8')); +} From 7d058063c44f03cd53f01dc094e481970a7ef521 Mon Sep 17 00:00:00 2001 From: schengawegga Date: Sat, 28 Jun 2025 00:32:21 +0200 Subject: [PATCH 46/51] Setup ci.yml env --- tests/driver/connect.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/driver/connect.inc b/tests/driver/connect.inc index ac9c7a4..c11b52e 100644 --- a/tests/driver/connect.inc +++ b/tests/driver/connect.inc @@ -44,6 +44,6 @@ if (DB::isError($dbh)) { die('connect.inc: ' . $dbh->toString()); } -if ($dbms == 'mysql' || $dbms == 'mysql') { +if ($dbms == 'mysql' || $dbms == 'mysqli') { $dbh->query("SET CHARACTER SET ?", array('utf-8')); } From a84e8a45ba1f4b44d9ca06a98719ee015bd802fe Mon Sep 17 00:00:00 2001 From: schengawegga Date: Sat, 28 Jun 2025 00:34:01 +0200 Subject: [PATCH 47/51] Setup ci.yml env --- tests/driver/connect.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/driver/connect.inc b/tests/driver/connect.inc index c11b52e..b23f6b8 100644 --- a/tests/driver/connect.inc +++ b/tests/driver/connect.inc @@ -45,5 +45,5 @@ if (DB::isError($dbh)) { } if ($dbms == 'mysql' || $dbms == 'mysqli') { - $dbh->query("SET CHARACTER SET ?", array('utf-8')); + $dbh->query("SET CHARACTER SET ?", array('utf8')); } From 8dd212887364fed3a7ba9e1f200071e53fb0c92f Mon Sep 17 00:00:00 2001 From: schengawegga Date: Sat, 28 Jun 2025 00:36:33 +0200 Subject: [PATCH 48/51] Setup ci.yml env --- tests/driver/connect.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/driver/connect.inc b/tests/driver/connect.inc index b23f6b8..6d2bc60 100644 --- a/tests/driver/connect.inc +++ b/tests/driver/connect.inc @@ -45,5 +45,5 @@ if (DB::isError($dbh)) { } if ($dbms == 'mysql' || $dbms == 'mysqli') { - $dbh->query("SET CHARACTER SET ?", array('utf8')); + $dbh->query("SET CHARACTER SET ?", array('latin1')); } From 2b8abee6033f50c5b69770fc0dfe76fed6868207 Mon Sep 17 00:00:00 2001 From: schengawegga Date: Sat, 28 Jun 2025 00:40:50 +0200 Subject: [PATCH 49/51] Setup ci.yml env --- .github/workflows/ci2.yml | 47 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 .github/workflows/ci2.yml diff --git a/.github/workflows/ci2.yml b/.github/workflows/ci2.yml new file mode 100644 index 0000000..4fa4e34 --- /dev/null +++ b/.github/workflows/ci2.yml @@ -0,0 +1,47 @@ +--- +name: CI + +on: + push: + branches: + - trunk + pull_request: + branches: + - trunk + +jobs: + test: + continue-on-error: true + runs-on: ubuntu-latest + strategy: + matrix: + php-version: ['5.4', '5.5', '5.6', '7.0', '7.1', '7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3', '8.4', '8.5'] + + steps: + - uses: actions/checkout@v4 + - name: Set up PHP ${{ matrix.php-version }} + uses: shivammathur/setup-php@v2 + with: + php-version: ${{ matrix.php-version }} + extensions: mysql, mysqli + ini-values: include_path=.:/usr/share/php:pear/usr/share/php + tools: none + - name: Set up MySQL + run: | + sudo systemctl start mysql.service + mysql -e 'CREATE DATABASE pear_db;' -uroot -proot + - name: Get MySQL Version + run: | + mysqld --version + - name: Run tests + uses: gacts/run-and-post-run@v1 + env: + MYSQL_TEST_USER: 'root' + MYSQL_TEST_PASSWD: 'root' + MYSQL_TEST_DB: 'pear_db' + MYSQL_TEST_HOST: '127.0.0.1' + with: + run: | + pear run-tests -r tests/ + post: | + for i in `find tests/ -name '*.out'`; do echo "$i"; cat "$i"; done \ No newline at end of file From a1c9b77db28a085446fe4705867c27840debf31c Mon Sep 17 00:00:00 2001 From: schengawegga Date: Sat, 28 Jun 2025 00:45:57 +0200 Subject: [PATCH 50/51] Setup ci.yml env --- .github/workflows/ci2.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci2.yml b/.github/workflows/ci2.yml index 4fa4e34..21a3350 100644 --- a/.github/workflows/ci2.yml +++ b/.github/workflows/ci2.yml @@ -1,5 +1,5 @@ --- -name: CI +name: CI2 on: push: @@ -12,7 +12,8 @@ on: jobs: test: continue-on-error: true - runs-on: ubuntu-latest + #runs-on: ubuntu-latest + runs-on: ubuntu-20.04 strategy: matrix: php-version: ['5.4', '5.5', '5.6', '7.0', '7.1', '7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3', '8.4', '8.5'] From 72d7851e5b22353c88fbd2d7dac1549ae3002e21 Mon Sep 17 00:00:00 2001 From: schengawegga Date: Sat, 28 Jun 2025 00:47:27 +0200 Subject: [PATCH 51/51] Setup ci.yml env --- .github/workflows/ci2.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci2.yml b/.github/workflows/ci2.yml index 21a3350..c18571b 100644 --- a/.github/workflows/ci2.yml +++ b/.github/workflows/ci2.yml @@ -13,7 +13,7 @@ jobs: test: continue-on-error: true #runs-on: ubuntu-latest - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 strategy: matrix: php-version: ['5.4', '5.5', '5.6', '7.0', '7.1', '7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3', '8.4', '8.5']