Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support PHP 8.1 #150

Merged
merged 1 commit into from
Dec 6, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -11,6 +11,7 @@ jobs:
strategy:
matrix:
php:
- 8.1
- 8.0
- 7.4
- 7.3
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -9,7 +9,7 @@
"react/event-loop": "^1.2",
"react/promise": "^2.7",
"react/promise-stream": "^1.1",
"react/promise-timer": "^1.5",
"react/promise-timer": "^1.8",
"react/socket": "^1.9"
},
"require-dev": {
10 changes: 2 additions & 8 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
@@ -2,17 +2,11 @@

<!-- PHPUnit configuration file with new format for PHPUnit 9.3+ -->
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
backupGlobals="false"
backupStaticAttributes="false"
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd"
bootstrap="vendor/autoload.php"
cacheResult="false"
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
colors="true"
processIsolation="false"
stopOnFailure="false"
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd">
convertDeprecationsToExceptions="true">
<testsuites>
<testsuite name="React.MySQL Test Suite">
<directory>./tests/</directory>
11 changes: 2 additions & 9 deletions phpunit.xml.legacy
Original file line number Diff line number Diff line change
@@ -2,16 +2,9 @@

<!-- PHPUnit configuration file with old format for PHPUnit 9.2 or older -->
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
backupGlobals="false"
backupStaticAttributes="false"
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/4.8/phpunit.xsd"
bootstrap="vendor/autoload.php"
colors="true"
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
processIsolation="false"
stopOnFailure="false"
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/4.8/phpunit.xsd">
colors="true">
<testsuites>
<testsuite name="React.MySQL Test Suite">
<directory>./tests/</directory>
2 changes: 1 addition & 1 deletion src/Io/LazyConnection.php
Original file line number Diff line number Diff line change
@@ -34,7 +34,7 @@ class LazyConnection extends EventEmitter implements ConnectionInterface
public function __construct(Factory $factory, $uri, LoopInterface $loop)
{
$args = [];
\parse_str(\parse_url($uri, \PHP_URL_QUERY), $args);
\parse_str((string) \parse_url($uri, \PHP_URL_QUERY), $args);
if (isset($args['idle'])) {
$this->idlePeriod = (float)$args['idle'];
}
2 changes: 1 addition & 1 deletion tests/ResultQueryTest.php
Original file line number Diff line number Diff line change
@@ -68,7 +68,7 @@ public function testSelectStaticValueWillBeReturnedAsIs($value)
*/
public function testSelectStaticValueWillBeReturnedAsIsWithNoBackslashEscapesSqlMode($value)
{
if (strpos($value, '\\') !== false) {
if ($value !== null && strpos($value, '\\') !== false) {
// TODO: strings such as '%\\' work as-is when string contains percent?!
$this->markTestIncomplete('Escaping backslash not supported when using NO_BACKSLASH_ESCAPES SQL mode');
}