summaryrefslogtreecommitdiffstats
path: root/php-bartlett-PHP-CompatInfo-4.0.0-rpm.patch
diff options
context:
space:
mode:
Diffstat (limited to 'php-bartlett-PHP-CompatInfo-4.0.0-rpm.patch')
-rw-r--r--php-bartlett-PHP-CompatInfo-4.0.0-rpm.patch101
1 files changed, 101 insertions, 0 deletions
diff --git a/php-bartlett-PHP-CompatInfo-4.0.0-rpm.patch b/php-bartlett-PHP-CompatInfo-4.0.0-rpm.patch
new file mode 100644
index 0000000..572f5b1
--- /dev/null
+++ b/php-bartlett-PHP-CompatInfo-4.0.0-rpm.patch
@@ -0,0 +1,101 @@
+diff -up ./bin/phpcompatinfo.json.dist.rpm ./bin/phpcompatinfo.json.dist
+diff -up ./bin/phpcompatinfo.rpm ./bin/phpcompatinfo
+--- ./bin/phpcompatinfo.rpm 2015-01-19 14:09:01.286113786 +0100
++++ ./bin/phpcompatinfo 2015-01-19 14:11:55.099839603 +0100
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env php
++#!/usr/bin/php
+ <?php
+ ini_set('memory_limit', -1);
+ $appName = 'phpCompatInfo';
+@@ -17,8 +17,26 @@ if (\Phar::running()) {
+ putenv("BARTLETTRC=" . strtolower($appName) . '.json');
+ }
+ }
+-$loader = require_once $vendorDir . '/autoload.php';
+-$loader->setUseIncludePath(true);
++
++$vendorDir = '/usr/share/php';
++require_once $vendorDir . '/PhpParser/Autoloader.php';
++PhpParser\Autoloader::register();
++
++require_once $vendorDir . '/SebastianBergmann/Version/Version.php';
++
++require_once $vendorDir . '/Symfony/Component/ClassLoader/UniversalClassLoader.php';
++use Symfony\Component\ClassLoader\UniversalClassLoader;
++
++$loader = new UniversalClassLoader();
++$loader->registerNamespaces(array(
++ 'Symfony\\Component' => $vendorDir,
++ 'Doctrine\\Common' => $vendorDir,
++ 'phpDocumentor\\Reflection' => $vendorDir,
++ 'Seld\\JsonLint' => $vendorDir,
++ 'JsonSchema' => $vendorDir,
++ 'Bartlett' => $vendorDir,
++));
++$loader->register();
+
+ if (PHP_SAPI !== 'cli') {
+ return;
+diff -up ./tests/bootstrap.php.rpm ./tests/bootstrap.php
+--- ./tests/bootstrap.php.rpm 2015-01-16 17:51:57.000000000 +0100
++++ ./tests/bootstrap.php 2015-01-19 14:13:45.494300591 +0100
+@@ -1,8 +1,30 @@
+ <?php
+
+ $baseDir = dirname(__DIR__);
+-$vendorDir = $baseDir . '/vendor';
++$vendorDir = '/usr/share/php';
+
+-require_once $vendorDir . '/autoload.php';
++require_once $vendorDir . '/PhpParser/Autoloader.php';
++PhpParser\Autoloader::register();
+
++require_once $vendorDir . '/SebastianBergmann/Version/Version.php';
++
++require_once $vendorDir . '/Symfony/Component/ClassLoader/UniversalClassLoader.php';
++use Symfony\Component\ClassLoader\UniversalClassLoader;
++
++$loader = new UniversalClassLoader();
++$loader->registerNamespaces(array(
++ 'Doctrine\\Common' => $vendorDir,
++ 'phpDocumentor\\Reflection' => $vendorDir,
++ 'Symfony\\Component' => $vendorDir,
++ 'Seld\\JsonLint' => $vendorDir,
++ 'JsonSchema' => $vendorDir,
++ 'Bartlett\\Reflect' => $vendorDir,
++ 'Bartlett\\Tests\\CompatInfo' => $baseDir . '/tests',
++ 'Bartlett' => $baseDir . '/src',
++ ));
++
++$loader->register();
++
++# Class not catched by autoloader
++require $vendorDir . '/Bartlett/Reflect.php';
+ require __DIR__ . '/Reference/GenericTest.php';
+diff -up ./data/handleDB.php.rpm ./data/handleDB.php
+--- ./data/handleDB.php.rpm 2015-01-19 14:17:57.871354474 +0100
++++ ./data/handleDB.php 2015-01-19 14:20:42.213040384 +0100
+@@ -11,7 +11,21 @@
+ * @since Release 4.0.0alpha3
+ */
+
+-require_once dirname(__DIR__) . '/vendor/autoload.php';
++$baseDir = dirname(__DIR__);
++$vendorDir = '/usr/share/php';
++require_once $vendorDir . '/Symfony/Component/ClassLoader/UniversalClassLoader.php';
++use Symfony\Component\ClassLoader\UniversalClassLoader;
++
++$loader = new UniversalClassLoader();
++$loader->registerNamespaces(array(
++ 'Doctrine\\Common' => $vendorDir,
++ 'Symfony\\Component' => $vendorDir,
++ 'Bartlett\\Reflect' => $vendorDir,
++ 'Bartlett' => $baseDir . '/src',
++ ));
++
++$loader->register();
++
+ require_once __DIR__ . '/ReferenceCollection.php';
+
+ use Symfony\Component\Console\Helper\ProgressBar;