Skip to content

PHPLIB-1656: Stop testing with MongoDB 4.0 #1693

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

Merged
merged 2 commits into from
May 20, 2025
Merged
Show file tree
Hide file tree
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: 0 additions & 1 deletion .evergreen/config/generate-config.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
'5.0',
'4.4',
'4.2',
'4.0',
];

// Server versions
Expand Down
2 changes: 1 addition & 1 deletion .evergreen/config/generated/test-variant/lowest.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

64 changes: 32 additions & 32 deletions .evergreen/config/generated/test-variant/modern-php-full.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 8 additions & 8 deletions .evergreen/config/generated/test-variant/phpc.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

32 changes: 0 additions & 32 deletions .evergreen/config/generated/test/local.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .evergreen/config/templates/test-variant/lowest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@
- variant: "build-rhel80"
name: "build-php-%phpVersion%-lowest"
tasks:
- ".replicaset .local .4.0 !.csfle"
- ".replicaset .local .4.2 !.csfle"
16 changes: 8 additions & 8 deletions .evergreen/config/templates/test-variant/modern-php-full.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@
- variant: "build-debian12"
name: "build-php-%phpVersion%"
tasks:
- ".standalone .local !.csfle !.4.0 !.4.2 !.4.4 !.5.0 !.6.0"
- ".replicaset .local !.csfle !.4.0 !.4.2 !.4.4 !.5.0 !.6.0"
- ".sharded .local !.csfle !.4.0 !.4.2 !.4.4 !.5.0 !.6.0"
- ".loadbalanced .local !.csfle !.4.0 !.4.2 !.4.4 !.5.0 !.6.0"
- ".standalone .local !.csfle !.4.2 !.4.4 !.5.0 !.6.0"
- ".replicaset .local !.csfle !.4.2 !.4.4 !.5.0 !.6.0"
- ".sharded .local !.csfle !.4.2 !.4.4 !.5.0 !.6.0"
- ".loadbalanced .local !.csfle !.4.2 !.4.4 !.5.0 !.6.0"
- "test_serverless_task_group"
- "test_serverless_proxy_task_group"
- "test-atlas-data-lake"
Expand All @@ -34,10 +34,10 @@
name: "build-php-%phpVersion%"
tasks:
# Remember to add new major versions here as they are released
- ".standalone .local !.csfle !.4.0 !.4.2 !.4.4 !.7.0 !.8.0 !.rapid !.latest"
- ".replicaset .local !.csfle !.4.0 !.4.2 !.4.4 !.7.0 !.8.0 !.rapid !.latest"
- ".sharded .local !.csfle !.4.0 !.4.2 !.4.4 !.7.0 !.8.0 !.rapid !.latest"
- ".loadbalanced .local !.csfle !.4.0 !.4.2 !.4.4 !.7.0 !.8.0 !.rapid !.latest"
- ".standalone .local !.csfle !.4.2 !.4.4 !.7.0 !.8.0 !.rapid !.latest"
- ".replicaset .local !.csfle !.4.2 !.4.4 !.7.0 !.8.0 !.rapid !.latest"
- ".sharded .local !.csfle !.4.2 !.4.4 !.7.0 !.8.0 !.rapid !.latest"
- ".loadbalanced .local !.csfle !.4.2 !.4.4 !.7.0 !.8.0 !.rapid !.latest"

