Compare commits
2 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9e5b2a7852 | ||
|
|
6e10d38082 |
3 changed files with 42 additions and 23 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
|
@ -30,3 +30,4 @@ clog
|
|||
/php-phpspec-prophecy-1.15.0-bbcd738.tgz
|
||||
/php-phpspec-prophecy-1.16.0-be8cac5.tgz
|
||||
/php-phpspec-prophecy-1.17.0-15873c6.tgz
|
||||
/php-phpspec-prophecy-1.18.0-d4f454f.tgz
|
||||
|
|
|
|||
|
|
@ -6,16 +6,17 @@
|
|||
#
|
||||
# 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
|
||||
|
||||
%bcond_without tests
|
||||
%bcond_with phpspec
|
||||
|
||||
Name: php-phpspec-prophecy
|
||||
Version: 1.17.0
|
||||
Release: 2%{?dist}
|
||||
Version: 1.18.0
|
||||
Release: 1%{?dist}
|
||||
Summary: Highly opinionated mocking framework for PHP
|
||||
|
||||
License: MIT
|
||||
|
|
@ -27,30 +28,33 @@ BuildArch: noarch
|
|||
BuildRequires: php(language) >= 7.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) < 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)
|
||||
# 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
|
||||
%global phpunit %{_bindir}/phpunit9
|
||||
BuildRequires: %{phpunit}
|
||||
%endif
|
||||
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
|
||||
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)
|
||||
# From phpcompatinfo report for version 1.11.0
|
||||
Requires: php-pcre
|
||||
|
|
@ -93,6 +97,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',
|
||||
],
|
||||
|
|
@ -101,6 +106,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',
|
||||
],
|
||||
|
|
@ -127,20 +133,27 @@ EOF
|
|||
: check autoloader
|
||||
php %{buildroot}%{_datadir}/php/Prophecy/autoload.php
|
||||
|
||||
%if %{with phpspec}
|
||||
: check phpspec
|
||||
phpspec --version
|
||||
%endif
|
||||
|
||||
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
|
||||
$1 -d auto_prepend_file=vendor/autoload.php \
|
||||
for cmd in php php81 php82 php83; do
|
||||
if which $cmd; then
|
||||
%if %{with phpspec}
|
||||
$cmd -d auto_prepend_file=vendor/autoload.php \
|
||||
%{_bindir}/phpspec run --format pretty --verbose --no-ansi || ret=1
|
||||
|
||||
$1 -d auto_prepend_file=vendor/autoload.php \
|
||||
${2:-%{_bindir}/phpunit9} \
|
||||
--filter '^((?!(it_can_not_double_an_enum)).)*$' \
|
||||
%endif
|
||||
$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
|
||||
|
|
@ -158,6 +171,11 @@ 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
|
||||
- disable phpspec tests
|
||||
|
||||
* Fri Feb 3 2023 Remi Collet <remi@remirepo.net> - 1.17.0-2
|
||||
- fix autoloader
|
||||
|
||||
|
|
|
|||
2
sources
2
sources
|
|
@ -1 +1 @@
|
|||
SHA512 (php-phpspec-prophecy-1.17.0-15873c6.tgz) = f8bc73952b0eeb46533e7080d6fd232e636c053bb0efc5884f106b53b4e437b7e9eabfebc6612b558b43dfcb008e2994b3408cf5c59f3e3dce04494cb69d3157
|
||||
SHA512 (php-phpspec-prophecy-1.18.0-d4f454f.tgz) = 17445b49b7c3177d367d4ccfdddcf66b888d203e08b46eeeadf84d8cd5c3eb5aa4a845575e3670b72cdc951e16614bddb539f12f799113f1b8f3a14c256a8b90
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue