Skip to content

Commit dfb737b

Browse files
committed
Update dependencies and supported PHP versions.
1 parent 2680324 commit dfb737b

File tree

10 files changed

+39
-41
lines changed

10 files changed

+39
-41
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/.idea/
2-
/.phpunit.cache/
2+
/.phpunit.result.cache
33
/bin/
44
/composer.lock
55
/docs/_build/

composer.json

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -13,19 +13,19 @@
1313
],
1414
"license": "MIT",
1515
"require": {
16-
"php": ">=8.1",
16+
"php": ">=8.3",
1717
"ext-json": "*",
1818
"ext-mysqli": "*",
19-
"setbased/exception": "^2.3.0",
20-
"setbased/helper-code-store-mysql": "^2.2.0",
21-
"setbased/php-stratum-backend": "^6.1.0",
22-
"setbased/php-stratum-common": "^7.0.0",
23-
"setbased/php-stratum-middle": "^5.12.0"
19+
"setbased/exception": "^2.5.0",
20+
"setbased/helper-code-store-mysql": "^2.3.0",
21+
"setbased/php-stratum-backend": "^6.2.0",
22+
"setbased/php-stratum-common": "^7.2.0",
23+
"setbased/php-stratum-middle": "^5.13.0"
2424
},
2525
"require-dev": {
26-
"phing/phing": "^3.0.0",
27-
"phpunit/phpunit": "^10.5.35",
28-
"setbased/php-stratum": "^6.3.1"
26+
"phing/phing": "^3.0.1",
27+
"phpunit/phpunit": "^11.5.22",
28+
"setbased/php-stratum": "^6.4.0"
2929
},
3030
"autoload": {
3131
"psr-4": {

phpunit.xml

Lines changed: 12 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,20 @@
1-
<?xml version="1.0"?>
2-
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" bootstrap="test/bootstrap.php" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.5/phpunit.xsd" cacheDirectory=".phpunit.cache">
3-
<coverage>
4-
<report>
5-
<clover outputFile="test/coverage.xml"/>
6-
<html outputDirectory="test/report"/>
7-
</report>
8-
</coverage>
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3+
xsi:noNamespaceSchemaLocation="vendor/phpunit/phpunit/phpunit.xsd"
4+
displayDetailsOnTestsThatTriggerDeprecations="true"
5+
displayDetailsOnTestsThatTriggerErrors="true"
6+
displayDetailsOnTestsThatTriggerNotices="true"
7+
displayDetailsOnTestsThatTriggerWarnings="true"
8+
displayDetailsOnPhpunitDeprecations="true">
99
<testsuites>
10-
<testsuite name="Tests">
10+
<testsuite name="default">
1111
<directory>test</directory>
1212
</testsuite>
1313
</testsuites>
14-
<logging/>
15-
<source>
14+
15+
<source ignoreIndirectDeprecations="true" restrictNotices="true" restrictWarnings="true">
1616
<include>
17-
<directory suffix=".php">src</directory>
17+
<directory>src</directory>
1818
</include>
19-
<exclude>
20-
<directory suffix=".php">vendor/setbased</directory>
21-
</exclude>
2219
</source>
2320
</phpunit>

src/Backend/MySqlRoutineLoaderWorker.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,27 +27,27 @@ class MySqlRoutineLoaderWorker extends CommonRoutineLoaderWorker implements Rout
2727
/**
2828
* The maximum column size in bytes.
2929
*/
30-
const MAX_COLUMN_SIZE = 65532;
30+
const int MAX_COLUMN_SIZE = 65532;
3131

3232
/**
3333
* Maximum length of a char.
3434
*/
35-
const MAX_LENGTH_CHAR = 255;
35+
const int MAX_LENGTH_CHAR = 255;
3636

3737
/**
3838
* Maximum length of a varchar.
3939
*/
40-
const MAX_LENGTH_VARCHAR = 4096;
40+
const int MAX_LENGTH_VARCHAR = 4096;
4141

4242
/**
4343
* Maximum length of a binary.
4444
*/
45-
const MAX_LENGTH_BINARY = 255;
45+
const int MAX_LENGTH_BINARY = 255;
4646

4747
/**
4848
* Maximum length of a varbinary.
4949
*/
50-
const MAX_LENGTH_VARBINARY = 4096;
50+
const int MAX_LENGTH_VARBINARY = 4096;
5151

5252
/**
5353
* The metadata layer.

src/Loader/Helper/MySqlDataTypeHelper.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -420,7 +420,7 @@ public function escapePhpExpression(array $dataTypeInfo, string $expression): st
420420
break;
421421

422422
case 'list_of_int':
423-
$ret = "'.\$this->quoteListOfInt(".$expression.", '".addslashes($dataTypeInfo['delimiter'])."', '".addslashes($dataTypeInfo['enclosure'])."', '".addslashes($dataTypeInfo['escape'])."').'";
423+
$ret = "'.\$this->quoteListOfInt(".$expression.", \"".addslashes($dataTypeInfo['delimiter'])."\", \"".addslashes($dataTypeInfo['enclosure'])."\", \"".addslashes($dataTypeInfo['escape'])."\").'";
424424
break;
425425

426426
default:

src/Loader/MySqlRoutineLoader.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,12 @@ class MySqlRoutineLoader extends CommonRoutineLoader
2222
/**
2323
* MySQL's and MariaDB's SQL/PSM syntax.
2424
*/
25-
const SQL_PSM_SYNTAX = 1;
25+
const int SQL_PSM_SYNTAX = 1;
2626

2727
/**
2828
* Oracle PL/SQL syntax.
2929
*/
30-
const PL_SQL_SYNTAX = 2;
30+
const int PL_SQL_SYNTAX = 2;
3131

3232
/**
3333
* The default character set under which the stored routine will be loaded and run.

test/MySqlDataLayerTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ public function testReconnect()
154154
self::assertTrue(true);
155155

156156
// Reconnect when server has been gone.
157-
exec('sudo systemctl restart mysqld > /dev/null 2>&1 || sudo service mysql restart');
157+
exec('sudo systemctl restart mariadb');
158158
$dl->connectIfNotAlive();
159159
self::assertTrue(true);
160160

test/MySqlDefaultConnectorTest.php

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ public function testDisconnectConnectFailed(): void
3535
{
3636
$connector->connect();
3737
}
38-
catch (MySqlConnectFailedException $exception)
38+
catch (MySqlConnectFailedException)
3939
{
4040
// Ignore error.
4141
}
@@ -70,12 +70,12 @@ public function testDisconnectNoServer(): void
7070
$connector = new MySqlDefaultConnector('127.0.0.1', 'test', 'test', 'test');
7171
$connector->connect();
7272

73-
exec('sudo systemctl stop mysqld || sudo service mysql stop');
73+
exec('sudo systemctl stop mariadb');
7474

7575
$connector->disconnect();
7676
self::assertTrue(true);
7777

78-
exec('sudo systemctl start mysqld || sudo service mysql start');
78+
exec('sudo systemctl start mariadb');
7979
}
8080

8181
//--------------------------------------------------------------------------------------------------------------------
@@ -130,12 +130,13 @@ public function testIsAliveNoServer(): void
130130
$connector = new MySqlDefaultConnector('127.0.0.1', 'test', 'test', 'test');
131131
$connector->connect();
132132

133-
exec('sudo systemctl stop mysqld || sudo service mysql stop', $output, $code);
133+
exec('sudo systemctl stop mariadb');
134+
134135

135136
$isAlive = $connector->isAlive();
136137
self::assertFalse($isAlive);
137138

138-
exec('sudo systemctl start mysqld || sudo service mysql start');
139+
exec('sudo systemctl start mariadb');
139140
}
140141

141142
//--------------------------------------------------------------------------------------------------------------------

test/TestMySqlDataLayer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -496,7 +496,7 @@ public function tstTestInsertMultiple02(?array $rows): void
496496
*/
497497
public function tstTestListOfInt(array|string|null $pIds): array
498498
{
499-
$result = $this->query('call tst_test_list_of_int('.$this->quoteListOfInt($pIds, ',', '\"', '\\').')');
499+
$result = $this->query('call tst_test_list_of_int('.$this->quoteListOfInt($pIds, ",", "\"", "\\").')');
500500
$ret = [];
501501
while (($row = $result->fetch_array(MYSQLI_ASSOC)))
502502
{

test/etc/columns.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -727,7 +727,7 @@ information_schema.STATISTICS.TABLE_NAME 64
727727
information_schema.STATISTICS.NON_UNIQUE 19
728728
information_schema.STATISTICS.INDEX_SCHEMA 64
729729
information_schema.STATISTICS.INDEX_NAME 64
730-
information_schema.STATISTICS.SEQ_IN_INDEX 19
730+
information_schema.STATISTICS.SEQ_IN_INDEX 10
731731
information_schema.STATISTICS.COLUMN_NAME 64
732732
information_schema.STATISTICS.COLLATION 1
733733
information_schema.STATISTICS.CARDINALITY 19

0 commit comments

Comments
 (0)