summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <fedora@famillecollet.com>2016-10-20 19:02:53 +0200
committerRemi Collet <fedora@famillecollet.com>2016-10-20 19:02:53 +0200
commit39a7dab5bbe7465df3cbfcad0961b5f9372e9d71 (patch)
tree084cc41bc453c1ebeef30851c941a7f637a31b84
parent623b3c25b5da09870d5b8b4a7424583dbccb194c (diff)
php-composer-ca-bundle: switch from symfony/class-loader to fedora/autoloader
-rw-r--r--php-composer-ca-bundle-autoload.php13
-rw-r--r--php-composer-ca-bundle.spec9
2 files changed, 10 insertions, 12 deletions
diff --git a/php-composer-ca-bundle-autoload.php b/php-composer-ca-bundle-autoload.php
index 1a2459d..85241c7 100644
--- a/php-composer-ca-bundle-autoload.php
+++ b/php-composer-ca-bundle-autoload.php
@@ -2,14 +2,9 @@
/* Autoloader for composer/ca-bundle 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\\CaBundle\\', dirname(dirname(__DIR__)));
+\Fedora\Autoloader\Autoload::addPsr4('Composer\\CaBundle\\', __DIR__);
+
diff --git a/php-composer-ca-bundle.spec b/php-composer-ca-bundle.spec
index 121c852..b7e13e4 100644
--- a/php-composer-ca-bundle.spec
+++ b/php-composer-ca-bundle.spec
@@ -15,7 +15,7 @@
Name: php-composer-ca-bundle
Version: 1.0.4
-Release: 1%{?dist}
+Release: 2%{?dist}
Summary: Lets you find a path to the system CA
Group: Development/Libraries
@@ -38,7 +38,7 @@ BuildRequires: php-openssl
BuildRequires: php-pcre
BuildRequires: php-cli
# Autoloader
-BuildRequires: php-composer(symfony/class-loader)
+BuildRequires: php-composer(fedora/autoloader)
# ca-certificates
BuildRequires: %{_sysconfdir}/pki/tls/certs/ca-bundle.crt
%endif
@@ -53,7 +53,7 @@ Requires: php-pcre
# From phpcompatinfo report for version 1.0.3
#nothing
# Autoloader
-Requires: php-composer(symfony/class-loader)
+Requires: php-composer(fedora/autoloader)
# ca-certificates
Requires: %{_sysconfdir}/pki/tls/certs/ca-bundle.crt
@@ -121,6 +121,9 @@ rm -rf %{buildroot}
%changelog
+* Thu Oct 20 2016 Remi Collet <remi@fedoraproject.org> - 1.0.4-2
+- switch from symfony/class-loader to fedora/autoloader
+
* Mon Sep 5 2016 Remi Collet <remi@fedoraproject.org> - 1.0.4-1
- update to 1.0.4 (no change)