Remove tests that only ran on PHP 7 and clean up version-specific SKIPIFs#1986
Open
GromNaN wants to merge 1 commit intomongodb:v2.xfrom
Open
Remove tests that only ran on PHP 7 and clean up version-specific SKIPIFs#1986GromNaN wants to merge 1 commit intomongodb:v2.xfrom
GromNaN wants to merge 1 commit intomongodb:v2.xfrom
Conversation
PHP 8.1 is the minimum supported version. Tests with
skip_if_php_version('>=', '7.99') are permanently skipped and can be
removed. Their PHP 8 counterparts (where applicable) remain in place.
Also remove the now-unnecessary skip_if_php_version('<', '7.99') from
session-startTransaction_error-005.phpt, which always runs on PHP 8.1+.
Replace skip_if_php_version('>=', '8.1.99') with the explicit '8.2'
version in bug1598-002 tests; '8.1.99' was used as a pre-release
placeholder when PHP 8.2 was not yet released.
There was a problem hiding this comment.
Pull request overview
Removes legacy PHPT tests and SKIPIF conditionals that only applied to PHP 7, aligning the test suite with the project’s PHP 8.1+ support policy (since v1.17).
Changes:
- Deleted PHPT tests that were explicitly skipped on PHP 8 and only executed on PHP 7.
- Simplified PHP-version SKIPIF checks for PHPC-1598 tests by switching from
8.1.99to8.2. - Updated one session test description and removed PHP 7-specific skips/comments now that PHP 7 is out of scope.
Reviewed changes
Copilot reviewed 22 out of 22 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| tests/writeConcern/writeconcern-ctor_error-001.phpt | Removes a PHP 7-only constructor argument-count error test. |
| tests/writeConcern/bug1598-002.phpt | Simplifies PHP version SKIPIF to skip on PHP ≥ 8.2. |
| tests/session/session-startTransaction_error-005.phpt | Drops PHP 7 gating and PHP 8-only wording; test now applies generally to supported versions. |
| tests/session/session-startTransaction_error-004.phpt | Removes a PHP 7-only TypeError behavior test. |
| tests/server/server-errors.phpt | Removes a PHP 7-only server method argument-count error test. |
| tests/readPreference/bug1598-002.phpt | Simplifies PHP version SKIPIF to skip on PHP ≥ 8.2. |
| tests/readConcern/readconcern-ctor_error-002.phpt | Removes a PHP 7-only constructor type-validation test. |
| tests/readConcern/readconcern-ctor_error-001.phpt | Removes a PHP 7-only constructor argument-count error test. |
| tests/readConcern/bug1598-002.phpt | Simplifies PHP version SKIPIF to skip on PHP ≥ 8.2. |
| tests/manager/manager-ctor_error-001.phpt | Removes a PHP 7-only manager constructor argument-count error test. |
| tests/cursor/bug1050-002.phpt | Removes a PHP 7-only cursor behavior test that was skipped on PHP 8. |
| tests/bson/bug1598-002.phpt | Simplifies PHP version SKIPIF to skip on PHP ≥ 8.2. |
| tests/bson/bson-timestamp_error-001.phpt | Removes a PHP 7-only Timestamp argument-count error test. |
| tests/bson/bson-regex_error-001.phpt | Removes a PHP 7-only Regex argument-count error test. |
| tests/bson/bson-objectid_error-001.phpt | Removes a PHP 7-only ObjectId constructor type-validation test. |
| tests/bson/bson-objectid-tostring_error-001.phpt | Removes a PHP 7-only ObjectId __toString argument error test. |
| tests/bson/bson-objectid-001.phpt | Removes a PHP 7-only ObjectId roundtrip/validation test. |
| tests/bson/bson-javascript_error-001.phpt | Removes a PHP 7-only Javascript argument-count error test. |
| tests/bson/bson-decimal128_error-001.phpt | Removes a PHP 7-only Decimal128 validation/error test. |
| tests/bson/bson-binary_error-005.phpt | Removes a PHP 7-only Binary vector argument-count error test. |
| tests/bson/bson-binary_error-001.phpt | Removes a PHP 7-only Binary argument-count error test. |
| tests/apm/bug0950-002.phpt | Removes a PHP 7-only APM regression test that was skipped on PHP 8. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PHP 8.1 is the minimum supported version since v1.17.