From 3c4584cc007cda9be393fea566f52c17b5b7aaf8 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Tue, 19 Dec 2017 09:31:32 +0100 Subject: fix autoloader for symfony/yaml --- php-phpunit-dbunit3.spec | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/php-phpunit-dbunit3.spec b/php-phpunit-dbunit3.spec index 74eac5f..1bb2385 100644 --- a/php-phpunit-dbunit3.spec +++ b/php-phpunit-dbunit3.spec @@ -21,7 +21,7 @@ %global ver_major 3 %global ver_minor 0 %global ver_patch 2 -%global specrel 2 +%global specrel 3 Name: php-%{pk_vendor}-%{pk_project}%{ver_major} Version: %{ver_major}.%{ver_minor}.%{ver_patch} @@ -45,7 +45,6 @@ BuildRequires: php-composer(symfony/yaml) < 5 %else BuildRequires: php-composer(symfony/yaml) < 4 %endif -BuildRequires: php-composer(symfony/yaml) >= 2.8 %endif # From composer.json @@ -63,8 +62,6 @@ Requires: php-composer(symfony/yaml) < 5 %else Requires: php-composer(symfony/yaml) < 4 %endif -# ignore min version -Requires: php-composer(symfony/yaml) >= 2.8 # From phpcompatinfo report for version 3.0.0 Requires: php-reflection Requires: php-libxml @@ -100,15 +97,15 @@ Autoloader: %{php_home}/%{ns_vendor}/%{ns_project}/autoload.php cat << 'EOF' | tee -a src/autoload.php // Dependencies -\Fedora\Autoloader\Dependencies::required([ - [ - '%{php_home}/Symfony4/Component/Yaml/autoload.php', - '%{php_home}/Symfony3/Component/Yaml/autoload.php', - '%{php_home}/Symfony/Component/Yaml/autoload.php', - ], -]); +foreach(['Symfony4', 'Symfony3', 'Symfony'] as $sym) { + if (is_dir("/usr/share/php/$sym/Component/Yaml")) { + \Fedora\Autoloader\Autoload::addPsr4('Symfony\\Component\\Yaml', "/usr/share/php/$sym/Component/Yaml"); + break; + } +} EOF + %install mkdir -p %{buildroot}%{php_home}/%{ns_vendor} cp -pr src %{buildroot}%{php_home}/%{ns_vendor}/%{ns_project} @@ -141,6 +138,9 @@ exit $ret %changelog +* Tue Dec 19 2017 Remi Collet - 3.0.2-3 +- fix autoloader for symfony/yaml + * Mon Nov 20 2017 Remi Collet - 3.0.2-2 - fix autoloader for Symfony 4 -- cgit