summaryrefslogtreecommitdiffstats
path: root/php-phpspec-prophecy.spec
diff options
context:
space:
mode:
Diffstat (limited to 'php-phpspec-prophecy.spec')
-rw-r--r--php-phpspec-prophecy.spec25
1 files changed, 14 insertions, 11 deletions
diff --git a/php-phpspec-prophecy.spec b/php-phpspec-prophecy.spec
index 89640e4..da1a7e2 100644
--- a/php-phpspec-prophecy.spec
+++ b/php-phpspec-prophecy.spec
@@ -20,7 +20,7 @@
Name: php-phpspec-prophecy
Version: 1.12.0
-Release: 1%{?dist}
+Release: 2%{?dist}
Summary: Highly opinionated mocking framework for PHP
License: MIT
@@ -28,9 +28,6 @@ URL: https://github.com/%{gh_owner}/%{gh_project}
Source0: %{name}-%{version}-%{gh_short}.tgz
Source2: makesrc.sh
-# Autoloader
-Source1: %{name}-autoload.php
-
BuildArch: noarch
BuildRequires: php(language) >= 7.2
%if %{with tests}
@@ -97,11 +94,16 @@ to be used inside any testing framework out there with minimal effort.
%prep
%setup -q -n %{gh_project}-%{gh_commit}
-cp %{SOURCE1} src/Prophecy/autoload.php
-
%build
-# Nothing
+phpab --template fedora --output src/Prophecy/autoload.php src
+cat << 'EOF' | tee -a src/Prophecy/autoload.php
+
+\Fedora\Autoloader\Dependencies::required([
+ '%{_datadir}/php/phpDocumentor/Reflection/DocBlock5/autoload.php',
+]);
+/* Comparator and RecursionContext pulled by phpspec or phpunit */
+EOF
%install
@@ -128,12 +130,10 @@ phpspec --version
ret=0
for cmd in php php72 php73 php74; do
if which $cmd; then
- $cmd -d include_path=.:%{buildroot}%{_datadir}/php:%{_datadir}/php \
- -d auto_prepend_file=vendor/autoload.php \
+ $cmd -d auto_prepend_file=vendor/autoload.php \
%{_bindir}/phpspec run --format pretty --verbose --no-ansi || ret=1
- $cmd -d include_path=.:%{buildroot}%{_datadir}/php:%{_datadir}/php \
- -d auto_prepend_file=vendor/autoload.php \
+ $cmd -d auto_prepend_file=vendor/autoload.php \
%{_bindir}/phpunit8 || ret=1
fi
done
@@ -153,6 +153,9 @@ exit $ret
%changelog
+* Mon Sep 28 2020 Remi Collet <remi@remirepo.net> - 1.12.0-2
+- switch to classmap autoloader
+
* Mon Sep 28 2020 Remi Collet <remi@remirepo.net> - 1.12.0-1
- update to 1.12.0
- raise dependency on phpdocumentor/reflection-docblock 5.2