diff options
| author | Remi Collet <remi@remirepo.net> | 2026-02-10 10:17:00 +0100 |
|---|---|---|
| committer | Remi Collet <remi@php.net> | 2026-02-10 10:17:00 +0100 |
| commit | 0a7c7544d623103d91d9ec1f5321fec1cc20d027 (patch) | |
| tree | 75fc1e61b02b24060c2837f992de39d3ef738792 | |
| parent | 79c561029f404b7ce05f6c317777417cee898bba (diff) | |
allow phpunit13
| -rw-r--r-- | composer.json | 10 | ||||
| -rw-r--r-- | php-phpspec-prophecy.spec | 50 |
2 files changed, 43 insertions, 17 deletions
diff --git a/composer.json b/composer.json index 81cbe6e..99493fe 100644 --- a/composer.json +++ b/composer.json @@ -20,17 +20,17 @@ "require": { "php": "8.2.* || 8.3.* || 8.4.* || 8.5.*", "phpdocumentor/reflection-docblock": "^5.2", - "sebastian/comparator": "^3.0 || ^4.0 || ^5.0 || ^6.0 || ^7.0", + "sebastian/comparator": "^3.0 || ^4.0 || ^5.0 || ^6.0 || ^7.0 || ^8.0", "doctrine/instantiator": "^1.2 || ^2.0", - "sebastian/recursion-context": "^3.0 || ^4.0 || ^5.0 || ^6.0 || ^7.0", + "sebastian/recursion-context": "^3.0 || ^4.0 || ^5.0 || ^6.0 || ^7.0 || ^8.0", "symfony/deprecation-contracts": "^2.5 || ^3.1" }, "require-dev": { - "friendsofphp/php-cs-fixer": "^3.88", + "php-cs-fixer/shim": "^3.93.1", "phpspec/phpspec": "^6.0 || ^7.0 || ^8.0", - "phpstan/phpstan": "^2.1.13", - "phpunit/phpunit": "^11.0 || ^12.0" + "phpstan/phpstan": "^2.1.13, <2.1.34 || ^2.1.39", + "phpunit/phpunit": "^11.0 || ^12.0 || ^13.0" }, "autoload": { diff --git a/php-phpspec-prophecy.spec b/php-phpspec-prophecy.spec index 81f6a35..9f8522c 100644 --- a/php-phpspec-prophecy.spec +++ b/php-phpspec-prophecy.spec @@ -6,7 +6,7 @@ # # Please, preserve the changelog entries # -%global gh_commit a24f1bda2d00a03877f7f99d9e6b150baf543f6d +%global gh_commit 7ab965042096282307992f1b9abff020095757f0 %global gh_short %(c=%{gh_commit}; echo ${c:0:7}) %global gh_owner phpspec %global gh_project prophecy @@ -15,8 +15,8 @@ %bcond_with phpspec Name: php-phpspec-prophecy -Version: 1.24.0 -Release: 2%{?dist} +Version: 1.25.0 +Release: 1%{?dist} Summary: Highly opinionated mocking framework for PHP License: MIT @@ -28,8 +28,9 @@ BuildArch: noarch BuildRequires: php(language) >= 8.2 %if %{with tests} BuildRequires: (php-composer(phpdocumentor/reflection-docblock) >= 5.2 with php-composer(phpdocumentor/reflection-docblock) < 6) -BuildRequires: (php-composer(sebastian/comparator) >= 3.0 with php-composer(sebastian/comparator) < 8) -BuildRequires: (php-composer(sebastian/recursion-context) >= 3.0 with php-composer(sebastian/recursion-context) < 8) +BuildRequires: (php-composer(sebastian/comparator) >= 3.0 with php-composer(sebastian/comparator) < 9) +BuildRequires: (php-composer(sebastian/recursion-context) >= 3.0 with php-composer(sebastian/recursion-context) < 9) +# remirepo:1 %if 0 BuildRequires: (php-composer(doctrine/instantiator) >= 1.2 with php-composer(doctrine/instantiator) < 3) # remirepo:7 @@ -41,16 +42,22 @@ BuildRequires: php-doctrine-instantiator >= 1.2 %endif %endif # from composer.json, "require-dev": { -# "friendsofphp/php-cs-fixer": "^3.88", +# "php-cs-fixer/shim": "^3.93.1", # "phpspec/phpspec": "^6.0 || ^7.0 || ^8.0", -# "phpstan/phpstan": "^2.1.13", -# "phpunit/phpunit": "^11.0 || ^12.0" +# "phpstan/phpstan": "^2.1.13, <2.1.34 || ^2.1.39", +# "phpunit/phpunit": "^11.0 || ^12.0 || ^13.0" %if %{with phpspec} BuildRequires: php-composer(phpspec/phpspec) >= 6.0 %endif BuildRequires: phpunit11 +# remirepo:1 %if 0%{?fedora} || 0%{?rhel} >= 10 BuildRequires: phpunit12 +# remirepo:2 +%endif +%if 0%{?fedora} >= 43 || 0%{?rhel} >= 11 +BuildRequires: phpunit13 +# remirepo:1 %endif %endif # Autoloader @@ -59,14 +66,14 @@ BuildRequires: php-fedora-autoloader-devel # from composer.json, "requires": { # "php": "8.2.* || 8.3.* || 8.4.*", # "phpdocumentor/reflection-docblock": "^5.2", -# "sebastian/comparator": "^3.0 || ^4.0 || ^5.0 || ^6.0 || ^7.0", +# "sebastian/comparator": "^3.0 || ^4.0 || ^5.0 || ^6.0 || ^7.0 || ^8.0", # "doctrine/instantiator": "^1.2 || ^2.0", -# "sebastian/recursion-context": "^3.0 || ^4.0 || ^5.0 || ^6.0 || ^7.0", +# "sebastian/recursion-context": "^3.0 || ^4.0 || ^5.0 || ^6.0 || ^7.0 || ^8.0", # "symfony/deprecation-contracts": "^2.5 || ^3.1" Requires: php(language) >= 8.2 Requires: (php-composer(phpdocumentor/reflection-docblock) >= 5.2 with php-composer(phpdocumentor/reflection-docblock) < 6) -Requires: (php-composer(sebastian/comparator) >= 3.0 with php-composer(sebastian/comparator) < 8) -Requires: (php-composer(sebastian/recursion-context) >= 3.0 with php-composer(sebastian/recursion-context) < 8) +Requires: (php-composer(sebastian/comparator) >= 3.0 with php-composer(sebastian/comparator) < 9) +Requires: (php-composer(sebastian/recursion-context) >= 3.0 with php-composer(sebastian/recursion-context) < 9) # remirepo:1 %if 0 Requires: (php-composer(doctrine/instantiator) >= 1.2 with php-composer(doctrine/instantiator) < 3) @@ -121,6 +128,9 @@ if (!class_exists('SebastianBergmann\\Comparator\\Comparator')) { // v2 from php if (PHP_VERSION_ID > 80300) { array_unshift($inst, '%{_datadir}/php/SebastianBergmann/Comparator7/autoload.php'); } + if (PHP_VERSION_ID > 80400) { + array_unshift($inst, '%{_datadir}/php/SebastianBergmann/Comparator8/autoload.php'); + } \Fedora\Autoloader\Dependencies::required([$inst]); } if (!class_exists('SebastianBergmann\\RecursionContext\\Context')) { // v2 from phpunit, v1 from phpspec @@ -133,6 +143,9 @@ if (!class_exists('SebastianBergmann\\RecursionContext\\Context')) { // v2 from if (PHP_VERSION_ID > 80300) { array_unshift($inst, '%{_datadir}/php/SebastianBergmann/RecursionContext7/autoload.php'); } + if (PHP_VERSION_ID > 80400) { + array_unshift($inst, '%{_datadir}/php/SebastianBergmann/RecursionContext8/autoload.php'); + } \Fedora\Autoloader\Dependencies::required([$inst]); } // from https://github.com/symfony/deprecation-contracts @@ -185,6 +198,15 @@ for cmd in php php83 php84 php85; do fi done fi +if [ -x %{_bindir}/phpunit13 ]; then +for cmd in php php84 php85; do + if which $cmd; then + $cmd -d auto_prepend_file=vendor/autoload.php \ + %{_bindir}/phpunit13 \ + || ret=1 + fi +done +fi exit $ret %else : Test suite disabled @@ -199,6 +221,10 @@ exit $ret %changelog +* Tue Feb 10 2026 Remi Collet <remi@remirepo.net> - 1.25.0-1 +- update to 1.25.0 +- allow phpunit13 + * Mon Jan 12 2026 Remi Collet <remi@remirepo.net> - 1.24.0-2 - use doctrine/instantiator v2 only with PHP 8.4+ |
