summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--php-bartlett-PHP-CompatInfo-5.0.0-autoload.php20
-rw-r--r--php-bartlett-PHP-CompatInfo.spec9
2 files changed, 11 insertions, 18 deletions
diff --git a/php-bartlett-PHP-CompatInfo-5.0.0-autoload.php b/php-bartlett-PHP-CompatInfo-5.0.0-autoload.php
index cf3b6a5..4297383 100644
--- a/php-bartlett-PHP-CompatInfo-5.0.0-autoload.php
+++ b/php-bartlett-PHP-CompatInfo-5.0.0-autoload.php
@@ -3,21 +3,11 @@
* Autoloader for bartlett/php-compatinfo and its dependencies
*/
-$vendorDir = '/usr/share/php';
+require_once '/usr/share/php/Fedora/Autoloader/autoload.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();
-}
-$fedoraClassLoader->addPrefixes(array(
- 'Bartlett\\CompatInfo' => dirname(dirname(__DIR__)),
+\Fedora\Autoloader\Autoload::addPsr4('Bartlett\\CompatInfo\\', __DIR__);
+\Fedora\Autoloader\Dependencies::required(array(
+ '/usr/share/php/Bartlett/Reflect/autoload.php',
+ '/usr/share/php/Bartlett/CompatInfoDb/autoload.php',
));
-// Dependencies
-require_once $vendorDir . '/Bartlett/Reflect/autoload.php';
-require_once $vendorDir . '/Bartlett/CompatInfoDb/autoload.php';
diff --git a/php-bartlett-PHP-CompatInfo.spec b/php-bartlett-PHP-CompatInfo.spec
index a2d6202..de9fc40 100644
--- a/php-bartlett-PHP-CompatInfo.spec
+++ b/php-bartlett-PHP-CompatInfo.spec
@@ -17,7 +17,7 @@
Name: php-bartlett-PHP-CompatInfo
Version: 5.0.1
-%global specrel 1
+%global specrel 2
Release: %{?gh_date:0.%{specrel}.%{?prever}%{!?prever:%{gh_date}git%{gh_short}}}%{!?gh_date:%{specrel}}%{?dist}
Summary: Find out version and the extensions required for a piece of code to run
@@ -44,7 +44,7 @@ BuildRequires: php-pdo_sqlite
BuildRequires: php-composer(bartlett/php-reflect) >= 4.0
BuildRequires: php-composer(bartlett/php-compatinfo-db) >= 1.0
# For our patch / autoloader
-BuildRequires: php-composer(symfony/class-loader)
+BuildRequires: php-composer(fedora/autoloader)
%endif
# From composer.json, "require"
@@ -89,7 +89,7 @@ Requires: php-composer(symfony/console) < 3
# "doctrine/cache": "Allow caching results, since bartlett/php-reflect 2.2"
# "bartlett/umlwriter": "Allow writing UML class diagrams (Graphviz or PlantUML)"
# Required by autoloader
-Requires: php-composer(symfony/class-loader)
+Requires: php-composer(fedora/autoloader)
Provides: phpcompatinfo = %{version}
Provides: php-composer(bartlett/php-compatinfo) = %{version}
@@ -177,6 +177,9 @@ fi
%changelog
+* Mon Oct 31 2016 Remi Collet <remi@fedoraproject.org> - 5.0.1-2
+- switch to fedora/autoloader
+
* Wed Jul 6 2016 Remi Collet <remi@fedoraproject.org> - 5.0.1-1
- update to 5.0.1