Skip to content

Commit

Permalink
Merge v1.x into v2.x (#1487)
Browse files Browse the repository at this point in the history
  • Loading branch information
mongodb-php-bot authored Oct 16, 2024
2 parents dc098ce + 3a62df1 commit e7a5982
Show file tree
Hide file tree
Showing 6 changed files with 117 additions and 4 deletions.
6 changes: 3 additions & 3 deletions .evergreen/config/functions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -325,9 +325,9 @@ functions:
working_dir: "src"
script: |
${PREPARE_SHELL}
file="${PROJECT_DIRECTORY}/.evergreen/install-composer.sh"
# Don't use ${file} syntax here because evergreen treats it as an empty expansion.
[ -f "$file" ] && DEPENDENCIES=${DEPENDENCIES} bash $file || echo "$file not available, skipping"
DEPENDENCIES=${DEPENDENCIES} \
PHP_VERSION=${PHP_VERSION} \
bash ${PROJECT_DIRECTORY}/.evergreen/install-composer.sh
"start load balancer":
- command: shell.exec
Expand Down
5 changes: 4 additions & 1 deletion .evergreen/config/generate-config.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,15 @@

// Supported PHP versions. Add new versions to the beginning of the list
$supportedPhpVersions = [
'8.4',
'8.3',
'8.2',
'8.1',
];

$latestPhpVersion = max($supportedPhpVersions);
// TODO: use max() once PHP 8.4 is stable
//$latestPhpVersion = max($supportedPhpVersions);
$latestPhpVersion = '8.3';
$lowestPhpVersion = min($supportedPhpVersions);

// Supported MongoDB versions. Add new versions after "rapid"
Expand Down
38 changes: 38 additions & 0 deletions .evergreen/config/generated/build/build-extension.yml

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

61 changes: 61 additions & 0 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.

5 changes: 5 additions & 0 deletions .evergreen/install-composer.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,9 @@ php --ri mongodb

install_composer

# Remove psalm as it's not compatible with PHP 8.4: https://github.com/vimeo/psalm/pull/10928
if [ "$PHP_VERSION" == "8.4" ]; then
php composer.phar remove --no-update --dev vimeo/psalm
fi

php composer.phar update $COMPOSER_FLAGS
6 changes: 6 additions & 0 deletions tests/GridFS/BucketFunctionalTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -842,6 +842,9 @@ public function testDanglingOpenWritableStream(): void

$code = <<<'PHP'
require '%s';
// Don't report deprecations - if the issue exists this code will
// result in a fatal error
error_reporting(E_ALL & ~E_DEPRECATED & ~E_USER_DEPRECATED);
$client = MongoDB\Tests\FunctionalTestCase::createTestClient();
$database = $client->selectDatabase(getenv('MONGODB_DATABASE') ?: 'phplib_test');
$gridfs = $database->selectGridFSBucket();
Expand Down Expand Up @@ -882,6 +885,9 @@ public function testDanglingOpenWritableStreamWithGlobalStreamWrapperAlias(): vo

$code = <<<'PHP'
require '%s';
// Don't report deprecations - if the issue exists this code will
// result in a fatal error
error_reporting(E_ALL & ~E_DEPRECATED & ~E_USER_DEPRECATED);
$client = MongoDB\Tests\FunctionalTestCase::createTestClient();
$database = $client->selectDatabase(getenv('MONGODB_DATABASE') ?: 'phplib_test');
$database->selectGridFSBucket()->registerGlobalStreamWrapperAlias('alias');
Expand Down

0 comments on commit e7a5982

Please sign in to comment.