From 7eb5acfc65f9aca4068f7e34ca5913793362d427 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Mon, 28 Sep 2020 16:53:02 +0200 Subject: switch to classmap autoloader --- php-phpspec-prophecy-autoload.php | 27 --------------------------- php-phpspec-prophecy.spec | 25 ++++++++++++++----------- 2 files changed, 14 insertions(+), 38 deletions(-) delete mode 100644 php-phpspec-prophecy-autoload.php diff --git a/php-phpspec-prophecy-autoload.php b/php-phpspec-prophecy-autoload.php deleted file mode 100644 index dfb7e08..0000000 --- a/php-phpspec-prophecy-autoload.php +++ /dev/null @@ -1,27 +0,0 @@ -= 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 - 1.12.0-2 +- switch to classmap autoloader + * Mon Sep 28 2020 Remi Collet - 1.12.0-1 - update to 1.12.0 - raise dependency on phpdocumentor/reflection-docblock 5.2 -- cgit