summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2025-02-10 08:46:38 +0100
committerRemi Collet <remi@php.net>2025-02-10 08:46:38 +0100
commitbdabb99161a6c508c95c5b17075a8e039b4c4539 (patch)
tree1679e2f9c20216c697bac980614a9c688d0e8774
parentb7990f0b4f568719f7f27aedac230a820caf3f74 (diff)
update to 4.0.0HEADmaster
move to /usr/share/php/Yoast/PHPUnitPolyfills4 raise dependency on PHP 7.1 add phpunit12
-rw-r--r--composer.json38
-rw-r--r--php-yoast-phpunit-polyfills.spec31
2 files changed, 42 insertions, 27 deletions
diff --git a/composer.json b/composer.json
index ba28086..043a53f 100644
--- a/composer.json
+++ b/composer.json
@@ -26,8 +26,8 @@
"security": "https://github.com/Yoast/PHPUnit-Polyfills/security/policy"
},
"require": {
- "php": ">=7.0",
- "phpunit/phpunit": "^6.4.4 || ^7.0 || ^8.0 || ^9.0 || ^11.0"
+ "php": ">=7.1",
+ "phpunit/phpunit": "^7.5 || ^8.0 || ^9.0 || ^11.0 || ^12.0"
},
"require-dev": {
"php-parallel-lint/php-console-highlighter": "^1.0.0",
@@ -54,24 +54,18 @@
},
"extra": {
"branch-alias": {
- "dev-main": "3.x-dev"
+ "dev-main": "4.x-dev"
}
},
"scripts": {
"lint7": [
"@php ./vendor/php-parallel-lint/php-parallel-lint/parallel-lint . -e php --show-deprecated --exclude vendor --exclude .git --exclude tests/Polyfills/Fixtures/ValueObjectUnion.php --exclude tests/Polyfills/Fixtures/ValueObjectUnionReturnType.php"
],
- "lint70": [
- "@php ./vendor/php-parallel-lint/php-parallel-lint/parallel-lint . -e php --show-deprecated --exclude vendor --exclude .git --exclude src/Exceptions/Error.php --exclude src/Exceptions/TypeError.php --exclude tests/Polyfills/Fixtures/ValueObjectParamNotRequired.php --exclude tests/Polyfills/Fixtures/ValueObjectNullableReturnType.php --exclude tests/Polyfills/Fixtures/ValueObjectUnion.php --exclude tests/Polyfills/Fixtures/ValueObjectUnionReturnType.php"
- ],
"lint-gte80": [
"@php ./vendor/php-parallel-lint/php-parallel-lint/parallel-lint . -e php --show-deprecated --exclude vendor --exclude .git"
],
- "lint-gte84": [
- "@php ./vendor/php-parallel-lint/php-parallel-lint/parallel-lint . -e php --show-deprecated --exclude vendor --exclude .git"
- ],
"check-cs": [
- "@php ./vendor/squizlabs/php_codesniffer/bin/phpcs --runtime-set testVersion 7.0-"
+ "@php ./vendor/squizlabs/php_codesniffer/bin/phpcs --runtime-set testVersion 7.1-"
],
"fix-cs": [
"@php ./vendor/squizlabs/php_codesniffer/bin/phpcbf"
@@ -82,23 +76,29 @@
"coverage": [
"@php ./vendor/phpunit/phpunit/phpunit"
],
- "test10": [
- "@php ./vendor/phpunit/phpunit/phpunit -c phpunit10.xml.dist --no-coverage"
+ "test11": [
+ "@php ./vendor/phpunit/phpunit/phpunit -c phpunit11.xml.dist --no-coverage"
+ ],
+ "coverage11": [
+ "@php ./vendor/phpunit/phpunit/phpunit -c phpunit11.xml.dist"
+ ],
+ "test12": [
+ "@php ./vendor/phpunit/phpunit/phpunit -c phpunit12.xml.dist --no-coverage"
],
- "coverage10": [
- "@php ./vendor/phpunit/phpunit/phpunit -c phpunit10.xml.dist"
+ "coverage12": [
+ "@php ./vendor/phpunit/phpunit/phpunit -c phpunit12.xml.dist"
]
},
"scripts-descriptions": {
"lint7": "Check the PHP files for parse errors. (PHP 7.1 - 7.4)",
- "lint70": "Check the PHP files for parse errors. (PHP 7.0)",
- "lint-gte80": "Check the PHP files for parse errors. (PHP 8.0 - 8.3)",
- "lint-gte84": "Check the PHP files for parse errors. (PHP 8.4+)",
+ "lint-gte80": "Check the PHP files for parse errors. (PHP 8.0+)",
"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 (PHPUnit < 10).",
"coverage": "Run the unit tests with code coverage (PHPUnit < 10).",
- "test10": "Run the unit tests without code coverage using the PHPUnit 10/11 configuration file.",
- "coverage10": "Run the unit tests with code coverage using the PHPUnit 10/11 configuration file."
+ "test11": "Run the unit tests without code coverage using the PHPUnit 11 configuration file.",
+ "coverage11": "Run the unit tests with code coverage using the PHPUnit 11 configuration file.",
+ "test12": "Run the unit tests without code coverage using the PHPUnit 12 configuration file.",
+ "coverage12": "Run the unit tests with code coverage using the PHPUnit 12 configuration file."
}
}
diff --git a/php-yoast-phpunit-polyfills.spec b/php-yoast-phpunit-polyfills.spec
index b586132..7ec18af 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 59b3f8ffa2eab9c8258e8638d97c3e37fac9a80e
+%global gh_commit 134921bfca9b02d8f374c48381451da1d98402f9
%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 3
+%global major 4
%bcond_without tests
%global php_home %{_datadir}/php
Name: php-%{pk_vendor}-%{pk_project}
-Version: 3.1.0
+Version: 4.0.0
Release: 1%{?dist}
Summary: Set of polyfills for changed PHPUnit functionality, version %{major}
@@ -35,12 +35,14 @@ Source1: makesrc.sh
BuildArch: noarch
%if %{with tests}
-BuildRequires: php(language) >= 7.0
+BuildRequires: php(language) >= 7.1
BuildRequires: php-reflection
# From composer.json, "require-dev": {
# "yoast/yoastcs": "^2.3.0"
-# remirepo:1
+%if 0%{?fedora} >= 40 || 0%{?rhel} >= 10
+BuildRequires: phpunit12
BuildRequires: phpunit11
+%endif
# phpunit10 is not supported
BuildRequires: phpunit9
BuildRequires: phpunit8
@@ -48,9 +50,9 @@ BuildRequires: phpunit8
BuildRequires: php-fedora-autoloader-devel
# From composer.json, "require": {
-# "php": ">=7.0",
-# "phpunit/phpunit": "^6.4.4 || ^7.0 || ^8.0 || ^9.0 || ^11.0"
-Requires: php(language) >= 7.0
+# "php": ">=7.1",
+# "phpunit/phpunit": "^7.5 || ^8.0 || ^9.0 || ^11.0 || ^12.0"
+Requires: php(language) >= 7.1
# from phpcompatinfo report on version 0.2.0
Requires: php-reflection
@@ -115,6 +117,13 @@ if [ -x %{_bindir}/phpunit11 ]; then
fi
done
fi
+if [ -x %{_bindir}/phpunit12 ]; then
+ for cmd in php php83 php84; do
+ if which $cmd; then
+ $cmd %{_bindir}/phpunit11 --no-coverage || ret=1
+ fi
+ done
+fi
exit $ret
%endif
@@ -128,6 +137,12 @@ exit $ret
%changelog
+* Mon Feb 10 2025 Remi Collet <remi@remirepo.net> - 4.0.0-1
+- update to 4.0.0
+- move to /usr/share/php/Yoast/PHPUnitPolyfills4
+- raise dependency on PHP 7.1
+- add phpunit12
+
* Thu Jan 9 2025 Remi Collet <remi@remirepo.net> - 3.1.0-1
- update to 3.1.0
- re-license spec file to CECILL-2.1