summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--composer-autoload.php31
-rw-r--r--composer-bootstrap.php4
-rw-r--r--composer.spec12
3 files changed, 26 insertions, 21 deletions
diff --git a/composer-autoload.php b/composer-autoload.php
index 11b8043..65c331f 100644
--- a/composer-autoload.php
+++ b/composer-autoload.php
@@ -1,18 +1,21 @@
<?php
$vendorDir = '/usr/share/php';
-require_once $vendorDir . '/Symfony/Component/ClassLoader/UniversalClassLoader.php';
-use Symfony\Component\ClassLoader\UniversalClassLoader;
+// 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';
+ }
-$loader = new UniversalClassLoader();
-$loader->registerNamespaces(array(
- 'Seld\\JsonLint' => $vendorDir,
- 'Seld\\PharUtils' => $vendorDir,
- 'Seld\\CliPrompt' => $vendorDir,
- 'JsonSchema' => $vendorDir,
- 'Symfony\\Component\\Console' => $vendorDir,
- 'Symfony\\Component\\Finder' => $vendorDir,
- 'Symfony\\Component\\Process' => $vendorDir,
- 'Symfony\\Component\\ClassLoader' => $vendorDir,
- 'Composer' => dirname(__DIR__)
+ $fedoraClassLoader = new \Symfony\Component\ClassLoader\ClassLoader();
+ $fedoraClassLoader->register();
+}
+
+$fedoraClassLoader->addPrefixes(array(
+ 'Seld\\JsonLint\\' => $vendorDir,
+ 'Seld\\PharUtils\\' => $vendorDir,
+ 'Seld\\CliPrompt\\' => $vendorDir,
+ 'JsonSchema\\' => $vendorDir,
+ 'Symfony\\Component\\' => $vendorDir,
+ 'Composer\\' => dirname(__DIR__)
));
-$loader->register();
+$fedoraClassLoader->register();
diff --git a/composer-bootstrap.php b/composer-bootstrap.php
index dcc5a5a..713835a 100644
--- a/composer-bootstrap.php
+++ b/composer-bootstrap.php
@@ -1,6 +1,4 @@
<?php
require 'Composer/autoload.php';
-$loader->registerNamespaces(array(
- 'Composer\\Test' => __DIR__
-));
+$fedoraClassLoader->addPrefix('Composer\\Test\\', __DIR__);
require __DIR__.'/Composer/TestCase.php';
diff --git a/composer.spec b/composer.spec
index eabb88a..c86d9dc 100644
--- a/composer.spec
+++ b/composer.spec
@@ -6,17 +6,17 @@
#
# Please, preserve the changelog entries
#
-%global gh_commit d0ff01698de0eb74e45ebe379b6ac8ccd5a6b0db
+%global gh_commit 943107cfe717a74aa791f57b87fa514c88582b0d
%global gh_short %(c=%{gh_commit}; echo ${c:0:7})
%global gh_branch 1.0-dev
-%global gh_date 20150620
+%global gh_date 20150626
%global gh_owner composer
%global gh_project composer
%global with_tests %{?_without_tests:0}%{!?_without_tests:1}
Name: composer
Version: 1.0.0
-Release: 0.5.%{gh_date}git%{gh_short}%{?dist}
+Release: 0.6.%{gh_date}git%{gh_short}%{?dist}
Summary: Dependency Manager for PHP
Group: Development/Libraries
@@ -149,7 +149,7 @@ install -Dpm 755 bin/%{name} %{buildroot}%{_bindir}/%{name}
%if %{with_tests}
: Run test suite
export BUILDROOT=%{buildroot}
-%{_bindir}/phpunit --include-path $PWD/src --verbose
+%{_bindir}/phpunit --include-path %{buildroot}%{_datadir}/php --verbose
%else
: Test suite disabled
%endif
@@ -171,6 +171,10 @@ rm -rf %{buildroot}
%changelog
+* Mon Jun 29 2015 Remi Collet <remi@fedoraproject.org> - 1.0.0-0.6.20150626git943107c
+- new snapshot
+- review autoloader
+
* Sun Jun 21 2015 Remi Collet <remi@fedoraproject.org> - 1.0.0-0.5.20150620gitd0ff016
- new snapshot
- add missing BR on php-zip