diff --git a/.github/workflows/cs.yml b/.github/workflows/cs.yml
index 2fb7ee0..5224897 100644
--- a/.github/workflows/cs.yml
+++ b/.github/workflows/cs.yml
@@ -25,7 +25,7 @@ jobs:
- name: Install PHP
uses: shivammathur/setup-php@v2
with:
- php-version: '7.4'
+ php-version: 'latest'
coverage: none
tools: cs2pr
diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml
index 8fe406d..44612e1 100644
--- a/.github/workflows/lint.yml
+++ b/.github/workflows/lint.yml
@@ -37,8 +37,9 @@ jobs:
ini-values: zend.assertions=1, error_reporting=-1, display_errors=On
coverage: none
- - name: 'Composer: remove PHPUnit (not needed for lint)'
- run: composer remove phpunit/phpunit --no-update --no-interaction
+ # YoastCS 3.0 has a PHP 7.2 minimum which conflicts with the requirements of this package.
+ - name: 'Composer: remove PHPUnit and YoastCS (not needed for lint)'
+ run: composer remove phpunit/phpunit yoast/yoastcs --no-update --no-interaction
# Install dependencies and handle caching in one go.
# @link https://github.com/marketplace/actions/install-php-dependencies-with-composer
diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
index 0369226..26270d6 100644
--- a/.github/workflows/test.yml
+++ b/.github/workflows/test.yml
@@ -104,6 +104,10 @@ jobs:
ini-values: zend.assertions=1, error_reporting=-1, display_errors=On
coverage: ${{ matrix.coverage == true && 'xdebug' || 'none' }}
+ # YoastCS 3.0 has a PHP 7.2 minimum which conflicts with the requirements of this package.
+ - name: 'Composer: remove YoastCS'
+ run: composer remove yoast/yoastcs --no-update --no-interaction
+
- name: 'Composer: set PHPUnit version for tests'
if: ${{ matrix.phpunit != 'auto' }}
run: composer require --no-update phpunit/phpunit:"${{ matrix.phpunit }}" --no-interaction
diff --git a/.phpcs.xml.dist b/.phpcs.xml.dist
index 96089f1..df41f1b 100644
--- a/.phpcs.xml.dist
+++ b/.phpcs.xml.dist
@@ -5,7 +5,7 @@
@@ -49,8 +49,18 @@
-
+
+
+
+
+
+
+
+
+
+
+
-
+
+
+ *\.php
+
+
+ /src/Polyfills/AssertObjectProperty\.php$
+
+
+ /src/Polyfills/AssertionRenames\.php$
+
+
/src/Helpers/ResourceHelper\.php$
- /src/Polyfills/AssertClosedResource*\.php$
/src/Helpers/ResourceHelper\.php$
- /src/Polyfills/AssertClosedResource*\.php$
@@ -136,11 +155,28 @@
/src/Polyfills/ExpectException\.php$
+
+
+
+
+ /tests/*/Fixtures/*\.php$
+
+
+
+
+ /tests/Polyfills/Fixtures/ValueObject*\.php$
+
+
/tests/*\.php$
+
+
+ /tests/*
+
+
/tests/TestCases/TestCaseTestTrait\.php$
diff --git a/composer.json b/composer.json
index db826c7..204ab23 100644
--- a/composer.json
+++ b/composer.json
@@ -30,7 +30,7 @@
"phpunit/phpunit": "^4.8.36 || ^5.7.21 || ^6.0 || ^7.0 || ^8.0 || ^9.0"
},
"require-dev": {
- "yoast/yoastcs": "^2.3.0"
+ "yoast/yoastcs": "^3.0.0"
},
"minimum-stability": "dev",
"prefer-stable": true,
diff --git a/tests/bootstrap.php b/tests/bootstrap.php
index 3ca3a3a..e4076ae 100644
--- a/tests/bootstrap.php
+++ b/tests/bootstrap.php
@@ -5,6 +5,7 @@
if ( \defined( '__PHPUNIT_PHAR__' ) ) {
require_once \dirname( __DIR__ ) . '/phpunitpolyfills-autoload.php';
+ // phpcs:disable Universal.FunctionDeclarations.NoLongClosures.ExceedsMaximum
\spl_autoload_register(
/**
* Custom PSR-4 based autoloader for test helper files.
@@ -32,6 +33,7 @@ static function ( $fqClassName ) {
return false;
}
);
+ // phpcs:enable
}
elseif ( \file_exists( \dirname( __DIR__ ) . '/vendor/autoload.php' ) ) {
/*