From 4ad6a01536450b28c067b9a455bcbcae674fb515 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Sun, 21 Jun 2015 20:14:04 +0200 Subject: php-bartlett-PHP-Reflect: fix autoloader --- php-bartlett-PHP-Reflect-3.0.0-rpm.patch | 10 ++++++---- php-bartlett-PHP-Reflect.spec | 5 ++++- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/php-bartlett-PHP-Reflect-3.0.0-rpm.patch b/php-bartlett-PHP-Reflect-3.0.0-rpm.patch index c9b4c73..80e32f4 100644 --- a/php-bartlett-PHP-Reflect-3.0.0-rpm.patch +++ b/php-bartlett-PHP-Reflect-3.0.0-rpm.patch @@ -21,9 +21,10 @@ diff -up ./bin/phpreflect.json.dist.rpm ./bin/phpreflect.json.dist ], "analysers": [ ], +diff -up ./bin/phpreflect.rpm ./bin/phpreflect --- ./bin/phpreflect.rpm 2015-06-18 13:30:46.000000000 +0200 -+++ ./bin/phpreflect 2015-06-18 15:22:05.844085467 +0200 -@@ -5,19 +5,34 @@ ++++ ./bin/phpreflect 2015-06-21 20:10:01.185883366 +0200 +@@ -5,19 +5,35 @@ $appName = 'phpReflect'; if (\Phar::running()) { $vendorDir = 'phar://' . strtolower($appName) . '.phar/vendor'; } else { @@ -33,6 +34,7 @@ diff -up ./bin/phpreflect.json.dist.rpm ./bin/phpreflect.json.dist - if (!file_exists($vendorDir . '/autoload.php')) { - $vendorDir = dirname(dirname($baseDir)); - } ++ $vendorDir = '/usr/share/php'; + putenv('BARTLETT_COMPATINFO_DB=/usr/share/php-bartlett-PHP-CompatInfo/compatinfo.sqlite'); if (!getenv("BARTLETTRC")) { @@ -46,7 +48,7 @@ diff -up ./bin/phpreflect.json.dist.rpm ./bin/phpreflect.json.dist +PhpParser\Autoloader::register(); + +require_once $vendorDir . '/Symfony/Component/ClassLoader/UniversalClassLoader.php'; -+require_once $vendorDir . '/SebastianBergmann/Version/Version.php'; ++require_once $vendorDir . '/SebastianBergmann/Version/autoload.php'; + +use Symfony\Component\ClassLoader\UniversalClassLoader; + @@ -66,7 +68,7 @@ diff -up ./bin/phpreflect.json.dist.rpm ./bin/phpreflect.json.dist if (\Phar::running()) { if ($home) { -@@ -40,5 +55,5 @@ +@@ -40,5 +56,5 @@ use Bartlett\Reflect\Console\Application Environment::setScanDir(); diff --git a/php-bartlett-PHP-Reflect.spec b/php-bartlett-PHP-Reflect.spec index fb07c2c..34b46ae 100644 --- a/php-bartlett-PHP-Reflect.spec +++ b/php-bartlett-PHP-Reflect.spec @@ -21,7 +21,7 @@ Name: php-bartlett-PHP-Reflect Version: 3.1.1 -%global specrel 1 +%global specrel 2 Release: %{?gh_date:0.%{specrel}.%{?prever}%{!?prever:%{gh_date}git%{gh_short}}}%{!?gh_date:%{specrel}}%{?dist} Summary: Adds the ability to reverse-engineer PHP @@ -191,6 +191,9 @@ fi %changelog +* Sun Jun 21 2015 Remi Collet - 3.1.1-2 +- fix autoloader + * Thu Jun 18 2015 Remi Collet - 3.1.1-1 - update to 3.1.1 -- cgit