summaryrefslogtreecommitdiffstats
path: root/php-mockery.spec
diff options
context:
space:
mode:
Diffstat (limited to 'php-mockery.spec')
-rw-r--r--php-mockery.spec137
1 files changed, 101 insertions, 36 deletions
diff --git a/php-mockery.spec b/php-mockery.spec
index 2adae20..28db6fc 100644
--- a/php-mockery.spec
+++ b/php-mockery.spec
@@ -7,61 +7,61 @@
#
# Please preserve changelog entries
#
-%global gh_commit 4eff936d83eb809bde2c57a3cea0ee9643769031
+%bcond_without tests
+
+%global gh_commit 81a161d0b135df89951abd52296adf97deb0723d
%global gh_short %(c=%{gh_commit}; echo ${c:0:7})
%global gh_owner mockery
%global gh_project mockery
%global ns_project Mockery
%global major 1
-%global with_tests 0%{!?_without_tests:1}
Name: php-mockery
-Version: 1.2.3
+Version: 1.6.11
Release: 1%{?dist}
Summary: Mockery is a simple but flexible PHP mock object framework
-License: BSD
+License: BSD-3-Clause
URL: https://github.com/%{gh_owner}/%{gh_project}
-Source0: https://github.com/%{gh_owner}/%{gh_project}/archive/%{gh_commit}/%{name}-%{version}-%{gh_short}.tar.gz
+Source0: %{name}-%{version}-%{gh_short}.tgz
+Source1: makesrc.sh
# Use our autoloader
Patch0: %{gh_project}-tests.patch
-# For 7.4
-Patch1: https://patch-diff.githubusercontent.com/raw/mockery/mockery/pull/993.patch
BuildArch: noarch
-%if %{with_tests}
-BuildRequires: php(language) >= 5.6.0
+%if %{with tests}
+BuildRequires: php(language) >= 7.3
# From composer.json, "require-dev": {
-# "phpunit/phpunit": "~5.7.10|~6.5|~7.0|~8.0"
+# "phpunit/phpunit": "^8.5 || ^9.6.17",
+# "symplify/easy-coding-standard": "^12.1.4"
+%global phpunit %{_bindir}/phpunit9
+BuildRequires: phpunit9 >= 9.6.17
# remirepo:1
%if 0%{?fedora} >= 27 || 0%{?rhel} >= 8
-%global phpunit %{_bindir}/phpunit7
-BuildRequires: phpunit7
-BuildRequires: (php-composer(hamcrest/hamcrest-php) >= 2.0 with php-composer(hamcrest/hamcrest-php) < 3)
-# remirepo:5
+BuildRequires: (php-composer(hamcrest/hamcrest-php) >= 2.0.1 with php-composer(hamcrest/hamcrest-php) < 3)
+# remirepo:3
%else
-%global phpunit %{_bindir}/phpunit
-BuildRequires: php-phpunit-PHPUnit >= 5.7.10
-BuildRequires: php-hamcrest2
+BuildRequires: php-hamcrest2 >= 2.0.1
%endif
+BuildRequires: php-pdo
# Autoloader
%endif
BuildRequires: php-fedora-autoloader-devel
# From composer.json, "require": {
-# "php": ">=5.6.0",
+# "php": ">=7.3",
# "lib-pcre": ">=7.0",
# "hamcrest/hamcrest-php": "~2.0"
-Requires: php(language) >= 5.6.0
+Requires: php(language) >= 7.3
# remirepo:1
%if 0%{?fedora} >= 27 || 0%{?rhel} >= 8
-Requires: (php-composer(hamcrest/hamcrest-php) >= 2.0 with php-composer(hamcrest/hamcrest-php) < 3)
+Requires: (php-composer(hamcrest/hamcrest-php) >= 2.0.1 with php-composer(hamcrest/hamcrest-php) < 3)
# remirepo:3
%else
-Requires: php-hamcrest2
+Requires: php-hamcrest2 >= 2.0.1
%endif
-# From phpcompatinfo report for version 1.0
+# From phpcompatinfo report for version 1.4.2
Requires: php-pcre
Requires: php-spl
Requires: php-reflection
@@ -89,11 +89,11 @@ cat << 'EOF' | tee -a library/%{ns_project}/autoload.php
\Fedora\Autoloader\Dependencies::required([
'/usr/share/php/Hamcrest2/autoload.php',
+ __DIR__ . '/helpers.php',
]);
EOF
-%patch0 -p0 -b .rpm
-%patch1 -p1
+%patch -P0 -p0 -b .rpm
rm -f docs/.gitignore
@@ -108,26 +108,23 @@ cp -rp library/%{ns_project} %{buildroot}/%{_datadir}/php/%{ns_project}%{major}
%check
-%if %{with_tests}
+%if %{with tests}
: Use installed tree and our autoloader
export COMPOSER_VENDOR_DIR=%{buildroot}%{_datadir}/php/%{ns_project}%{major}
-phpab --output tests/classmap.php --exclude */SemiReservedWordsAsMethods.php tests/Mockery
+phpab --output tests/classmap.php --exclude */SemiReservedWordsAsMethods.php tests/Mockery tests/Fixture
-# TODO 7.4 Function is_real() is deprecated
: Run upstream test suite
ret=0
-for cmd in "php %{phpunit}" "php71 %{_bindir}/phpunit7" php72 php73 php74; do
+
+# need investigation
+rm tests/Mockery/MockeryCanMockClassesWithSemiReservedWordsTest.php
+
+for cmd in php php81 php82 php83; do
if which $cmd; then
- set $cmd
- # see .travis.yml
- if [ $($1 -r 'echo PHP_MAJOR_VERSION;') -lt 7 ]
- then SUITE="Mockery Test Suite PHP56"
- else SUITE="Mockery Test Suite"
- fi
- $1 ${2:-%{_bindir}/phpunit8} \
+ $cmd %{_bindir}/phpunit9 \
--no-coverage \
- --verbose --testsuite="$SUITE" || ret=1
+ --verbose || ret=1
fi
done
exit $ret
@@ -144,6 +141,74 @@ exit $ret
%changelog
+* Fri Mar 22 2024 Remi Collet <remi@remirepo.net> - 1.6.11-1
+- update to 1.6.11
+
+* Wed Mar 20 2024 Remi Collet <remi@remirepo.net> - 1.6.10-1
+- update to 1.6.10
+
+* Wed Mar 13 2024 Remi Collet <remi@remirepo.net> - 1.6.9-1
+- update to 1.6.9 (revert to 1.6.7 code)
+
+* Tue Mar 12 2024 Remi Collet <remi@remirepo.net> - 1.6.8-1
+- update to 1.6.8
+
+* Mon Dec 11 2023 Remi Collet <remi@remirepo.net> - 1.6.7-1
+- update to 1.6.7
+
+* Thu Aug 24 2023 Remi Collet <remi@remirepo.net> - 1.6.6-1
+- update to 1.6.6
+
+* Thu Jul 20 2023 Remi Collet <remi@remirepo.net> - 1.6.4-1
+- update to 1.6.4
+
+* Wed Jul 19 2023 Remi Collet <remi@remirepo.net> - 1.6.3-1
+- update to 1.6.3
+
+* Thu Jun 8 2023 Remi Collet <remi@remirepo.net> - 1.6.2-1
+- update to 1.6.2
+
+* Tue Jun 6 2023 Remi Collet <remi@remirepo.net> - 1.6.1-1
+- update to 1.6.1
+
+* Mon Sep 12 2022 Remi Collet <remi@remirepo.net> - 1.5.1-1
+- update to 1.5.1
+
+* Fri Jan 21 2022 Remi Collet <remi@remirepo.net> - 1.5.0-1
+- update to 1.5.0
+
+* Tue Sep 14 2021 Remi Collet <remi@remirepo.net> - 1.4.4-1
+- update to 1.4.4
+
+* Wed Feb 24 2021 Remi Collet <remi@remirepo.net> - 1.4.3-1
+- update to 1.4.3
+
+* Mon Oct 12 2020 Remi Collet <remi@remirepo.net> - 1.4.2-1
+- update to 1.4.2
+- raise dependency on PHP 7.3
+- drop compatibility with old phpunit 5, 6 and 7
+- run test suite with both phpunit 8 and 9
+
+* Mon Aug 17 2020 Remi Collet <remi@remirepo.net> - 1.3.3-1
+- update to 1.3.3
+
+* Tue Jul 21 2020 Remi Collet <remi@remirepo.net> - 1.3.2-1
+- update to 1.3.2
+- switch to phpunit9
+- raise dependency on hamcrest/hamcrest-php 2.0.1
+- sources from git snapshot
+
+* Fri Jan 3 2020 Remi Collet <remi@remirepo.net> - 1.3.1-1
+- update to 1.3.1
+
+* Mon Nov 25 2019 Remi Collet <remi@remirepo.net> - 1.3.0-1
+- update to 1.3.0
+- use phpunit8
+
+* Mon Sep 30 2019 Remi Collet <remi@remirepo.net> - 1.2.4-1
+- update to 1.2.4
+- drop patch merged upstream
+
* Mon Aug 19 2019 Remi Collet <remi@remirepo.net> - 1.2.3-1
- update to 1.2.3
- add patch for PHP 7.4 from