diff options
-rw-r--r-- | php-composer-spdx-licenses-autoload.php | 13 | ||||
-rw-r--r-- | php-composer-spdx-licenses.spec | 9 |
2 files changed, 10 insertions, 12 deletions
diff --git a/php-composer-spdx-licenses-autoload.php b/php-composer-spdx-licenses-autoload.php index 3d84359..652aff6 100644 --- a/php-composer-spdx-licenses-autoload.php +++ b/php-composer-spdx-licenses-autoload.php @@ -2,14 +2,9 @@ /* Autoloader for composer/spdx-licenses and its dependencies */ $vendorDir = '/usr/share/php'; -// Use Symfony autoloader -if (!isset($fedoraClassLoader) || !($fedoraClassLoader instanceof \Symfony\Component\ClassLoader\ClassLoader)) { - if (!class_exists('Symfony\\Component\\ClassLoader\\ClassLoader', false)) { - require_once $vendorDir . '/Symfony/Component/ClassLoader/ClassLoader.php'; - } - - $fedoraClassLoader = new \Symfony\Component\ClassLoader\ClassLoader(); - $fedoraClassLoader->register(); +if (!class_exists('Fedora\\Autoloader\\Autoload', false)) { + require_once '/usr/share/php/Fedora/Autoloader/autoload.php'; } -$fedoraClassLoader->addPrefix('Composer\\Spdx\\', dirname(dirname(__DIR__))); +\Fedora\Autoloader\Autoload::addPsr4('Composer\\Spdx\\', __DIR__); + diff --git a/php-composer-spdx-licenses.spec b/php-composer-spdx-licenses.spec index d1ad324..6127110 100644 --- a/php-composer-spdx-licenses.spec +++ b/php-composer-spdx-licenses.spec @@ -16,7 +16,7 @@ Name: php-composer-spdx-licenses Version: 1.1.5 -Release: 1%{?gh_date:.%{gh_date}git%{gh_short}}%{?dist} +Release: 2%{?gh_date:.%{gh_date}git%{gh_short}}%{?dist} Summary: SPDX licenses list and validation library Group: Development/Libraries @@ -44,7 +44,7 @@ BuildRequires: php-spl BuildRequires: php-composer(phpunit/phpunit) >= 4.5 BuildRequires: php-composer(phpunit/phpunit-mock-objects) >= 2.3 # Autoloader -BuildRequires: php-composer(symfony/class-loader) +BuildRequires: php-composer(fedora/autoloader) %endif # From composer.json, "require": { @@ -55,7 +55,7 @@ Requires: php-json Requires: php-pcre Requires: php-spl # Autoloader -Requires: php-composer(symfony/class-loader) +Requires: php-composer(fedora/autoloader) Provides: php-composer(%{gh_owner}/%{gh_project}) = %{version} @@ -142,6 +142,9 @@ rm -rf %{buildroot} %changelog +* Thu Oct 20 2016 Remi Collet <remi@fedoraproject.org> - 1.1.5-2 +- switch from symfony/class-loader to fedora/autoloader + * Wed Sep 28 2016 Remi Collet <remi@fedoraproject.org> - 1.1.5-1 - version 1.1.5 (new licenses) |