# Test versions < 5.0
- name: test-rhel80-php-%phpVersion%
Expand Down
16 changes: 8 additions & 8 deletions .evergreen/config/templates/test-variant/phpc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@
- variant: "build-debian12"
name: "build-php-%phpVersion%-next-stable"
tasks:
- ".standalone .local !.csfle !.4.0 !.4.2 !.4.4 !.5.0 !.6.0"
- ".replicaset .local !.csfle !.4.0 !.4.2 !.4.4 !.5.0 !.6.0"
- ".sharded .local !.csfle !.4.0 !.4.2 !.4.4 !.5.0 !.6.0"
- ".loadbalanced .local !.csfle !.4.0 !.4.2 !.4.4 !.5.0 !.6.0"
- ".standalone .local !.csfle !.4.2 !.4.4 !.5.0 !.6.0"
- ".replicaset .local !.csfle !.4.2 !.4.4 !.5.0 !.6.0"
- ".sharded .local !.csfle !.4.2 !.4.4 !.5.0 !.6.0"
- ".loadbalanced .local !.csfle !.4.2 !.4.4 !.5.0 !.6.0"
- "test_serverless_task_group"
- "test_serverless_proxy_task_group"
- "test-atlas-data-lake"
Expand All @@ -31,10 +31,10 @@
- variant: "build-debian12"
name: "build-php-%phpVersion%-next-minor"
tasks:
- ".standalone .local !.csfle !.4.0 !.4.2 !.4.4 !.5.0 !.6.0"
- ".replicaset .local !.csfle !.4.0 !.4.2 !.4.4 !.5.0 !.6.0"
- ".sharded .local !.csfle !.4.0 !.4.2 !.4.4 !.5.0 !.6.0"
- ".loadbalanced .local !.csfle !.4.0 !.4.2 !.4.4 !.5.0 !.6.0"
- ".standalone .local !.csfle !.4.2 !.4.4 !.5.0 !.6.0"
- ".replicaset .local !.csfle !.4.2 !.4.4 !.5.0 !.6.0"
- ".sharded .local !.csfle !.4.2 !.4.4 !.5.0 !.6.0"
- ".loadbalanced .local !.csfle !.4.2 !.4.4 !.5.0 !.6.0"
- "test_serverless_task_group"
- "test_serverless_proxy_task_group"
- "test-atlas-data-lake"
24 changes: 1 addition & 23 deletions tests/FunctionalTestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -215,10 +215,6 @@ protected function assertSameObjectId($expectedObjectId, $actualObjectId): void
*/
public function configureFailPoint(array|stdClass $command, ?Server $server = null): void
{
if (! $this->isFailCommandSupported()) {
$this->markTestSkipped('failCommand is only supported on mongod >= 4.0.0 and mongos >= 4.1.5.');
}

if (! $this->isFailCommandEnabled()) {
$this->markTestSkipped('The enableTestCommands parameter is not enabled.');
}
Expand Down Expand Up @@ -512,15 +508,7 @@ protected function skipIfTransactionsAreNotSupported(): void
}

if ($this->isShardedCluster()) {
if (version_compare($this->getFeatureCompatibilityVersion(), '4.2', '<')) {
$this->markTestSkipped('Transactions are only supported on FCV 4.2 or higher');
}

return;
}

if (version_compare($this->getFeatureCompatibilityVersion(), '4.0', '<')) {
$this->markTestSkipped('Transactions are only supported on FCV 4.0 or higher');
$this->markTestSkipped('Transactions are only supported on FCV 4.2 or higher');
}

if ($this->getServerStorageEngine() !== 'wiredTiger') {
Expand Down Expand Up @@ -698,16 +686,6 @@ private static function getUriWithoutMultipleMongoses(): string
return $uri;
}

/**
* Checks if the failCommand command is supported on this server version
*/
private function isFailCommandSupported(): bool
{
$minVersion = $this->isShardedCluster() ? '4.1.5' : '4.0.0';

return version_compare($this->getServerVersion(), $minVersion, '>=');
}

/**
* Checks if the failCommand command is enabled by checking the enableTestCommands parameter
*/
Expand Down
2 changes: 0 additions & 2 deletions tests/Operation/ExplainFunctionalTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -307,8 +307,6 @@ public function testUpdateOne($verbosity, $executionStatsExpected, $allPlansExec

public function testAggregate(): void
{
$this->skipIfServerVersion('<', '4.0.0', 'Explaining aggregate command requires server version >= 4.0');

$this->createFixtures(3);

// Use a $sort stage to ensure the aggregate does not get optimised to a query
Expand Down
Loading