summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <fedora@famillecollet.com>2016-10-31 17:48:53 +0100
committerRemi Collet <fedora@famillecollet.com>2016-10-31 17:48:53 +0100
commit6ae9a865ffc5d89213e7e0dacc3e0133af2c8d1c (patch)
tree09f251f7344027d05100243401741a2a7d81de16
parent15fc400691d0cfe3dec58e19b99568904cf63972 (diff)
php-phpunit-PHPUnit: autoloader (very minor) fix, for phpci
-rw-r--r--php-phpunit-PHPUnit.spec5
-rw-r--r--phpunit-5.4.0-Autoload.php.in5
2 files changed, 8 insertions, 2 deletions
diff --git a/php-phpunit-PHPUnit.spec b/php-phpunit-PHPUnit.spec
index cd1ca2a..eea83d2 100644
--- a/php-phpunit-PHPUnit.spec
+++ b/php-phpunit-PHPUnit.spec
@@ -18,7 +18,7 @@
%global pear_channel pear.phpunit.de
%global major 5.6
%global minor 2
-%global specrel 1
+%global specrel 2
Name: php-phpunit-PHPUnit
Version: %{major}.%{minor}
@@ -237,6 +237,9 @@ fi
%changelog
+* Mon Oct 31 2016 Remi Collet <remi@fedoraproject.org> - 5.6.2-2
+- fix autoloader (don't use symfony one for symfony components)
+
* Tue Oct 25 2016 Remi Collet <remi@fedoraproject.org> - 5.6.2-1
- update to 5.6.2 (no change)
- switch to fedora/autoloader
diff --git a/phpunit-5.4.0-Autoload.php.in b/phpunit-5.4.0-Autoload.php.in
index 6466fb8..93a47af 100644
--- a/phpunit-5.4.0-Autoload.php.in
+++ b/phpunit-5.4.0-Autoload.php.in
@@ -12,8 +12,11 @@ if (!class_exists('Fedora\\Autoloader\\Autoload', false)) {
__DIR__
);
+/* don't use symfony autoloader which pull some unwanted stuff (polyfill) */
+$vendorDir = stream_resolve_include_path('Symfony/Component/Yaml/Yaml.php');
+\Fedora\Autoloader\Autoload::addPsr4('Symfony\\Component\\', dirname(dirname($vendorDir)));
+
/* Required */
-require_once 'Symfony/Component/autoload.php';
require_once 'File/Iterator/Autoload.php';
require_once 'SebastianBergmann/CodeCoverage/autoload.php';
require_once 'PHP/Timer/Autoload.php';