summaryrefslogtreecommitdiffstats
path: root/php-composer-semver-autoload.php
diff options
context:
space:
mode:
authorRemi Collet <fedora@famillecollet.com>2015-10-04 18:27:33 +0200
committerRemi Collet <fedora@famillecollet.com>2015-10-04 18:27:33 +0200
commitcb7c3de168c9e09e2b58b2a941d74f99f797d8f3 (patch)
tree4a713be9a2a763c9f071c06908b3598b7a2e0c51 /php-composer-semver-autoload.php
php-composer-semver: 1.0.0 - New package
Diffstat (limited to 'php-composer-semver-autoload.php')
-rw-r--r--php-composer-semver-autoload.php15
1 files changed, 15 insertions, 0 deletions
diff --git a/php-composer-semver-autoload.php b/php-composer-semver-autoload.php
new file mode 100644
index 0000000..c24f783
--- /dev/null
+++ b/php-composer-semver-autoload.php
@@ -0,0 +1,15 @@
+<?php
+/* 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();
+}
+
+$fedoraClassLoader->addPrefix('Composer\\Semver\\', dirname(dirname(__DIR__)));