diff --git a/.github/actions/windows/prepare-build/action.yml b/.github/actions/windows/prepare-build/action.yml index fe9236fbd..889e9383c 100644 --- a/.github/actions/windows/prepare-build/action.yml +++ b/.github/actions/windows/prepare-build/action.yml @@ -22,7 +22,7 @@ runs: steps: - name: Setup PHP SDK id: setup-php - uses: php/setup-php-sdk@v0.10 + uses: php/setup-php-sdk@v0.11 with: version: ${{ inputs.version }} arch: ${{ inputs.arch }} diff --git a/.github/workflows/package-release.yml b/.github/workflows/package-release.yml index b9e91915c..ef6fd319f 100644 --- a/.github/workflows/package-release.yml +++ b/.github/workflows/package-release.yml @@ -98,6 +98,6 @@ jobs: fail-fast: false matrix: # Note: keep this in sync with the Windows matrix in tests.yml - php: [ "8.1", "8.2", "8.3", "8.4" ] + php: [ "8.1", "8.2", "8.3", "8.4", "8.5" ] arch: [ x64, x86 ] ts: [ ts, nts ] diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index ac706fa3e..a39d48a81 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -25,6 +25,7 @@ jobs: - "8.2" - "8.3" - "8.4" + - "8.5" mongodb-version: - "6.0" topology: @@ -125,6 +126,6 @@ jobs: fail-fast: false matrix: # Note: keep this in sync with the Windows matrix in package-release.yml - php: [ "8.1", "8.2", "8.3", "8.4" ] + php: [ "8.1", "8.2", "8.3", "8.4", "8.5" ] arch: [ x64, x86 ] ts: [ ts, nts ] diff --git a/src/contrib/php_array_api.h b/src/contrib/php_array_api.h index 5a973375a..5e88c5c74 100644 --- a/src/contrib/php_array_api.h +++ b/src/contrib/php_array_api.h @@ -350,7 +350,7 @@ char *php_array_zval_to_string(zval *z, int *plen, zend_bool *pfree) { zval c = *z; zval_copy_ctor(&c); convert_to_string(&c); - *pfree = ! IS_INTERNED(Z_STR(c)); + *pfree = ! ZSTR_IS_INTERNED(Z_STR(c)); *plen = Z_STRLEN(c); return Z_STRVAL(c); } diff --git a/tests/bson/bson-decimal128-002.phpt b/tests/bson/bson-decimal128-002.phpt index 6c0bdbb37..60286d84a 100644 --- a/tests/bson/bson-decimal128-002.phpt +++ b/tests/bson/bson-decimal128-002.phpt @@ -4,8 +4,6 @@ MongoDB\BSON\Decimal128 NaN values getProperty('errorLabels'); -$resultDocumentProperty->setAccessible(true); $resultDocumentProperty->setValue($exception, $labels); var_dump($exception->hasErrorLabel('foo')); diff --git a/tests/exception/bulkwriteexception-haserrorlabel_error-001.phpt b/tests/exception/bulkwriteexception-haserrorlabel_error-001.phpt index 229f50b1f..17d806d05 100644 --- a/tests/exception/bulkwriteexception-haserrorlabel_error-001.phpt +++ b/tests/exception/bulkwriteexception-haserrorlabel_error-001.phpt @@ -9,7 +9,6 @@ $labels = 'shouldBeAnArray'; $reflection = new ReflectionClass($exception); $resultDocumentProperty = $reflection->getProperty('errorLabels'); -$resultDocumentProperty->setAccessible(true); $resultDocumentProperty->setValue($exception, $labels); var_dump($exception->hasErrorLabel('bar')); diff --git a/tests/exception/commandexception-getresultdocument-001.phpt b/tests/exception/commandexception-getresultdocument-001.phpt index 40c8989f7..501a75b89 100644 --- a/tests/exception/commandexception-getresultdocument-001.phpt +++ b/tests/exception/commandexception-getresultdocument-001.phpt @@ -9,7 +9,6 @@ $resultDocument = (object) ['x' => 1]; $reflection = new ReflectionClass($exception); $resultDocumentProperty = $reflection->getProperty('resultDocument'); -$resultDocumentProperty->setAccessible(true); $resultDocumentProperty->setValue($exception, $resultDocument); var_dump($resultDocument === $exception->getResultDocument()); diff --git a/tests/exception/commandexception-haserrorlabel-001.phpt b/tests/exception/commandexception-haserrorlabel-001.phpt index 0a3389662..7c33f1210 100644 --- a/tests/exception/commandexception-haserrorlabel-001.phpt +++ b/tests/exception/commandexception-haserrorlabel-001.phpt @@ -9,7 +9,6 @@ $labels = ['test', 'foo']; $reflection = new ReflectionClass($exception); $resultDocumentProperty = $reflection->getProperty('errorLabels'); -$resultDocumentProperty->setAccessible(true); $resultDocumentProperty->setValue($exception, $labels); var_dump($exception->hasErrorLabel('foo')); diff --git a/tests/exception/commandexception-haserrorlabel_error-001.phpt b/tests/exception/commandexception-haserrorlabel_error-001.phpt index ea3241480..2631d6939 100644 --- a/tests/exception/commandexception-haserrorlabel_error-001.phpt +++ b/tests/exception/commandexception-haserrorlabel_error-001.phpt @@ -9,7 +9,6 @@ $labels = 'shouldBeAnArray'; $reflection = new ReflectionClass($exception); $resultDocumentProperty = $reflection->getProperty('errorLabels'); -$resultDocumentProperty->setAccessible(true); $resultDocumentProperty->setValue($exception, $labels); var_dump($exception->hasErrorLabel('bar')); diff --git a/tests/exception/runtimeexception-haserrorlabel-001.phpt b/tests/exception/runtimeexception-haserrorlabel-001.phpt index c9283045d..7918b564b 100644 --- a/tests/exception/runtimeexception-haserrorlabel-001.phpt +++ b/tests/exception/runtimeexception-haserrorlabel-001.phpt @@ -9,7 +9,6 @@ $labels = ['test', 'foo']; $reflection = new ReflectionClass($exception); $resultDocumentProperty = $reflection->getProperty('errorLabels'); -$resultDocumentProperty->setAccessible(true); $resultDocumentProperty->setValue($exception, $labels); var_dump($exception->hasErrorLabel('foo')); diff --git a/tests/exception/runtimeexception-haserrorlabel_error-001.phpt b/tests/exception/runtimeexception-haserrorlabel_error-001.phpt index d9de912d0..95760aad7 100644 --- a/tests/exception/runtimeexception-haserrorlabel_error-001.phpt +++ b/tests/exception/runtimeexception-haserrorlabel_error-001.phpt @@ -9,7 +9,6 @@ $labels = 'shouldBeAnArray'; $reflection = new ReflectionClass($exception); $resultDocumentProperty = $reflection->getProperty('errorLabels'); -$resultDocumentProperty->setAccessible(true); $resultDocumentProperty->setValue($exception, $labels); var_dump($exception->hasErrorLabel('bar')); diff --git a/tests/server/server-construct-001.phpt b/tests/server/server-construct-001.phpt index 5c726c674..98c1f482c 100644 --- a/tests/server/server-construct-001.phpt +++ b/tests/server/server-construct-001.phpt @@ -20,7 +20,7 @@ $bulk->insert(array('foo' => 'bar')); $server = $manager->executeBulkWrite(NS, $bulk)->getServer(); $expectedHost = $parsed['host']; -$expectedPort = (integer) (isset($parsed['port']) ? $parsed['port'] : 27017); +$expectedPort = (int) (isset($parsed['port']) ? $parsed['port'] : 27017); var_dump($server->getHost() == $expectedHost); var_dump($server->getPort() == $expectedPort);