Compare commits

...
Sign in to create a new pull request.

3 commits

Author SHA1 Message Date
Remi Collet
117397e253 fix autoloader
(cherry picked from commit a641dc6331)
2023-02-03 10:19:16 +01:00
Remi Collet
8826306b92 update to 1.17.0
allow doctrine/instantiator v2

(cherry picked from commit 271eaeee09)
(cherry picked from commit d396308bdc)
2023-02-03 08:57:26 +01:00
Remi Collet
acf71e6533 v1.16.0
(cherry picked from commit 9b8592c01f)
2022-12-01 11:30:13 +01:00
3 changed files with 33 additions and 12 deletions

2
.gitignore vendored
View file

@ -28,3 +28,5 @@ clog
/php-phpspec-prophecy-1.13.0-be1996e.tgz
/php-phpspec-prophecy-1.14.0-d86dfc2.tgz
/php-phpspec-prophecy-1.15.0-bbcd738.tgz
/php-phpspec-prophecy-1.16.0-be8cac5.tgz
/php-phpspec-prophecy-1.17.0-15873c6.tgz

View file

@ -1,12 +1,12 @@
# remirepo/fedora spec file for php-phpspec-prophecy
#
# Copyright (c) 2015-2021 Remi Collet
# License: CC-BY-SA
# Copyright (c) 2015-2023 Remi Collet
# License: CC-BY-SA-4.0
# http://creativecommons.org/licenses/by-sa/4.0/
#
# Please, preserve the changelog entries
#
%global gh_commit bbcd7380b0ebf3961ee21409db7b38bc31d69a13
%global gh_commit 15873c65b207b07765dbc3c95d20fdf4a320cbe2
%global gh_short %(c=%{gh_commit}; echo ${c:0:7})
%global gh_owner phpspec
%global gh_project prophecy
@ -14,7 +14,7 @@
%bcond_without tests
Name: php-phpspec-prophecy
Version: 1.15.0
Version: 1.17.0
Release: 2%{?dist}
Summary: Highly opinionated mocking framework for PHP
@ -29,9 +29,10 @@ BuildRequires: php(language) >= 7.2
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(doctrine/instantiator) >= 1.2 with php-composer(doctrine/instantiator) < 2)
BuildRequires: (php-composer(doctrine/instantiator) >= 1.2 with php-composer(doctrine/instantiator) < 3)
# from composer.json, "require-dev": {
# "phpspec/phpspec": "^6.0 | ^7.0"
# "phpstan/phpstan": "^1.9",
# "phpunit/phpunit": "^8.0 || ^9.0"
BuildRequires: php-composer(phpspec/phpspec) >= 6.0
%global phpunit %{_bindir}/phpunit9
@ -41,16 +42,16 @@ BuildRequires: %{phpunit}
BuildRequires: php-fedora-autoloader-devel
# from composer.json, "requires": {
# "php": "^7.2 || ~8.0, <8.2",
# "php": "^7.2 || 8.0.* || 8.1.* || 8.2.*",
# "phpdocumentor/reflection-docblock": "^5.2",
# "sebastian/comparator": "^3.0|^4.0",
# "doctrine/instantiator": "^1.2",
# "doctrine/instantiator": "^1.2 || ^2.0",
# "sebastian/recursion-context": "^3.0|^4.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(doctrine/instantiator) >= 1.2 with php-composer(doctrine/instantiator) < 2)
Requires: (php-composer(doctrine/instantiator) >= 1.2 with php-composer(doctrine/instantiator) < 3)
# From phpcompatinfo report for version 1.11.0
Requires: php-pcre
Requires: php-reflection
@ -77,8 +78,16 @@ to be used inside any testing framework out there with minimal effort.
phpab --template fedora --output src/Prophecy/autoload.php src
cat << 'EOF' | tee -a src/Prophecy/autoload.php
if (PHP_VERSION_ID > 80100) {
$inst = [
'%{_datadir}/php/Doctrine/Instantiator2/autoload.php',
'%{_datadir}/php/Doctrine/Instantiator/autoload.php',
];
} else {
$inst = '%{_datadir}/php/Doctrine/Instantiator/autoload.php';
}
\Fedora\Autoloader\Dependencies::required([
'%{_datadir}/php/Doctrine/Instantiator/autoload.php',
$inst,
'%{_datadir}/php/phpDocumentor/Reflection/DocBlock5/autoload.php',
]);
if (!class_exists('SebastianBergmann\\Comparator\\Comparator')) { // v2 from phpunit, v1 from phpspec
@ -109,7 +118,7 @@ cp -pr src/* %{buildroot}%{_datadir}/php
%if %{with tests}
: Dev autoloader
mkdir vendor
phpab --output vendor/autoload.php fixtures
phpab --output vendor/autoload.php fixtures tests
cat << 'EOF' | tee -a vendor/autoload.php
require_once '%{buildroot}%{_datadir}/php/Prophecy/autoload.php';
@ -123,7 +132,7 @@ phpspec --version
ret=0
# ignore it_can_not_double_an_enum on all version. Not ready
for cmdarg in "php %{phpunit}" php74 php80 php81; do
for cmdarg in "php %{phpunit}" php80 php81 php82; do
if which $cmdarg; then
set $cmdarg
$1 -d auto_prepend_file=vendor/autoload.php \
@ -149,6 +158,16 @@ exit $ret
%changelog
* Fri Feb 3 2023 Remi Collet <remi@remirepo.net> - 1.17.0-2
- fix autoloader
* Fri Feb 3 2023 Remi Collet <remi@remirepo.net> - 1.17.0-1
- update to 1.17.0
- allow doctrine/instantiator v2
* Thu Dec 1 2022 Remi Collet <remi@remirepo.net> - 1.16.0-1
- update to 1.16.0
* Fri Jan 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 1.15.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild

View file

@ -1 +1 @@
SHA512 (php-phpspec-prophecy-1.15.0-bbcd738.tgz) = 64e3b6fbba82bc4fe3058320e3967fecd94e1a4bb088ba83f5cf68850ff8b8cee069fdc72281ed79a3d95486404250a3fcfb8c1a0843b621de7a22383c6ac5f3
SHA512 (php-phpspec-prophecy-1.17.0-15873c6.tgz) = f8bc73952b0eeb46533e7080d6fd232e636c053bb0efc5884f106b53b4e437b7e9eabfebc6612b558b43dfcb008e2994b3408cf5c59f3e3dce04494cb69d3157