diff options
author | Remi Collet <remi@remirepo.net> | 2023-12-08 08:12:01 +0100 |
---|---|---|
committer | Remi Collet <remi@php.net> | 2023-12-08 08:12:01 +0100 |
commit | b56feeac3ccfd780b2e444730350d3dabec9d05b (patch) | |
tree | f43069292c4def2c1b6ce3564ac93327a49fbde9 | |
parent | 4d7b60e3b9e53dca81e69b3db26f4f88f3bb3e8f (diff) |
update to 1.18.0
run test suite with phpunit8, phpunit9 and phpunit10
-rw-r--r-- | composer.json | 20 | ||||
-rw-r--r-- | php-phpspec-prophecy.spec | 53 |
2 files changed, 47 insertions, 26 deletions
diff --git a/composer.json b/composer.json index 5a27095..1f4bff1 100644 --- a/composer.json +++ b/composer.json @@ -1,7 +1,7 @@ { "name": "phpspec/prophecy", "description": "Highly opinionated mocking framework for PHP 5.3+", - "keywords": ["Mock", "Stub", "Dummy", "Double", "Fake", "Spy"], + "keywords": ["Mock", "Stub", "Dummy", "Double", "Fake", "Spy", "dev"], "homepage": "https://github.com/phpspec/prophecy", "type": "library", "license": "MIT", @@ -18,17 +18,17 @@ ], "require": { - "php": "^7.2 || 8.0.* || 8.1.* || 8.2.*", + "php": "^7.2 || 8.0.* || 8.1.* || 8.2.* || 8.3.*", "phpdocumentor/reflection-docblock": "^5.2", - "sebastian/comparator": "^3.0 || ^4.0", + "sebastian/comparator": "^3.0 || ^4.0 || ^5.0", "doctrine/instantiator": "^1.2 || ^2.0", - "sebastian/recursion-context": "^3.0 || ^4.0" + "sebastian/recursion-context": "^3.0 || ^4.0 || ^5.0" }, "require-dev": { "phpspec/phpspec": "^6.0 || ^7.0", "phpstan/phpstan": "^1.9", - "phpunit/phpunit": "^8.0 || ^9.0" + "phpunit/phpunit": "^8.0 || ^9.0 || ^10.0" }, "autoload": { @@ -44,6 +44,16 @@ } }, + "scripts": { + "phpstan": "phpstan analyse", + "phpstan:baseline": "phpstan analyse --generate-baseline" + }, + + "scripts-descriptions": { + "phpstan": "Run PHPStan analysis", + "phpstan:baseline": "Dump PHPStan baseline file - use only for updating, do not add new errors when possible" + }, + "extra": { "branch-alias": { "dev-master": "1.x-dev" diff --git a/php-phpspec-prophecy.spec b/php-phpspec-prophecy.spec index bb0a5fc..65d4ef3 100644 --- a/php-phpspec-prophecy.spec +++ b/php-phpspec-prophecy.spec @@ -6,7 +6,7 @@ # # Please, preserve the changelog entries # -%global gh_commit 15873c65b207b07765dbc3c95d20fdf4a320cbe2 +%global gh_commit d4f454f7e1193933f04e6500de3e79191648ed0c %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.17.0 -Release: 4%{?dist} +Version: 1.18.0 +Release: 1%{?dist} Summary: Highly opinionated mocking framework for PHP License: MIT @@ -30,8 +30,8 @@ BuildRequires: php(language) >= 7.2 # remirepo:1 %if 0%{?fedora} >= 27 || 0%{?rhel} >= 8 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) < 5) -BuildRequires: (php-composer(sebastian/recursion-context) >= 3.0 with php-composer(sebastian/recursion-context) < 5) +BuildRequires: (php-composer(sebastian/comparator) >= 3.0 with php-composer(sebastian/comparator) < 6) +BuildRequires: (php-composer(sebastian/recursion-context) >= 3.0 with php-composer(sebastian/recursion-context) < 6) BuildRequires: (php-composer(doctrine/instantiator) >= 1.2 with php-composer(doctrine/instantiator) < 3) # remirepo:6 %else @@ -41,30 +41,31 @@ BuildRequires: php-sebastian-recursion-context3 BuildRequires: php-doctrine-instantiator >= 1.2 %endif # from composer.json, "require-dev": { -# "phpspec/phpspec": "^6.0 | ^7.0" +# "phpspec/phpspec": "^6.0 || ^7.0" # "phpstan/phpstan": "^1.9", -# "phpunit/phpunit": "^8.0 || ^9.0" +# "phpunit/phpunit": "^8.0 || ^9.0 || ^10.0" %if %{with phpspec} BuildRequires: php-composer(phpspec/phpspec) >= 6.0 %endif -%global phpunit %{_bindir}/phpunit9 -BuildRequires: %{phpunit} +BuildRequires: phpunit8 +BuildRequires: phpunit9 +BuildRequires: phpunit10 %endif # Autoloader BuildRequires: php-fedora-autoloader-devel # from composer.json, "requires": { -# "php": "^7.2 || 8.0.* || 8.1.* || 8.2.*", +# "php": "^7.2 || 8.0.* || 8.1.* || 8.2.* || 8.3.*", # "phpdocumentor/reflection-docblock": "^5.2", -# "sebastian/comparator": "^3.0|^4.0", +# "sebastian/comparator": "^3.0 || ^4.0 || ^5.0", # "doctrine/instantiator": "^1.2 || ^2.0", -# "sebastian/recursion-context": "^3.0|^4.0" +# "sebastian/recursion-context": "^3.0 || ^4.0 || ^5.0" Requires: php(language) >= 7.2 # remirepo:1 %if 0%{?fedora} >= 27 || 0%{?rhel} >= 8 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) < 5) -Requires: (php-composer(sebastian/recursion-context) >= 3.0 with php-composer(sebastian/recursion-context) < 5) +Requires: (php-composer(sebastian/comparator) >= 3.0 with php-composer(sebastian/comparator) < 6) +Requires: (php-composer(sebastian/recursion-context) >= 3.0 with php-composer(sebastian/recursion-context) < 6) Requires: (php-composer(doctrine/instantiator) >= 1.2 with php-composer(doctrine/instantiator) < 3) # remirepo:6 %else @@ -114,6 +115,7 @@ if (PHP_VERSION_ID > 80100) { if (!class_exists('SebastianBergmann\\Comparator\\Comparator')) { // v2 from phpunit, v1 from phpspec \Fedora\Autoloader\Dependencies::required([ [ + '%{_datadir}/php/SebastianBergmann/Comparator5/autoload.php', '%{_datadir}/php/SebastianBergmann/Comparator4/autoload.php', '%{_datadir}/php/SebastianBergmann/Comparator3/autoload.php', ], @@ -122,6 +124,7 @@ if (!class_exists('SebastianBergmann\\Comparator\\Comparator')) { // v2 from php if (!class_exists('SebastianBergmann\\RecursionContext\\Context')) { // v2 from phpunit, v1 from phpspec \Fedora\Autoloader\Dependencies::required([ [ + '%{_datadir}/php/SebastianBergmann/RecursionContext5/autoload.php', '%{_datadir}/php/SebastianBergmann/RecursionContext4/autoload.php', '%{_datadir}/php/SebastianBergmann/RecursionContext3/autoload.php', ], @@ -155,16 +158,20 @@ phpspec --version ret=0 # ignore it_can_not_double_an_enum on all version. Not ready -for cmdarg in "php %{phpunit}" php80 php81 php82; do - if which $cmdarg; then - set $cmdarg +for cmd in php php81 php82 php83; do + if which $cmd; then %if %{with phpspec} - $1 -d auto_prepend_file=vendor/autoload.php \ + $cmd -d auto_prepend_file=vendor/autoload.php \ %{_bindir}/phpspec run --format pretty --verbose --no-ansi || ret=1 %endif - $1 -d auto_prepend_file=vendor/autoload.php \ - ${2:-%{_bindir}/phpunit9} \ - --filter '^((?!(it_can_not_double_an_enum)).)*$' \ + $cmd -d auto_prepend_file=vendor/autoload.php \ + %{_bindir}/phpunit8 \ + || ret=1 + $cmd -d auto_prepend_file=vendor/autoload.php \ + %{_bindir}/phpunit9 \ + || ret=1 + $cmd -d auto_prepend_file=vendor/autoload.php \ + %{_bindir}/phpunit10 \ || ret=1 fi done @@ -184,6 +191,10 @@ exit $ret %changelog +* Fri Dec 8 2023 Remi Collet <remi@remirepo.net> - 1.18.0-1 +- update to 1.18.0 +- run test suite with phpunit8, phpunit9 and phpunit10 + * Wed Sep 27 2023 Remi Collet <remi@remirepo.net> - 1.17.0-4 - disable phpspec tests |