diff options
author | Remi Collet <fedora@famillecollet.com> | 2016-10-21 11:11:50 +0200 |
---|---|---|
committer | Remi Collet <fedora@famillecollet.com> | 2016-10-21 11:11:50 +0200 |
commit | 075e7621b8984f1711f5c3a11d0a9087f02c1a3c (patch) | |
tree | e789575946db7f0eefc3bd0620027b060c74cee1 | |
parent | 3d5f0a887dc4fe4d779172f92e90a81a66e6b3ed (diff) |
php-seld-cli-prompt: fedora autoloader
-rw-r--r-- | cli-prompt-autoload.php | 14 | ||||
-rw-r--r-- | php-seld-cli-prompt.spec | 9 |
2 files changed, 10 insertions, 13 deletions
diff --git a/cli-prompt-autoload.php b/cli-prompt-autoload.php index 1da2de3..31a752a 100644 --- a/cli-prompt-autoload.php +++ b/cli-prompt-autoload.php @@ -1,15 +1,9 @@ <?php /* Autoloader for seld/cli-prompt 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('Seld\\CliPrompt\\', dirname(dirname(__DIR__))); +\Fedora\Autoloader\Autoload::addPsr4('Seld\\CliPrompt\\', __DIR__); + diff --git a/php-seld-cli-prompt.spec b/php-seld-cli-prompt.spec index 6f2e7a6..5a458df 100644 --- a/php-seld-cli-prompt.spec +++ b/php-seld-cli-prompt.spec @@ -13,7 +13,7 @@ Name: php-seld-cli-prompt Version: 1.0.2 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Allows you to prompt for user input on the command line Group: Development/Libraries @@ -30,7 +30,7 @@ BuildRequires: php(language) >= 5.3 # For test BuildRequires: php-cli # Autoloader -BuildRequires: php-composer(symfony/class-loader) +BuildRequires: php-composer(fedora/autoloader) # From composer.json # "php": ">=5.3.0", @@ -39,7 +39,7 @@ Requires: php(language) >= 5.3.0 Requires: php-pcre Requires: php-spl # Autoloader -Requires: php-composer(symfony/class-loader) +Requires: php-composer(fedora/autoloader) Provides: php-composer(seld/cli-prompt) = %{version} @@ -94,6 +94,9 @@ rm -rf %{buildroot} %changelog +* Fri Oct 21 2016 Remi Collet <remi@fedoraproject.org> - 1.0.2-2 +- switch from symfony/class-loader to fedora/autoloader + * Mon Apr 18 2016 Remi Collet <remi@fedoraproject.org> - 1.0.2-1 - update to 1.0.2 |