Conversation
ab72120 to
5583766
Compare
There was a problem hiding this comment.
Pull Request Overview
Adds PHP 8.5 support to GitHub Actions test suite while maintaining compatibility with existing PHP versions. The changes update test files to work with PHP 8.5's stricter type handling and deprecated API changes.
- Adds PHP 8.5 to test matrices in GitHub Actions workflows
- Updates test files to use string literals instead of numeric constants for Decimal128 tests
- Removes deprecated
setAccessible(true)calls from reflection-based tests - Updates internal API calls to use current PHP 8.5 compatible functions
Reviewed Changes
Copilot reviewed 15 out of 15 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| .github/workflows/tests.yml | Adds PHP 8.5 to test matrix |
| .github/workflows/package-release.yml | Adds PHP 8.5 to Windows packaging matrix |
| .github/actions/windows/prepare-build/action.yml | Updates php/setup-php-sdk to v0.11 for PHP 8.5 support |
| src/contrib/php_array_api.h | Updates deprecated IS_INTERNED macro to ZSTR_IS_INTERNED |
| tests/server/server-construct-001.phpt | Changes (integer) cast to (int) |
| Multiple exception test files | Removes deprecated setAccessible(true) calls |
| Multiple BSON Decimal128 test files | Converts numeric literals to strings for constructor compatibility |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| - name: Setup PHP SDK | ||
| id: setup-php | ||
| uses: php/setup-php-sdk@v0.10 | ||
| uses: php/setup-php-sdk@v0.11 |
|
|
||
| $tests = [ | ||
| acos(8), | ||
| NAN, |
There was a problem hiding this comment.
Per our earlier Slack conversation, you opted to remove any Decimal128 test cases that depended on type-coercion. I have no objections here, as the documentation has always indicated that the constructor expects a string value.
I wasn't able to find any mention of the type-coercion behavioral change in PHP 8.5's UPGRADING file. If you happen to find the change responsible for this I'd be interested in seeing it.
There was a problem hiding this comment.
The offending commit is php/php-src@320fe29, which is the result of the large PHP 8.5 deprecation vote.
|
|
||
| $expectedHost = $parsed['host']; | ||
| $expectedPort = (integer) (isset($parsed['port']) ? $parsed['port'] : 27017); | ||
| $expectedPort = (int) (isset($parsed['port']) ? $parsed['port'] : 27017); |
There was a problem hiding this comment.
* v2.1: (48 commits) Back to -dev Package 2.1.4 PHPC-2637: Update to libmongoc 1.30.6 (#1882) (#1887) Back to -dev Package 2.1.3 Back to -dev Package 2.1.2 PHPC-2617: Support PHP 8.5 (#1871) PHPC-2613: Test x509 authentication on Atlas (#1858) Back to -dev Package 2.1.1 Back to -dev Package 2.1.0 PHPC-2555: Stop testing with MongoDB 4.0 (#1827) PHPC-2510 Install evergreen tools using git submodule (#1797) Bump to libmongoc 1.30.4 (#1822) Feature: Client Bulk Write (#1818) Mention Serializable/Unserializable types in upgrade guide (#1805) Back to -dev Package 2.0.0 ...
* v2.1: (50 commits) Back to -dev Package 2.1.5 Back to -dev Package 2.1.4 PHPC-2637: Update to libmongoc 1.30.6 (#1882) (#1887) Back to -dev Package 2.1.3 Back to -dev Package 2.1.2 PHPC-2617: Support PHP 8.5 (#1871) PHPC-2613: Test x509 authentication on Atlas (#1858) Back to -dev Package 2.1.1 Back to -dev Package 2.1.0 PHPC-2555: Stop testing with MongoDB 4.0 (#1827) PHPC-2510 Install evergreen tools using git submodule (#1797) Bump to libmongoc 1.30.4 (#1822) Feature: Client Bulk Write (#1818) Mention Serializable/Unserializable types in upgrade guide (#1805) ...
PHPC-2617
Adds testing and support for PHP 8.5, backporting the fix for
IS_INTERNEDfrom #1849.