From eb78e87135e3ab39e4277e3f32708276f2205215 Mon Sep 17 00:00:00 2001 From: jrfnl Date: Wed, 18 Aug 2021 19:00:53 +0200 Subject: [PATCH 1/2] PHPUnit: move environment variable into PHPUnit config file ... to make it easier on contributors to get the tests running locally with the current setup. Also includes: * Adding the typical PHPUnit 8/9 cache file to `.gitignore`. * Adding information on how to get the tests running locally on PHP 8.0/8.1 to the CONTRIBUTING file. --- .github/CONTRIBUTING.md | 14 +++++++++++--- .github/workflows/continuous-integration.yml | 1 - .gitignore | 1 + phpunit.xml.dist | 1 + tests/complete.phpunit.xml | 1 + 5 files changed, 14 insertions(+), 4 deletions(-) diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index 7f161bd79aaf..c6482d993e80 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -42,9 +42,17 @@ To achieve this, you need to acquire the Composer source code: 3. Run Composer to get the dependencies: `cd composer && php ../composer.phar install` You can run the test suite by executing `vendor/bin/simple-phpunit` when inside the -composer directory, and run Composer by executing the `bin/composer`. To test -your modified Composer code against another project, run `php -/path/to/composer/bin/composer` inside that project's directory. +composer directory, and run Composer by executing the `bin/composer`. + +For running the tests against the most recent PHP versions (PHP 8.0/8.1), you will +need to run `composer config platform.php --unset && composer update --ignore-platform-reqs` +before running the `vendor/bin/simple-phpunit` command. +If that still doesn't work, try running +`composer require --dev "symfony/phpunit-bridge:~5.2" --update-with-dependencies` and +then running the `vendor/bin/simple-phpunit` command again. + +To test your modified Composer code against another project, run +`php /path/to/composer/bin/composer` inside that project's directory. Contributing policy ------------------- diff --git a/.github/workflows/continuous-integration.yml b/.github/workflows/continuous-integration.yml index cfb4b4d8405f..2b6e4bc12d2e 100644 --- a/.github/workflows/continuous-integration.yml +++ b/.github/workflows/continuous-integration.yml @@ -12,7 +12,6 @@ env: COMPOSER_FLAGS: "--ansi --no-interaction --no-progress --prefer-dist" COMPOSER_UPDATE_FLAGS: "" COMPOSER_TESTS_ARE_RUNNING: "1" - SYMFONY_PHPUNIT_REMOVE_RETURN_TYPEHINT: "1" jobs: tests: diff --git a/.gitignore b/.gitignore index aada402fa15c..0b1fb77c0e15 100644 --- a/.gitignore +++ b/.gitignore @@ -4,6 +4,7 @@ /composer.phar /vendor /nbproject +.phpunit.result.cache phpunit.xml .vagrant Vagrantfile diff --git a/phpunit.xml.dist b/phpunit.xml.dist index dd72dd5ee4fa..b80db70b0dce 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -16,6 +16,7 @@ > + diff --git a/tests/complete.phpunit.xml b/tests/complete.phpunit.xml index 14b2de0939dc..e60a38d5bba0 100644 --- a/tests/complete.phpunit.xml +++ b/tests/complete.phpunit.xml @@ -16,6 +16,7 @@ > + From 2f704398b230862b2e6025233002f8d84f6b426f Mon Sep 17 00:00:00 2001 From: Jordi Boggiano Date: Thu, 19 Aug 2021 13:16:25 +0200 Subject: [PATCH 2/2] Update .github/CONTRIBUTING.md --- .github/CONTRIBUTING.md | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index c6482d993e80..66be5eae82f0 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -45,11 +45,8 @@ You can run the test suite by executing `vendor/bin/simple-phpunit` when inside composer directory, and run Composer by executing the `bin/composer`. For running the tests against the most recent PHP versions (PHP 8.0/8.1), you will -need to run `composer config platform.php --unset && composer update --ignore-platform-reqs` -before running the `vendor/bin/simple-phpunit` command. -If that still doesn't work, try running -`composer require --dev "symfony/phpunit-bridge:~5.2" --update-with-dependencies` and -then running the `vendor/bin/simple-phpunit` command again. +need to run `composer update --ignore-platform-reqs && git checkout composer.lock` before running +the `vendor/bin/simple-phpunit` command. To test your modified Composer code against another project, run `php /path/to/composer/bin/composer` inside that project's directory.