Compare commits
19 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d43b6eef38 | ||
|
|
1df7abefca | ||
|
|
4e02ea1a8d | ||
|
|
df1895cef5 | ||
|
|
3c40a08813 | ||
|
|
93cf3baba8 | ||
|
|
ddfae1a5a8 | ||
|
|
9372692846 | ||
|
|
a7682f1622 | ||
|
|
674ec85357 | ||
|
|
2f6298279a | ||
|
|
1ba1a3b24e | ||
|
|
6910895e60 | ||
|
|
a641dc6331 | ||
|
|
271eaeee09 | ||
|
|
2299ee8fd6 | ||
|
|
9b8592c01f | ||
|
|
23ffb17459 | ||
|
|
90fc564af5 |
3 changed files with 148 additions and 48 deletions
7
.gitignore
vendored
7
.gitignore
vendored
|
|
@ -28,3 +28,10 @@ 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
|
||||
/php-phpspec-prophecy-1.18.0-d4f454f.tgz
|
||||
/php-phpspec-prophecy-1.19.0-67a759e.tgz
|
||||
/php-phpspec-prophecy-1.20.0-a0165c6.tgz
|
||||
/php-phpspec-prophecy-1.22.0-35f1adb.tgz
|
||||
/php-phpspec-prophecy-1.24.0-a24f1bd.tgz
|
||||
|
|
|
|||
|
|
@ -1,21 +1,22 @@
|
|||
# remirepo/fedora spec file for php-phpspec-prophecy
|
||||
#
|
||||
# Copyright (c) 2015-2021 Remi Collet
|
||||
# License: CC-BY-SA
|
||||
# http://creativecommons.org/licenses/by-sa/4.0/
|
||||
# SPDX-FileCopyrightText: Copyright 2015-2026 Remi Collet
|
||||
# SPDX-License-Identifier: CECILL-2.1
|
||||
# http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
|
||||
#
|
||||
# Please, preserve the changelog entries
|
||||
#
|
||||
%global gh_commit bbcd7380b0ebf3961ee21409db7b38bc31d69a13
|
||||
%global gh_commit a24f1bda2d00a03877f7f99d9e6b150baf543f6d
|
||||
%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.15.0
|
||||
Release: 1%{?dist}
|
||||
Version: 1.24.0
|
||||
Release: 2%{?dist}
|
||||
Summary: Highly opinionated mocking framework for PHP
|
||||
|
||||
License: MIT
|
||||
|
|
@ -24,37 +25,40 @@ Source0: %{name}-%{version}-%{gh_short}.tgz
|
|||
Source2: makesrc.sh
|
||||
|
||||
BuildArch: noarch
|
||||
BuildRequires: php(language) >= 7.2
|
||||
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) < 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(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(doctrine/instantiator) >= 1.2 with php-composer(doctrine/instantiator) < 3)
|
||||
# from composer.json, "require-dev": {
|
||||
# "phpspec/phpspec": "^6.0 | ^7.0"
|
||||
# "phpunit/phpunit": "^8.0 || ^9.0"
|
||||
# "friendsofphp/php-cs-fixer": "^3.88",
|
||||
# "phpspec/phpspec": "^6.0 || ^7.0 || ^8.0",
|
||||
# "phpstan/phpstan": "^2.1.13",
|
||||
# "phpunit/phpunit": "^11.0 || ^12.0"
|
||||
%if %{with phpspec}
|
||||
BuildRequires: php-composer(phpspec/phpspec) >= 6.0
|
||||
%global phpunit %{_bindir}/phpunit9
|
||||
BuildRequires: %{phpunit}
|
||||
%endif
|
||||
BuildRequires: phpunit11
|
||||
BuildRequires: phpunit12
|
||||
%endif
|
||||
# Autoloader
|
||||
BuildRequires: php-fedora-autoloader-devel
|
||||
|
||||
# from composer.json, "requires": {
|
||||
# "php": "^7.2 || ~8.0, <8.2",
|
||||
# "php": "8.2.* || 8.3.* || 8.4.*",
|
||||
# "phpdocumentor/reflection-docblock": "^5.2",
|
||||
# "sebastian/comparator": "^3.0|^4.0",
|
||||
# "doctrine/instantiator": "^1.2",
|
||||
# "sebastian/recursion-context": "^3.0|^4.0"
|
||||
Requires: php(language) >= 7.2
|
||||
# "sebastian/comparator": "^3.0 || ^4.0 || ^5.0 || ^6.0 || ^7.0",
|
||||
# "doctrine/instantiator": "^1.2 || ^2.0",
|
||||
# "sebastian/recursion-context": "^3.0 || ^4.0 || ^5.0 || ^6.0 || ^7.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) < 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(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(doctrine/instantiator) >= 1.2 with php-composer(doctrine/instantiator) < 3)
|
||||
# From phpcompatinfo report for version 1.11.0
|
||||
Requires: php-pcre
|
||||
Requires: php-reflection
|
||||
Requires: php-spl
|
||||
# only pcre, reflection and spl
|
||||
# Autoloader
|
||||
Requires: php-composer(fedora/autoloader)
|
||||
|
||||
|
|
@ -77,25 +81,48 @@ 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 > 80400) {
|
||||
$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
|
||||
\Fedora\Autoloader\Dependencies::required([
|
||||
[
|
||||
'%{_datadir}/php/SebastianBergmann/Comparator4/autoload.php',
|
||||
'%{_datadir}/php/SebastianBergmann/Comparator3/autoload.php',
|
||||
],
|
||||
]);
|
||||
$inst = [
|
||||
'%{_datadir}/php/SebastianBergmann/Comparator6/autoload.php',
|
||||
'%{_datadir}/php/SebastianBergmann/Comparator5/autoload.php',
|
||||
'%{_datadir}/php/SebastianBergmann/Comparator4/autoload.php',
|
||||
'%{_datadir}/php/SebastianBergmann/Comparator3/autoload.php',
|
||||
];
|
||||
if (PHP_VERSION_ID > 80300) {
|
||||
array_unshift($inst, '%{_datadir}/php/SebastianBergmann/Comparator7/autoload.php');
|
||||
}
|
||||
\Fedora\Autoloader\Dependencies::required([$inst]);
|
||||
}
|
||||
if (!class_exists('SebastianBergmann\\RecursionContext\\Context')) { // v2 from phpunit, v1 from phpspec
|
||||
\Fedora\Autoloader\Dependencies::required([
|
||||
[
|
||||
$inst = [
|
||||
'%{_datadir}/php/SebastianBergmann/RecursionContext6/autoload.php',
|
||||
'%{_datadir}/php/SebastianBergmann/RecursionContext5/autoload.php',
|
||||
'%{_datadir}/php/SebastianBergmann/RecursionContext4/autoload.php',
|
||||
'%{_datadir}/php/SebastianBergmann/RecursionContext3/autoload.php',
|
||||
],
|
||||
]);
|
||||
];
|
||||
if (PHP_VERSION_ID > 80300) {
|
||||
array_unshift($inst, '%{_datadir}/php/SebastianBergmann/RecursionContext7/autoload.php');
|
||||
}
|
||||
\Fedora\Autoloader\Dependencies::required([$inst]);
|
||||
}
|
||||
// from https://github.com/symfony/deprecation-contracts
|
||||
if (!function_exists('trigger_deprecation')) {
|
||||
function trigger_deprecation(string $package, string $version, string $message, mixed ...$args): void
|
||||
{
|
||||
@trigger_error(($package || $version ? "Since $package $version: " : '').($args ? vsprintf($message, $args) : $message), \E_USER_DEPRECATED);
|
||||
}
|
||||
}
|
||||
EOF
|
||||
|
||||
|
|
@ -109,7 +136,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';
|
||||
|
|
@ -118,23 +145,28 @@ 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}" php74 php80 php81; do
|
||||
if which $cmdarg; then
|
||||
set $cmdarg
|
||||
$1 -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)).)*$' \
|
||||
for cmd in php php82 php83 php84 php85; do
|
||||
if which $cmd; then
|
||||
$cmd -d auto_prepend_file=vendor/autoload.php \
|
||||
%{_bindir}/phpunit11 \
|
||||
|| ret=1
|
||||
fi
|
||||
done
|
||||
if [ -x %{_bindir}/phpunit12 ]; then
|
||||
for cmd in php php83 php84 php85; do
|
||||
if which $cmd; then
|
||||
$cmd -d auto_prepend_file=vendor/autoload.php \
|
||||
%{_bindir}/phpunit12 \
|
||||
|| ret=1
|
||||
fi
|
||||
done
|
||||
fi
|
||||
exit $ret
|
||||
%else
|
||||
: Test suite disabled
|
||||
|
|
@ -149,6 +181,67 @@ exit $ret
|
|||
|
||||
|
||||
%changelog
|
||||
* Mon Jan 12 2026 Remi Collet <remi@remirepo.net> - 1.24.0-2
|
||||
- update to 1.24.0
|
||||
- use doctrine/instantiator v2 only with PHP 8.4+
|
||||
- raise dependency on PHP 8.2
|
||||
|
||||
* Fri Jul 25 2025 Fedora Release Engineering <releng@fedoraproject.org> - 1.22.0-2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild
|
||||
|
||||
* Wed Apr 30 2025 Remi Collet <remi@remirepo.net> - 1.22.0-1
|
||||
- update to 1.22.0
|
||||
- re-license spec file to CECILL-2.1
|
||||
|
||||
* Sat Jan 18 2025 Fedora Release Engineering <releng@fedoraproject.org> - 1.20.0-2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild
|
||||
|
||||
* Thu Nov 21 2024 Remi Collet <remi@remirepo.net> - 1.20.0-1
|
||||
- update to 1.20.0
|
||||
|
||||
* Fri Jul 19 2024 Fedora Release Engineering <releng@fedoraproject.org> - 1.19.0-2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild
|
||||
|
||||
* Thu Feb 29 2024 Remi Collet <remi@remirepo.net> - 1.19.0-1
|
||||
- update to 1.19.0
|
||||
- allow doctrine/instantiator 6
|
||||
- allow sebastian/recursion-context 6
|
||||
|
||||
* Thu Jan 25 2024 Fedora Release Engineering <releng@fedoraproject.org> - 1.18.0-3
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
|
||||
|
||||
* Sun Jan 21 2024 Fedora Release Engineering <releng@fedoraproject.org> - 1.18.0-2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
|
||||
|
||||
* 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
|
||||
|
||||
* Fri Jul 21 2023 Fedora Release Engineering <releng@fedoraproject.org> - 1.17.0-3
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
|
||||
|
||||
* 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
|
||||
|
||||
* Fri Jan 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 1.16.0-2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
|
||||
|
||||
* Thu Dec 1 2022 Remi Collet <remi@remirepo.net> - 1.16.0-1
|
||||
- update to 1.16.0
|
||||
|
||||
* Fri Jul 22 2022 Fedora Release Engineering <releng@fedoraproject.org> - 1.15.0-3
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
|
||||
|
||||
* Fri Jan 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 1.15.0-2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
|
||||
|
||||
* Wed Dec 8 2021 Remi Collet <remi@remirepo.net> - 1.15.0-1
|
||||
- update to 1.15.0
|
||||
|
||||
|
|
|
|||
2
sources
2
sources
|
|
@ -1 +1 @@
|
|||
SHA512 (php-phpspec-prophecy-1.15.0-bbcd738.tgz) = 64e3b6fbba82bc4fe3058320e3967fecd94e1a4bb088ba83f5cf68850ff8b8cee069fdc72281ed79a3d95486404250a3fcfb8c1a0843b621de7a22383c6ac5f3
|
||||
SHA512 (php-phpspec-prophecy-1.24.0-a24f1bd.tgz) = 1fb41f8835788bb06c4ec0ae67460f80370d0466a0036368ce5822750a3544ba306a3660011b95b127276695027cd099bcd85259e4d1faeff36caa11dd4610de
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue