summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2024-02-29 14:09:36 +0100
committerRemi Collet <remi@php.net>2024-02-29 14:09:36 +0100
commit49414d123b0cb3f6cba3982ee6f3faac7c2651f6 (patch)
tree5a730ac3d99a8261a0b7f5223fa35bbc9cfd4f9c
parentb56feeac3ccfd780b2e444730350d3dabec9d05b (diff)
update to 1.19.0
allow doctrine/instantiator 6 allow sebastian/recursion-context 6
-rw-r--r--.gitignore2
-rw-r--r--composer.json4
-rw-r--r--php-phpspec-prophecy.spec75
3 files changed, 53 insertions, 28 deletions
diff --git a/.gitignore b/.gitignore
index 1ab5c4f..01f0400 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,5 +1,7 @@
+clog
package-*.xml
*.tgz
+*.tar.bz2
*.tar.gz
*.tar.xz
*.tar.xz.asc
diff --git a/composer.json b/composer.json
index 1f4bff1..2a86c2d 100644
--- a/composer.json
+++ b/composer.json
@@ -20,9 +20,9 @@
"require": {
"php": "^7.2 || 8.0.* || 8.1.* || 8.2.* || 8.3.*",
"phpdocumentor/reflection-docblock": "^5.2",
- "sebastian/comparator": "^3.0 || ^4.0 || ^5.0",
+ "sebastian/comparator": "^3.0 || ^4.0 || ^5.0 || ^6.0",
"doctrine/instantiator": "^1.2 || ^2.0",
- "sebastian/recursion-context": "^3.0 || ^4.0 || ^5.0"
+ "sebastian/recursion-context": "^3.0 || ^4.0 || ^5.0 || ^6.0"
},
"require-dev": {
diff --git a/php-phpspec-prophecy.spec b/php-phpspec-prophecy.spec
index 65d4ef3..c55977e 100644
--- a/php-phpspec-prophecy.spec
+++ b/php-phpspec-prophecy.spec
@@ -6,7 +6,7 @@
#
# Please, preserve the changelog entries
#
-%global gh_commit d4f454f7e1193933f04e6500de3e79191648ed0c
+%global gh_commit 67a759e7d8746d501c41536ba40cd9c0a07d6a87
%global gh_short %(c=%{gh_commit}; echo ${c:0:7})
%global gh_owner phpspec
%global gh_project prophecy
@@ -15,7 +15,7 @@
%bcond_with phpspec
Name: php-phpspec-prophecy
-Version: 1.18.0
+Version: 1.19.0
Release: 1%{?dist}
Summary: Highly opinionated mocking framework for PHP
@@ -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) < 6)
-BuildRequires: (php-composer(sebastian/recursion-context) >= 3.0 with php-composer(sebastian/recursion-context) < 6)
+BuildRequires: (php-composer(sebastian/comparator) >= 3.0 with php-composer(sebastian/comparator) < 7)
+BuildRequires: (php-composer(sebastian/recursion-context) >= 3.0 with php-composer(sebastian/recursion-context) < 7)
BuildRequires: (php-composer(doctrine/instantiator) >= 1.2 with php-composer(doctrine/instantiator) < 3)
# remirepo:6
%else
@@ -50,6 +50,10 @@ BuildRequires: php-composer(phpspec/phpspec) >= 6.0
BuildRequires: phpunit8
BuildRequires: phpunit9
BuildRequires: phpunit10
+# remirepo:3
+%if 0%{?fedora} >= 38 || 0%{?rhel} >= 10
+BuildRequires: phpunit11
+%endif
%endif
# Autoloader
BuildRequires: php-fedora-autoloader-devel
@@ -57,15 +61,15 @@ BuildRequires: php-fedora-autoloader-devel
# from composer.json, "requires": {
# "php": "^7.2 || 8.0.* || 8.1.* || 8.2.* || 8.3.*",
# "phpdocumentor/reflection-docblock": "^5.2",
-# "sebastian/comparator": "^3.0 || ^4.0 || ^5.0",
+# "sebastian/comparator": "^3.0 || ^4.0 || ^5.0 || ^6.0",
# "doctrine/instantiator": "^1.2 || ^2.0",
-# "sebastian/recursion-context": "^3.0 || ^4.0 || ^5.0"
+# "sebastian/recursion-context": "^3.0 || ^4.0 || ^5.0 || ^6.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) < 6)
-Requires: (php-composer(sebastian/recursion-context) >= 3.0 with php-composer(sebastian/recursion-context) < 6)
+Requires: (php-composer(sebastian/comparator) >= 3.0 with php-composer(sebastian/comparator) < 7)
+Requires: (php-composer(sebastian/recursion-context) >= 3.0 with php-composer(sebastian/recursion-context) < 7)
Requires: (php-composer(doctrine/instantiator) >= 1.2 with php-composer(doctrine/instantiator) < 3)
# remirepo:6
%else
@@ -100,35 +104,39 @@ 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
+$inst = ['%{_datadir}/php/Doctrine/Instantiator/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';
+ array_unshift($inst, '%{_datadir}/php/Doctrine/Instantiator2/autoload.php');
}
\Fedora\Autoloader\Dependencies::required([
$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/Comparator5/autoload.php',
- '%{_datadir}/php/SebastianBergmann/Comparator4/autoload.php',
- '%{_datadir}/php/SebastianBergmann/Comparator3/autoload.php',
- ],
- ]);
+ $inst = [
+ '%{_datadir}/php/SebastianBergmann/Comparator4/autoload.php',
+ '%{_datadir}/php/SebastianBergmann/Comparator3/autoload.php',
+ ];
+ if (PHP_VERSION_ID > 80100) {
+ array_unshift($inst, '%{_datadir}/php/SebastianBergmann/Comparator5/autoload.php');
+ }
+ if (PHP_VERSION_ID > 80200) {
+ array_unshift($inst, '%{_datadir}/php/SebastianBergmann/Comparator6/autoload.php');
+ }
+ \Fedora\Autoloader\Dependencies::required([$inst]);
}
if (!class_exists('SebastianBergmann\\RecursionContext\\Context')) { // v2 from phpunit, v1 from phpspec
- \Fedora\Autoloader\Dependencies::required([
- [
- '%{_datadir}/php/SebastianBergmann/RecursionContext5/autoload.php',
+ $inst = [
'%{_datadir}/php/SebastianBergmann/RecursionContext4/autoload.php',
'%{_datadir}/php/SebastianBergmann/RecursionContext3/autoload.php',
- ],
- ]);
+ ];
+ if (PHP_VERSION_ID > 80100) {
+ array_unshift($inst, '%{_datadir}/php/SebastianBergmann/RecursionContext5/autoload.php');
+ }
+ if (PHP_VERSION_ID > 80200) {
+ array_unshift($inst, '%{_datadir}/php/SebastianBergmann/RecursionContext6/autoload.php');
+ }
+ \Fedora\Autoloader\Dependencies::required([$inst]);
}
EOF
@@ -175,6 +183,16 @@ for cmd in php php81 php82 php83; do
|| ret=1
fi
done
+# remirepo:7
+%if 0%{?fedora} >= 38 || 0%{?rhel} >= 10
+for cmd in php php82 php83; do
+ if which $cmd; then
+ $cmd -d auto_prepend_file=vendor/autoload.php \
+ %{_bindir}/phpunit11 \
+ || ret=1
+ fi
+done
+%endif
exit $ret
%else
: Test suite disabled
@@ -191,6 +209,11 @@ exit $ret
%changelog
+* 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
+
* 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