From 0fc1daf31ff1c92aaf6fe1dc7cd0e8c39db935ad Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Tue, 6 Jan 2015 17:59:23 +0100 Subject: php-bartlett-PHP-Reflect: 3.0.0 alpha2 --- php-bartlett-PHP-Reflect-3.0.0-rpm.patch | 106 +++++++++++++++++++++++++++++++ php-bartlett-PHP-Reflect-dev.spec | 2 +- 2 files changed, 107 insertions(+), 1 deletion(-) create mode 100644 php-bartlett-PHP-Reflect-3.0.0-rpm.patch diff --git a/php-bartlett-PHP-Reflect-3.0.0-rpm.patch b/php-bartlett-PHP-Reflect-3.0.0-rpm.patch new file mode 100644 index 0000000..c110e33 --- /dev/null +++ b/php-bartlett-PHP-Reflect-3.0.0-rpm.patch @@ -0,0 +1,106 @@ +diff -up ./bin/phpreflect.json.dist.rpm ./bin/phpreflect.json.dist +--- ./bin/phpreflect.json.dist.rpm 2015-01-05 17:32:31.000000000 +0100 ++++ ./bin/phpreflect.json.dist 2015-01-06 17:26:55.756023189 +0100 +@@ -9,6 +9,19 @@ + { + "name": "Analyser", + "class": "Bartlett\\Reflect\\Plugin\\Analyser\\AnalyserPlugin" ++ }, ++ { ++ "name": "Cache", ++ "class": "Bartlett\\Reflect\\Plugin\\Cache\\CachePlugin", ++ "options": { ++ "adapter": "DoctrineCacheAdapter", ++ "backend": { ++ "class": "Doctrine\\Common\\Cache\\FilesystemCache", ++ "args": [ ++ "%{HOME}/.cache/phpreflect" ++ ] ++ } ++ } + } + ], + "analysers" : [ +diff -up ./bin/phpreflect.rpm ./bin/phpreflect +--- ./bin/phpreflect.rpm 2015-01-06 17:26:55.757023193 +0100 ++++ ./bin/phpreflect 2015-01-06 17:39:21.867932297 +0100 +@@ -1,23 +1,35 @@ +-#!/usr/bin/env php ++#!/usr/bin/php + setUseIncludePath(true); ++require_once $vendorDir . '/PhpParser/Autoloader.php'; ++PhpParser\Autoloader::register(); ++ ++require_once $vendorDir . '/Symfony/Component/ClassLoader/UniversalClassLoader.php'; ++require_once $vendorDir . '/SebastianBergmann/Version/Version.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->useIncludePath(true); ++$loader->register(); + + if (PHP_SAPI !== 'cli') { + return; +diff -up ./tests/bootstrap.php.rpm ./tests/bootstrap.php +--- ./tests/bootstrap.php.rpm 2015-01-06 17:26:55.757023193 +0100 ++++ ./tests/bootstrap.php 2015-01-06 17:44:46.957205474 +0100 +@@ -1,12 +1,21 @@ + addClassMap( +- array( +- 'Bartlett\Tests\Reflect\Model\GenericModelTest' +- => __DIR__ . '/Model/GenericModelTest.php', +- ) +-); ++require_once $vendorDir . '/PhpParser/Autoloader.php'; ++PhpParser\Autoloader::register(); ++ ++require_once $vendorDir . '/Symfony/Component/ClassLoader/UniversalClassLoader.php'; ++ ++use Symfony\Component\ClassLoader\UniversalClassLoader; ++ ++$loader = new UniversalClassLoader(); ++$loader->registerNamespaces(array( ++ 'Bartlett\\Tests\\Reflect' => $baseDir . '/tests', ++ 'Bartlett' => $baseDir . '/src', ++)); ++$loader->useIncludePath(true); ++$loader->register(); ++ ++require_once __DIR__ . '/Model/GenericModelTest.php'; +diff -up ./tests/EnvironmentTest.php.rpm ./tests/EnvironmentTest.php diff --git a/php-bartlett-PHP-Reflect-dev.spec b/php-bartlett-PHP-Reflect-dev.spec index 78a02c8..f9276af 100644 --- a/php-bartlett-PHP-Reflect-dev.spec +++ b/php-bartlett-PHP-Reflect-dev.spec @@ -25,7 +25,7 @@ Source0: https://github.com/%{gh_owner}/%{gh_project}/archive/%{gh_commit # Autoloader for RPM - die composer ! # Enable cache plugin -Patch0: %{name}-rpm.patch +Patch0: %{name}-3.0.0-rpm.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildArch: noarch -- cgit