diff options
author | Remi Collet <fedora@famillecollet.com> | 2015-02-12 15:26:37 +0100 |
---|---|---|
committer | Remi Collet <fedora@famillecollet.com> | 2015-02-12 15:26:37 +0100 |
commit | 22c0e45b456799668a8036a78685ef458a47b223 (patch) | |
tree | f56b12c832e7502ac548a5d1c24374bc692c9313 | |
parent | ac2d615b6b59328ad9e5f396201469428844f5f5 (diff) |
php-bartlett-PHP-Reflect: 3.0.0beta1
-rw-r--r-- | php-bartlett-PHP-Reflect-3.0.0-pr17.patch | 33 | ||||
-rw-r--r-- | php-bartlett-PHP-Reflect-3.0.0-rpm.patch | 28 | ||||
-rw-r--r-- | php-bartlett-PHP-Reflect-dev.spec | 22 |
3 files changed, 31 insertions, 52 deletions
diff --git a/php-bartlett-PHP-Reflect-3.0.0-pr17.patch b/php-bartlett-PHP-Reflect-3.0.0-pr17.patch deleted file mode 100644 index ec31de7..0000000 --- a/php-bartlett-PHP-Reflect-3.0.0-pr17.patch +++ /dev/null @@ -1,33 +0,0 @@ -From 6f0959bceb5f4f07971d74fe0f2d47e5113e09ad Mon Sep 17 00:00:00 2001 -From: Remi Collet <fedora@famillecollet.com> -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-3.0.0-rpm.patch b/php-bartlett-PHP-Reflect-3.0.0-rpm.patch index 06b3b79..4b02fc4 100644 --- a/php-bartlett-PHP-Reflect-3.0.0-rpm.patch +++ b/php-bartlett-PHP-Reflect-3.0.0-rpm.patch @@ -1,7 +1,6 @@ -diff -up ./bin/phpreflect.json.dist.rpm ./bin/phpreflect.json.dist diff -up ./bin/phpreflect.rpm ./bin/phpreflect ---- ./bin/phpreflect.rpm 2015-01-15 17:38:39.000000000 +0100 -+++ ./bin/phpreflect 2015-01-16 11:26:45.900540580 +0100 +--- ./bin/phpreflect.rpm 2015-02-03 11:38:30.000000000 +0100 ++++ ./bin/phpreflect 2015-02-04 14:45:45.995075976 +0100 @@ -1,23 +1,35 @@ -#!/usr/bin/env php +#!/usr/bin/php @@ -48,9 +47,9 @@ diff -up ./bin/phpreflect.rpm ./bin/phpreflect if (PHP_SAPI !== 'cli') { return; diff -up ./tests/bootstrap.php.rpm ./tests/bootstrap.php ---- ./tests/bootstrap.php.rpm 2015-01-16 11:32:46.045016105 +0100 -+++ ./tests/bootstrap.php 2015-01-16 11:32:49.152028834 +0100 -@@ -1,16 +1,31 @@ +--- ./tests/bootstrap.php.rpm 2015-02-03 11:38:30.000000000 +0100 ++++ ./tests/bootstrap.php 2015-02-04 14:45:45.995075976 +0100 +@@ -1,11 +1,9 @@ <?php $baseDir = dirname(__DIR__); @@ -64,9 +63,10 @@ diff -up ./tests/bootstrap.php.rpm ./tests/bootstrap.php 'Bartlett\Tests\Reflect\Analyser\FooAnalyser' => __DIR__ . '/Analyser/FooAnalyser.php', 'Bartlett\Tests\Reflect\Analyser\BarAnalyser' - => __DIR__ . '/Analyser/BarAnalyser.php', - 'Bartlett\Tests\Reflect\Model\GenericModelTest' +@@ -14,5 +12,23 @@ $loader->addClassMap( => __DIR__ . '/Model/GenericModelTest.php', + 'Bartlett\Tests\Reflect\Environment\YourLogger' + => __DIR__ . '/Environment/YourLogger.php', - ) ); +require_once $vendorDir . '/PhpParser/Autoloader.php'; @@ -80,6 +80,7 @@ diff -up ./tests/bootstrap.php.rpm ./tests/bootstrap.php +$loader->registerNamespaces(array( + 'Bartlett\\Tests\\Reflect' => $baseDir . '/tests', + 'Bartlett' => $baseDir . '/src', ++ 'Monolog' => $vendorDir, +)); +$loader->useIncludePath(true); +$loader->register(); @@ -87,3 +88,14 @@ diff -up ./tests/bootstrap.php.rpm ./tests/bootstrap.php +foreach ($tab as $class => $file) { + require_once $file; +} +diff -up ./tests/Environment/YourLogger.php.rpm ./tests/Environment/YourLogger.php +--- ./tests/Environment/YourLogger.php.rpm 2015-02-03 11:38:30.000000000 +0100 ++++ ./tests/Environment/YourLogger.php 2015-02-04 14:48:07.609164546 +0100 +@@ -14,6 +14,7 @@ class YourLogger extends Logger + if (!file_exists($tempDir)) { + mkdir($tempDir, 0755, true); + } ++ date_default_timezone_set('UTC'); + $filename = sprintf('phpreflect-%s.log', date('Ymd')); + + $stream = new RotatingFileHandler("$tempDir/$filename", 30); diff --git a/php-bartlett-PHP-Reflect-dev.spec b/php-bartlett-PHP-Reflect-dev.spec index 7c564e5..b1fdaff 100644 --- a/php-bartlett-PHP-Reflect-dev.spec +++ b/php-bartlett-PHP-Reflect-dev.spec @@ -6,15 +6,15 @@ # # Please, preserve the changelog entries # -%global gh_commit 398cdae6f281153cae534a345abdf555f8fd3efd +%global gh_commit b4b807b76a98c3dabcada0337e078157aa502e37 %global gh_short %(c=%{gh_commit}; echo ${c:0:7}) -%global gh_date 20150118 +%global gh_date 20150203 %global gh_owner llaville %global gh_project php-reflect Name: php-bartlett-PHP-Reflect Version: 3.0.0 -%global specrel 4 +%global specrel 5 Release: %{?gh_short:0.%{specrel}.%{?gh_date}git%{gh_short}}%{!?gh_short:%{specrel}}%{?dist} Summary: Adds the ability to reverse-engineer PHP @@ -27,12 +27,9 @@ 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 -BuildRequires: php-pdo_sqlite # to run test suite BuildRequires: %{_bindir}/phpunit Requires: php-composer(sebastian/version) >= 1.0 @@ -47,16 +44,16 @@ BuildRequires: php-composer(symfony/dependency-injection) >= 2.5 BuildRequires: php-composer(phpdocumentor/reflection-docblock) >= 2.0 BuildRequires: php-composer(seld/jsonlint) >= 1.1 BuildRequires: php-composer(justinrainbow/json-schema) >= 1.3 +BuildRequires: php-composer(monolog/monolog) >= 1.10 # From composer.json, "require" -# "php": ">=5.3.0", +# "php": ">=5.3.2", # "ext-tokenizer": "*", # "ext-pcre": "*", # "ext-spl": "*", # "ext-json": "*", # "ext-date": "*", # "ext-reflection": "*", -# "ext-pdo_sqlite": "*", # "sebastian/version": "~1.0", # "nikic/php-parser": "~1.0", # "doctrine/collections": "~1.2", @@ -68,7 +65,7 @@ BuildRequires: php-composer(justinrainbow/json-schema) >= 1.3 # "phpdocumentor/reflection-docblock": "~2.0", # "justinrainbow/json-schema": "~1.3", # "seld/jsonlint": "~1.1" -Requires: php(language) >= 5.3 +Requires: php(language) >= 5.3.2 Requires: php-date Requires: php-json Requires: php-pcre @@ -120,7 +117,6 @@ 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) @@ -141,7 +137,8 @@ install -D -p -m 644 bin/phpreflect.1 %{buildroot}%{_mandir}/man1/phpref %check -# Version 2.0.0 : OK (155 tests, 156 assertions) +# Version 3.0.0beta1 : OK, but incomplete or skipped tests! +# Tests: 123, Assertions: 124, Incomplete: 3. %{_bindir}/phpunit @@ -168,6 +165,9 @@ fi %changelog +* Wed Feb 04 2015 Remi Collet <remi@fedoraproject.org> - 3.0.0-0.5.20150203gitb4b807b +- update to 3.0.0 beta1 + * Tue Jan 20 2015 Remi Collet <remi@fedoraproject.org> - 3.0.0-0.4.20150118git398cdae - fix composer only code (pr #17) |