diff options
-rw-r--r-- | composer.json | 20 | ||||
-rw-r--r-- | php-yoast-phpunit-polyfills.spec | 37 |
2 files changed, 35 insertions, 22 deletions
diff --git a/composer.json b/composer.json index 637e74a..1631d83 100644 --- a/composer.json +++ b/composer.json @@ -26,8 +26,8 @@ "security": "https://github.com/Yoast/PHPUnit-Polyfills/security/policy" }, "require": { - "php": ">=5.4", - "phpunit/phpunit": "^4.8.36 || ^5.7.21 || ^6.0 || ^7.0 || ^8.0 || ^9.0" + "php": ">=5.6", + "phpunit/phpunit": "^5.7.21 || ^6.0 || ^7.0 || ^8.0 || ^9.0 || ^10.0" }, "require-dev": { "php-parallel-lint/php-console-highlighter": "^1.0.0", @@ -73,7 +73,7 @@ "@php ./vendor/php-parallel-lint/php-parallel-lint/parallel-lint . -e php --show-deprecated --exclude vendor --exclude .git --exclude tests/Polyfills/Fixtures/ValueObjectNoReturnType.php" ], "check-cs": [ - "@php ./vendor/squizlabs/php_codesniffer/bin/phpcs --runtime-set testVersion 5.4-" + "@php ./vendor/squizlabs/php_codesniffer/bin/phpcs --runtime-set testVersion 5.6-" ], "fix-cs": [ "@php ./vendor/squizlabs/php_codesniffer/bin/phpcbf" @@ -84,8 +84,11 @@ "coverage": [ "@php ./vendor/phpunit/phpunit/phpunit" ], - "coverage-local": [ - "@php ./vendor/phpunit/phpunit/phpunit --coverage-html ./build/coverage-html" + "test10": [ + "@php ./vendor/phpunit/phpunit/phpunit -c phpunit10.xml.dist --no-coverage" + ], + "coverage10": [ + "@php ./vendor/phpunit/phpunit/phpunit -c phpunit10.xml.dist" ] }, "scripts-descriptions": { @@ -96,8 +99,9 @@ "lint-gte84": "Check the PHP files for parse errors. (PHP 8.4+)", "check-cs": "Check the PHP files for code style violations and best practices.", "fix-cs": "Auto-fix code style violations in the PHP files.", - "test": "Run the unit tests without code coverage.", - "coverage": "Run the unit tests with code coverage.", - "coverage-local": "Run the unit tests with code coverage writing an HTML coverage report to a \"/build/coverage-html\" directory." + "test": "Run the unit tests without code coverage (PHPUnit < 10).", + "coverage": "Run the unit tests with code coverage (PHPUnit < 10).", + "test10": "Run the unit tests without code coverage using the PHPUnit 10 configuration file.", + "coverage10": "Run the unit tests with code coverage using the PHPUnit 10 configuration file." } } diff --git a/php-yoast-phpunit-polyfills.spec b/php-yoast-phpunit-polyfills.spec index 7660597..5b65bf8 100644 --- a/php-yoast-phpunit-polyfills.spec +++ b/php-yoast-phpunit-polyfills.spec @@ -7,7 +7,7 @@ # Please preserve changelog entries # # Github -%global gh_commit a0f7d708794a738f328d7b6c94380fd1d6c40446 +%global gh_commit 4a088f125c970d6d6ea52c927f96fe39b330d0f1 %global gh_short %(c=%{gh_commit}; echo ${c:0:7}) %global gh_owner Yoast %global gh_project PHPUnit-Polyfills @@ -18,12 +18,12 @@ %global ns_vendor Yoast %global ns_project PHPUnitPolyfills # don't change major version used in package name -%global major %nil +%global major 2 %bcond_without tests %global php_home %{_datadir}/php -Name: php-%{pk_vendor}-%{pk_project}%{major} -Version: 1.1.1 +Name: php-%{pk_vendor}-%{pk_project} +Version: 2.0.1 Release: 1%{?dist} Summary: Set of polyfills for changed PHPUnit functionality @@ -35,19 +35,20 @@ Source1: makesrc.sh BuildArch: noarch %if %{with tests} -BuildRequires: php(language) >= 5.4 +BuildRequires: php(language) >= 5.6 BuildRequires: php-reflection # From composer.json, "require-dev": { # "yoast/yoastcs": "^2.3.0" +BuildRequires: phpunit10 BuildRequires: phpunit9 BuildRequires: phpunit8 %endif BuildRequires: php-fedora-autoloader-devel # From composer.json, "require": { -# "php": ">=5.4", -# "phpunit/phpunit": "^4.8.36 || ^5.7.21 || ^6.0 || ^7.0 || ^8.0 || ^9.0" -Requires: php(language) >= 5.4 +# "php": ">=5.6", +# "phpunit/phpunit": "^5.7.21 || ^6.0 || ^7.0 || ^8.0 || ^9.0 || ^10.0" +Requires: php(language) >= 5.6 # from phpcompatinfo report on version 0.2.0 Requires: php-reflection @@ -91,9 +92,6 @@ EOF : Run upstream test suite ret=0 -if [ -x %{_bindir}/phpunit7 ]; then - %{_bindir}/phpunit7 --no-coverage || ret=1 -fi if [ -x %{_bindir}/phpunit8 ]; then for cmd in php php81 php82 php83; do if which $cmd; then @@ -102,20 +100,25 @@ if [ -x %{_bindir}/phpunit8 ]; then done fi if [ -x %{_bindir}/phpunit9 ]; then - for cmd in php php81 php82 php83; do + for cmd in php php81 php82 php83 php84; do if which $cmd; then $cmd %{_bindir}/phpunit9 --no-coverage || ret=1 fi done fi +if [ -x %{_bindir}/phpunit10 ]; then + for cmd in php php82 php83 php84; do + if which $cmd; then + $cmd %{_bindir}/phpunit10 --no-coverage || ret=1 + fi + done +fi exit $ret %endif %files -# remirepo:1 -%{!?_licensedir:%global license %%doc} %license LICENSE %doc *.md %doc composer.json @@ -123,6 +126,12 @@ exit $ret %changelog +* Fri Aug 30 2024 Remi Collet <remi@remirepo.net> - 2.0.1-1 +- update to 2.0.1 +- move to /usr/share/php/Yoast/PHPUnitPolyfills2 +- raise dependency on PHP 5.6 +- drop phpunit7, add phpunit10 + * Tue Apr 9 2024 Remi Collet <remi@remirepo.net> - 1.1.1-1 - update to 1.1.1 |