diff options
author | Remi Collet <fedora@famillecollet.com> | 2014-07-08 11:06:36 +0200 |
---|---|---|
committer | Remi Collet <fedora@famillecollet.com> | 2014-07-08 11:06:36 +0200 |
commit | 6db26a5dd1a054f30b6b39c447f2642e017e4fab (patch) | |
tree | a77aeb44cd46513c8165b3b3bb4573f14a498875 | |
parent | 49772251513cf0694cb9d0dde2a38484e2d3f1b1 (diff) |
php-bartlett-PHP-Reflect: 2.1.0 (update differed until phpcompatinfo 3.2 release)
-rw-r--r-- | php-bartlett-PHP-Reflect-rpm.patch | 112 | ||||
-rw-r--r-- | php-bartlett-PHP-Reflect.spec | 26 |
2 files changed, 62 insertions, 76 deletions
diff --git a/php-bartlett-PHP-Reflect-rpm.patch b/php-bartlett-PHP-Reflect-rpm.patch index e5202a9..fcf5ffd 100644 --- a/php-bartlett-PHP-Reflect-rpm.patch +++ b/php-bartlett-PHP-Reflect-rpm.patch @@ -1,6 +1,6 @@ -diff -up php-reflect-b45be1d0d1b5a46253f9cda894dd7717f0a64abd/bin/reflect.json.rpm php-reflect-b45be1d0d1b5a46253f9cda894dd7717f0a64abd/bin/reflect.json ---- php-reflect-b45be1d0d1b5a46253f9cda894dd7717f0a64abd/bin/reflect.json.rpm 2014-04-04 23:06:38.000000000 +0200 -+++ php-reflect-b45be1d0d1b5a46253f9cda894dd7717f0a64abd/bin/reflect.json 2014-05-13 09:00:40.429251143 +0200 +diff -up ./bin/phpreflect.json.rpm ./bin/phpreflect.json +--- ./bin/phpreflect.json.rpm 2014-07-04 20:47:50.000000000 +0200 ++++ ./bin/phpreflect.json 2014-07-08 10:41:15.517221093 +0200 @@ -1,30 +1,8 @@ { "source-providers": [ @@ -34,94 +34,66 @@ diff -up php-reflect-b45be1d0d1b5a46253f9cda894dd7717f0a64abd/bin/reflect.json.r } ], "plugins": [ -diff -up php-reflect-b45be1d0d1b5a46253f9cda894dd7717f0a64abd/bin/reflect.rpm php-reflect-b45be1d0d1b5a46253f9cda894dd7717f0a64abd/bin/reflect ---- php-reflect-b45be1d0d1b5a46253f9cda894dd7717f0a64abd/bin/reflect.rpm 2014-04-04 23:06:38.000000000 +0200 -+++ php-reflect-b45be1d0d1b5a46253f9cda894dd7717f0a64abd/bin/reflect 2014-05-13 09:00:49.864286548 +0200 -@@ -1,31 +1,38 @@ --#!/usr/bin/env php -+#!/usr/bin/php - <?php - // CLI version --//putenv("REFLECT=/path/to/reflect.json"); -+if (!getenv("REFLECT")) { -+ $files = array( -+ realpath('./reflect.json'), -+ getenv('HOME').'/.config/phpreflect.json', -+ '/etc/phpreflect.json', -+ ); -+ foreach ($files as $file) { -+ if (file_exists($file)) { -+ putenv("REFLECT=$file"); -+ break; -+ } -+ } -+} - --$baseDir = dirname(__DIR__); --$vendorDir = $baseDir . '/vendor'; -+$vendorDir = '/usr/share/php'; +diff -up ./bin/phpreflect.rpm ./bin/phpreflect +--- ./bin/phpreflect.rpm 2014-07-08 10:41:15.517221093 +0200 ++++ ./bin/phpreflect 2014-07-08 10:49:23.585395326 +0200 +@@ -5,7 +5,7 @@ if (\Phar::running()) { + $vendorDir = 'phar://phpreflect.phar/vendor'; + } else { + $baseDir = dirname(__DIR__); +- $vendorDir = $baseDir . '/vendor'; ++ $vendorDir = '/usr/share/php'; --if (\Phar::running()) { -- require_once 'phar://phpreflect.phar/vendor/nikic/php-parser/lib/bootstrap.php'; -- require_once 'phar://phpreflect.phar/vendor/symfony/class-loader/Symfony/Component/ClassLoader/UniversalClassLoader.php'; -- require_once 'phar://phpreflect.phar/vendor/phpunit/php-timer/PHP/Timer.php'; --} else { -- require_once $vendorDir . '/nikic/php-parser/lib/bootstrap.php'; -- require_once $vendorDir . '/symfony/class-loader/Symfony/Component/ClassLoader/UniversalClassLoader.php'; -- require_once $vendorDir . '/phpunit/php-timer/PHP/Timer.php'; --} + if (!getenv("REFLECT")) { + $files = array( +@@ -21,7 +21,24 @@ if (\Phar::running()) { + } + } + } +-require_once $vendorDir . '/autoload.php'; +require_once $vendorDir . '/PhpParser/Autoloader.php'; +PhpParser\Autoloader::register(); + +require_once $vendorDir . '/Symfony/Component/ClassLoader/UniversalClassLoader.php'; + +require_once $vendorDir . '/PHP/Timer.php'; - - use Symfony\Component\ClassLoader\UniversalClassLoader; - - $loader = new UniversalClassLoader(); - $loader->registerNamespaces(array( -- 'Symfony\\Component\\Finder' => $vendorDir . '/symfony/finder', -- 'Symfony\\Component\\EventDispatcher' => $vendorDir . '/symfony/event-dispatcher', -- 'Symfony\\Component\\Console' => $vendorDir . '/symfony/console', -- 'Symfony\\Component\\ClassLoader' => $vendorDir . '/symfony/class-loader', -- 'Bartlett\\Tests\\Reflect' => $baseDir . '/tests', -- 'Bartlett' => $baseDir . '/src', ++ ++use Symfony\Component\ClassLoader\UniversalClassLoader; ++ ++$loader = new UniversalClassLoader(); ++$loader->registerNamespaces(array( + 'Symfony\\Component\\Finder' => $vendorDir, + 'Symfony\\Component\\EventDispatcher' => $vendorDir, + 'Symfony\\Component\\Console' => $vendorDir, + 'Symfony\\Component\\ClassLoader' => $vendorDir, + 'Bartlett' => $vendorDir, - )); - $loader->register(); ++)); ++$loader->register(); -diff -up php-reflect-b45be1d0d1b5a46253f9cda894dd7717f0a64abd/tests/bootstrap.php.rpm php-reflect-b45be1d0d1b5a46253f9cda894dd7717f0a64abd/tests/bootstrap.php ---- php-reflect-b45be1d0d1b5a46253f9cda894dd7717f0a64abd/tests/bootstrap.php.rpm 2014-04-04 23:06:38.000000000 +0200 -+++ php-reflect-b45be1d0d1b5a46253f9cda894dd7717f0a64abd/tests/bootstrap.php 2014-05-13 09:00:40.429251143 +0200 -@@ -1,20 +1,19 @@ + if (PHP_SAPI !== 'cli') { + return; +diff -up ./tests/bootstrap.php.rpm ./tests/bootstrap.php +--- ./tests/bootstrap.php.rpm 2014-07-08 10:41:15.517221093 +0200 ++++ ./tests/bootstrap.php 2014-07-08 10:45:43.280413655 +0200 +@@ -1,6 +1,19 @@ <?php $baseDir = dirname(__DIR__); -$vendorDir = $baseDir . '/vendor'; +$vendorDir = '/usr/share/php'; --require_once $vendorDir . '/nikic/php-parser/lib/bootstrap.php'; --require_once $vendorDir . '/symfony/class-loader/Symfony/Component/ClassLoader/UniversalClassLoader.php'; +-require_once $vendorDir . '/autoload.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( -- 'Symfony\\Component\\Finder' => $vendorDir . '/symfony/finder', -- 'Symfony\\Component\\EventDispatcher' => $vendorDir . '/symfony/event-dispatcher', -- 'Symfony\\Component\\Console' => $vendorDir . '/symfony/console', -- 'Symfony\\Component\\ClassLoader' => $vendorDir . '/symfony/class-loader', - 'Bartlett\\Tests\\Reflect' => $baseDir . '/tests', - 'Bartlett' => $baseDir . '/src', - )); ++ ++use Symfony\Component\ClassLoader\UniversalClassLoader; ++ ++$loader = new UniversalClassLoader(); ++$loader->registerNamespaces(array( ++ 'Bartlett\\Tests\\Reflect' => $baseDir . '/tests', ++ 'Bartlett' => $baseDir . '/src', ++)); +$loader->useIncludePath(true); - $loader->register(); ++$loader->register(); diff --git a/php-bartlett-PHP-Reflect.spec b/php-bartlett-PHP-Reflect.spec index 1bed541..4af9600 100644 --- a/php-bartlett-PHP-Reflect.spec +++ b/php-bartlett-PHP-Reflect.spec @@ -6,14 +6,14 @@ # # Please, preserve the changelog entries # -%global gh_commit b45be1d0d1b5a46253f9cda894dd7717f0a64abd +%global gh_commit f8ae7703ca47b2063adb00fe8510e4817ff9aa61 %global gh_short %(c=%{gh_commit}; echo ${c:0:7}) %global gh_owner llaville %global gh_project php-reflect Name: php-bartlett-PHP-Reflect -Version: 2.0.0 -Release: 2%{?dist} +Version: 2.1.0 +Release: 1%{?dist} Summary: Adds the ability to reverse-engineer PHP Group: Development/Libraries @@ -38,6 +38,16 @@ BuildRequires: php-symfony-finder >= 2.4 BuildRequires: php-symfony-console >= 2.4 # From composer.json +# "php": ">=5.3.0", +# "ext-tokenizer": "*", +# "ext-pcre": "*", +# "ext-spl": "*", +# "ext-json": "*", +# "phpunit/php-timer": ">=1.0.0", +# "nikic/php-parser": "1.0.0beta1", +# "symfony/event-dispatcher": "~2.4", +# "symfony/finder": "~2.4", +# "symfony/console": "~2.4" Requires: php(language) >= 5.3 Requires: php-json Requires: php-pcre @@ -45,10 +55,11 @@ Requires: php-spl Requires: php-tokenizer Requires: php-phpunit-PHP-Timer >= 1.0.5-3 Requires: php-PHPParser >= 1.0.0 -Requires: php-symfony-classloader >= 2.4 Requires: php-symfony-eventdispatcher >= 2.4 Requires: php-symfony-finder >= 2.4 Requires: php-symfony-console >= 2.4 +# For our patch +Requires: php-symfony-classloader >= 2.4 # From package.xml Requires: php-date Requires: php-reflection @@ -81,8 +92,8 @@ rm -rf %{buildroot} mkdir -p %{buildroot}%{_datadir}/php cp -pr src/Bartlett %{buildroot}%{_datadir}/php/Bartlett -install -D -p -m 755 bin/reflect %{buildroot}%{_bindir}/phpreflect -install -D -p -m 644 bin/reflect.json %{buildroot}%{_sysconfdir}/phpreflect.json +install -D -p -m 755 bin/phpreflect %{buildroot}%{_bindir}/phpreflect +install -D -p -m 644 bin/phpreflect.json %{buildroot}%{_sysconfdir}/phpreflect.json %check @@ -111,6 +122,9 @@ fi %changelog +* Tue Jul 8 2014 Remi Collet <remi@fedoraproject.org> - 2.1.0-1 +- Update to 2.1.0 + * Mon May 26 2014 Remi Collet <remi@fedoraproject.org> - 2.0.0-2 - fix dependencies |