From ac2d615b6b59328ad9e5f396201469428844f5f5 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Tue, 20 Jan 2015 10:10:54 +0100 Subject: php-bartlett-PHP-Reflect: fix composer only code --- php-bartlett-PHP-Reflect-3.0.0-pr17.patch | 33 +++++++++++++++++++++++++++++++ php-bartlett-PHP-Reflect-dev.spec | 8 +++++++- 2 files changed, 40 insertions(+), 1 deletion(-) create mode 100644 php-bartlett-PHP-Reflect-3.0.0-pr17.patch diff --git a/php-bartlett-PHP-Reflect-3.0.0-pr17.patch b/php-bartlett-PHP-Reflect-3.0.0-pr17.patch new file mode 100644 index 0000000..ec31de7 --- /dev/null +++ b/php-bartlett-PHP-Reflect-3.0.0-pr17.patch @@ -0,0 +1,33 @@ +From 6f0959bceb5f4f07971d74fe0f2d47e5113e09ad Mon Sep 17 00:00:00 2001 +From: Remi Collet +Date: Tue, 20 Jan 2015 09:42:46 +0100 +Subject: [PATCH] fix "composer only" bug, rely in include_path + +--- + src/Bartlett/Reflect/Api/V3/Analyser.php | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/src/Bartlett/Reflect/Api/V3/Analyser.php b/src/Bartlett/Reflect/Api/V3/Analyser.php +index 373070b..5a78942 100644 +--- a/src/Bartlett/Reflect/Api/V3/Analyser.php ++++ b/src/Bartlett/Reflect/Api/V3/Analyser.php +@@ -65,6 +65,7 @@ public function run($source, array $analysers, $alias) + + protected function registerAnalysers() + { ++ $file = 'Bartlett/CompatInfo/Analyser/CompatibilityAnalyser.php'; + $reflectBaseDir = dirname(dirname(dirname(dirname(dirname(__DIR__))))); + + $baseDir = dirname(dirname(dirname($reflectBaseDir))); +@@ -77,7 +78,11 @@ protected function registerAnalysers() + $namespaces['Bartlett\CompatInfo\Analyser'] + = $baseDir . '/src/Bartlett/CompatInfo/Analyser' + ; ++ } else if ($path = stream_resolve_include_path($file)) { ++ // CompatInfo only, without composer ++ $namespaces['Bartlett\CompatInfo\Analyser'] = dirname($path); + } ++ + $am = new AnalyserManager($namespaces); + $am->registerAnalysers(); + diff --git a/php-bartlett-PHP-Reflect-dev.spec b/php-bartlett-PHP-Reflect-dev.spec index 5c50e92..7c564e5 100644 --- a/php-bartlett-PHP-Reflect-dev.spec +++ b/php-bartlett-PHP-Reflect-dev.spec @@ -14,7 +14,7 @@ Name: php-bartlett-PHP-Reflect Version: 3.0.0 -%global specrel 3 +%global specrel 4 Release: %{?gh_short:0.%{specrel}.%{?gh_date}git%{gh_short}}%{!?gh_short:%{specrel}}%{?dist} Summary: Adds the ability to reverse-engineer PHP @@ -27,6 +27,8 @@ Source0: https://github.com/%{gh_owner}/%{gh_project}/archive/%{gh_commit # Enable cache plugin Patch0: %{name}-3.0.0-rpm.patch +Patch1: %{name}-3.0.0-pr17.patch + BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildArch: noarch BuildRequires: php(language) >= 5.3 @@ -118,6 +120,7 @@ Documentation: http://php5.laurent-laville.org/reflect/manual/current/en/ %setup -q -n %{gh_project}-%{gh_commit} %patch0 -p1 -b .rpm +%patch1 -p1 sed -e 's/@package_version@/%{version}/' \ -i $(find src -name \*.php) @@ -165,6 +168,9 @@ fi %changelog +* Tue Jan 20 2015 Remi Collet - 3.0.0-0.4.20150118git398cdae +- fix composer only code (pr #17) + * Mon Jan 19 2015 Remi Collet - 3.0.0-0.3.20150118git398cdae - new 3.0 snapshot -- cgit