diff --git a/.circleci/config.yml b/.circleci/config.yml index 26595516d84..dc17d40e89e 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,8 +1,5 @@ version: 2.1 -.constants: - - &ext-mongodb-version '1.6.1' - commands: clear-test-app-cache: steps: @@ -19,11 +16,6 @@ commands: - run: name: Disable xdebug PHP extension command: sudo rm /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini - install-mongodb-php-extension: - steps: - - install-php-extension-from-pecl: - extension_name: mongodb - extension_version: *ext-mongodb-version install-php-extension-from-pecl: parameters: extension_name: @@ -64,16 +56,6 @@ commands: - composer-{{ .Revision }} - composer-{{ .Branch }} - composer- - restore-mongodb-php-extension-build-cache: - parameters: - php_version: - description: PHP version (major.minor). - type: string - steps: - - restore-php-extension-build-cache: - extension_name: mongodb - extension_version: *ext-mongodb-version - php_version: << parameters.php_version >> restore-php-cs-fixer-cache: steps: - restore_cache: @@ -118,16 +100,6 @@ commands: paths: - ~/.composer/cache key: composer-{{ .Revision }}-{{ .BuildNum }} - save-mongodb-php-extension-build-cache: - parameters: - php_version: - description: PHP version (major.minor). - type: string - steps: - - save-php-extension-build-cache: - extension_name: mongodb - extension_version: *ext-mongodb-version - php_version: << parameters.php_version >> save-php-cs-fixer-cache: steps: - save_cache: @@ -231,11 +203,6 @@ jobs: working_directory: ~/api-platform/core steps: - checkout - - restore-mongodb-php-extension-build-cache: - php_version: << parameters.php_version >> - - install-mongodb-php-extension - - save-mongodb-php-extension-build-cache: - php_version: << parameters.php_version >> - disable-xdebug-php-extension - disable-php-memory-limit - restore-composer-cache diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 95eaa353273..eb9e890e61f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -8,7 +8,7 @@ env: COMPOSER_ALLOW_SUPERUSER: '1' # https://getcomposer.org/doc/03-cli.md#composer-allow-superuser COMPOSER_INSTALLER_COMMIT: fb22b78362d31c0d2bf516d1f8cdfd2745caa431 COVERAGE: '0' - EXT_MONGODB_VERSION: '1.6.1' + EXT_MONGODB_VERSION: '1.7.3' EXT_PCOV_VERSION: '1.0.6' jobs: diff --git a/.php_cs.dist b/.php_cs.dist index 70aed101ac4..cbd76a6fc83 100644 --- a/.php_cs.dist +++ b/.php_cs.dist @@ -13,7 +13,9 @@ HEADER; $finder = PhpCsFixer\Finder::create() ->in(__DIR__) - ->exclude('tests/Fixtures/app/var') + ->exclude([ + 'tests/Fixtures/app/var', + ]) ->append([ 'tests/Fixtures/app/console', ]); diff --git a/appveyor.yml b/appveyor.yml index 93956ef2a0b..2078f63bf7d 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -13,7 +13,7 @@ install: - ps: | $web = New-Object Net.WebClient $web.Headers.Add('user-agent', 'AppVeyor') - $web.DownloadFile('https://windows.php.net/downloads/pecl/releases/mongodb/1.6.1/php_mongodb-1.6.1-7.4-nts-vc15-x64.zip', 'c:\tools\php74\ext\php_mongodb.zip') + $web.DownloadFile('https://windows.php.net/downloads/pecl/releases/mongodb/1.7.3/php_mongodb-1.7.3-7.4-nts-vc15-x64.zip', 'c:\tools\php74\ext\php_mongodb.zip') - 7z x php_mongodb.zip -y >nul - cd .. - copy php.ini-production php.ini /Y diff --git a/composer.json b/composer.json index be76ba6139a..50881a950ef 100644 --- a/composer.json +++ b/composer.json @@ -86,6 +86,7 @@ "symfony/validator": "^3.4 || ^4.0 || ^5.0", "symfony/web-profiler-bundle": "^4.2 || ^5.0", "symfony/yaml": "^3.4 || ^4.0 || ^5.0", + "teohhanhui/stubs-mongodb": "@dev", "twig/twig": "^1.42.3 || ^2.12", "webonyx/graphql-php": ">=0.13.1 <1.0" }, @@ -119,6 +120,12 @@ "ApiPlatform\\Core\\Tests\\": "tests/" } }, + "repositories": [ + { + "type": "vcs", + "url": "https://github.com/teohhanhui/stubs-mongodb" + } + ], "config": { "preferred-install": { "*": "dist"