summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <fedora@famillecollet.com>2015-04-04 14:24:00 +0200
committerRemi Collet <fedora@famillecollet.com>2015-04-04 14:24:00 +0200
commit9c8e9503416eacf177a25d5bccc6551249eccb14 (patch)
tree767f4c31199f2cd0bebaf5c4ac4d0c9c6dd44f41
parent9018244621d32023497cddaca5d27687b1640cd5 (diff)
php-bartlett-PHP-Reflect: cleanups
-rw-r--r--php-bartlett-PHP-Reflect-dev.spec371
-rw-r--r--php-bartlett-PHP-Reflect-pr16.patch23
-rw-r--r--php-bartlett-PHP-Reflect-rpm.patch113
-rw-r--r--php-bartlett-PHP-Reflect.spec194
4 files changed, 138 insertions, 563 deletions
diff --git a/php-bartlett-PHP-Reflect-dev.spec b/php-bartlett-PHP-Reflect-dev.spec
deleted file mode 100644
index 3b73a98..0000000
--- a/php-bartlett-PHP-Reflect-dev.spec
+++ /dev/null
@@ -1,371 +0,0 @@
-# spec file for php-bartlett-PHP-Reflect
-#
-# Copyright (c) 2011-2015 Remi Collet
-# License: CC-BY-SA
-# http://creativecommons.org/licenses/by-sa/4.0/
-#
-# Please, preserve the changelog entries
-#
-%global bootstrap 0
-%global gh_commit 5c26dbcc14b65b888d9eb507be5ed0a1bb8db68d
-%global gh_short %(c=%{gh_commit}; echo ${c:0:7})
-#global gh_date 20150331
-%global gh_owner llaville
-%global gh_project php-reflect
-#global prever RC2
-%if %{bootstrap}
-%global with_tests %{?_with_tests:1}%{!?_with_tests:0}
-%else
-%global with_tests %{?_without_tests:0}%{!?_without_tests:1}
-%endif
-
-Name: php-bartlett-PHP-Reflect
-Version: 3.0.0
-%global specrel 1
-Release: %{?gh_date:0.%{specrel}.%{?prever}%{!?prever:%{gh_date}git%{gh_short}}}%{!?gh_date:%{specrel}}%{?dist}
-Summary: Adds the ability to reverse-engineer PHP
-
-Group: Development/Libraries
-License: BSD
-URL: http://php5.laurent-laville.org/reflect/
-Source0: https://github.com/%{gh_owner}/%{gh_project}/archive/%{gh_commit}/%{gh_project}-%{version}%{?prever}-%{gh_short}.tar.gz
-
-# Autoloader for RPM - die composer !
-# Enable cache plugin
-Patch0: %{name}-3.0.0-rpm.patch
-
-BuildArch: noarch
-BuildRequires: php(language) >= 5.3
-%if %{with_tests}
-# to run test suite
-BuildRequires: %{_bindir}/phpunit
-BuildRequires: php-composer(sebastian/version) >= 1.0
-BuildRequires: php-composer(nikic/php-parser) >= 1.1
-BuildRequires: php-composer(doctrine/collections) >= 1.2
-BuildRequires: php-composer(symfony/class-loader) >= 2.5
-BuildRequires: php-composer(symfony/event-dispatcher) >= 2.5
-BuildRequires: php-composer(symfony/finder) >= 2.5
-BuildRequires: php-composer(symfony/console) >= 2.5
-BuildRequires: php-composer(symfony/stopwatch) >= 2.5
-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
-BuildRequires: php-composer(bartlett/umlwriter) >= 1.0
-%endif
-
-# From composer.json, "require": {
-# "php": ">=5.3.2",
-# "ext-tokenizer": "*",
-# "ext-pcre": "*",
-# "ext-spl": "*",
-# "ext-json": "*",
-# "ext-date": "*",
-# "ext-reflection": "*",
-# "sebastian/version": "~1.0",
-# "nikic/php-parser": "~1.1",
-# "doctrine/collections": "~1.2",
-# "symfony/event-dispatcher": "~2.5",
-# "symfony/finder": "~2.5",
-# "symfony/console": "~2.5"
-# "symfony/stopwatch": "~2.5",
-# "symfony/dependency-injection": "~2.5",
-# "phpdocumentor/reflection-docblock": "~2.0",
-# "justinrainbow/json-schema": "~1.3",
-# "seld/jsonlint": "~1.1"
-Requires: php(language) >= 5.3.2
-Requires: php-date
-Requires: php-json
-Requires: php-pcre
-Requires: php-pdo_sqlite
-Requires: php-reflection
-Requires: php-spl
-Requires: php-tokenizer
-Requires: php-composer(sebastian/version) >= 1.0
-Requires: php-composer(sebastian/version) < 2
-Requires: php-composer(nikic/php-parser) >= 1.1
-Requires: php-composer(nikic/php-parser) < 2
-Requires: php-composer(doctrine/collections) >= 1.2
-Requires: php-composer(doctrine/collections) < 2
-Requires: php-composer(symfony/event-dispatcher) >= 2.5
-Requires: php-composer(symfony/event-dispatcher) < 3
-Requires: php-composer(symfony/finder) >= 2.5
-Requires: php-composer(symfony/finder) < 3
-Requires: php-composer(symfony/console) >= 2.5
-Requires: php-composer(symfony/console) < 3
-Requires: php-composer(symfony/stopwatch) >= 2.5
-Requires: php-composer(symfony/stopwatch) < 3
-Requires: php-composer(symfony/dependency-injection) >= 2.5
-Requires: php-composer(symfony/dependency-injection) < 3
-Requires: php-composer(phpdocumentor/reflection-docblock) >= 2.0
-Requires: php-composer(phpdocumentor/reflection-docblock) < 3
-Requires: php-composer(seld/jsonlint) >= 1.1
-Requires: php-composer(seld/jsonlint) < 2
-Requires: php-composer(justinrainbow/json-schema) >= 1.3
-Requires: php-composer(justinrainbow/json-schema) < 2
-# "require-dev": {
-# "monolog/monolog": "~1.10",
-# "bartlett/umlwriter": "~1.0"
-# "suggest": {
-# "doctrine/cache": "Allow caching results"
-# "psr/log": "Allow logging events with the LogPlugin",
-# "monolog/monolog": "Allow logging events with the LogPlugin",
-# "bartlett/phpunit-loggertestlistener": "Allow logging unit tests to your favorite PSR-3 logger interface",
-# "bartlett/umlwriter": "Allow writing UML class diagrams (Graphviz or PlantUML)"
-Requires: php-composer(doctrine/cache)
-%if ! %{bootstrap}
-Requires: php-composer(bartlett/umlwriter) >= 1.0
-Requires: php-composer(bartlett/umlwriter) < 2
-%endif
-# For our patch
-Requires: php-composer(symfony/class-loader) >= 2.5
-Requires: php-composer(symfony/class-loader) < 3
-
-Obsoletes: php-channel-bartlett <= 1.3
-
-Provides: php-composer(bartlett/php-reflect) = %{version}
-
-
-%description
-PHP_Reflect adds the ability to reverse-engineer classes, interfaces,
-functions, constants and more, by connecting php callbacks to other tokens.
-
-Documentation: http://php5.laurent-laville.org/reflect/manual/current/en/
-
-
-%prep
-%setup -q -n %{gh_project}-%{gh_commit}
-
-%patch0 -p1 -b .rpm
-
-sed -e 's/@package_version@/%{version}%{?prever}/' \
- -i $(find src -name \*.php) bin/phpreflect
-
-
-%build
-# Nothing
-
-
-%install
-mkdir -p %{buildroot}%{_datadir}/php
-cp -pr src/Bartlett %{buildroot}%{_datadir}/php/Bartlett
-
-install -D -p -m 755 bin/phpreflect %{buildroot}%{_bindir}/phpreflect
-install -D -p -m 644 bin/phpreflect.json.dist %{buildroot}%{_sysconfdir}/phpreflect.json
-install -D -p -m 644 bin/phpreflect.1 %{buildroot}%{_mandir}/man1/phpreflect.1
-
-
-%check
-%if %{with_tests}
-# Required when bartlett/php-compatinfo installed (local build)
-export BARTLETT_COMPATINFO_DB=%{_datadir}/php-bartlett-PHP-CompatInfo/compatinfo.sqlite
-
-# Version 3.0.0 : OK, but incomplete, skipped, or risky tests!
-# Tests: 122, Assertions: 123, Incomplete: 3.
-%{_bindir}/phpunit -v
-%else
-: Test suite disabled
-%endif
-
-
-%post
-if [ -x %{_bindir}/pear ]; then
- %{_bindir}/pear uninstall --nodeps --ignore-errors --register-only \
- bartlett.laurent-laville.org/PHP_Reflect >/dev/null || :
-fi
-
-
-%files
-%{!?_licensedir:%global license %%doc}
-%license LICENSE
-%doc composer.json README.*
-%config(noreplace) %{_sysconfdir}/phpreflect.json
-%{_bindir}/phpreflect
-%{_datadir}/php/Bartlett/Reflect*
-%{_mandir}/man1/phpreflect.1*
-
-
-%changelog
-* Fri Apr 3 2015 Remi Collet <remi@fedoraproject.org> - 3.0.0-1
-- update to 3.0.0
-- cleanup EL-5 stuff
-
-* Tue Mar 31 2015 Remi Collet <remi@fedoraproject.org> - 3.0.0-0.13.20150331git7efd1d0
-- pull latest upstream changes
-
-* Tue Mar 31 2015 Remi Collet <remi@fedoraproject.org> - 3.0.0-0.12.20150330git2c88d1a
-- pull latest upstream changes
-
-* Tue Mar 24 2015 Remi Collet <remi@fedoraproject.org> - 3.0.0-0.11.RC2
-- update to 3.0.0 RC2
-- add dependency on bartlett/umlwriter
-
-* Thu Mar 12 2015 Remi Collet <remi@fedoraproject.org> - 3.0.0-0.10.RC1
-- update to 3.0.0 RC1
-
-* Thu Feb 26 2015 Remi Collet <remi@fedoraproject.org> - 3.0.0-0.9.20150226gitaab371c
-- update to 3.0.0 beta3
-
-* Mon Feb 23 2015 Remi Collet <remi@fedoraproject.org> - 3.0.0-0.8.20150219gite7f804e
-- fix output
-
-* Sun Feb 22 2015 Remi Collet <remi@fedoraproject.org> - 3.0.0-0.7.20150219gite7f804e
-- fix reported version
-
-* Sun Feb 22 2015 Remi Collet <remi@fedoraproject.org> - 3.0.0-0.6.20150219gite7f804e
-- update to 3.0.0 beta2
-
-* 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)
-
-* Mon Jan 19 2015 Remi Collet <remi@fedoraproject.org> - 3.0.0-0.3.20150118git398cdae
-- new 3.0 snapshot
-
-* Fri Jan 16 2015 Remi Collet <remi@fedoraproject.org> - 3.0.0-0.2.20150115git0189a64
-- update to 3.0.0 alpha3
-
-* Tue Jan 6 2015 Remi Collet <remi@fedoraproject.org> - 3.0.0-0.1.20150105git51f7968
-- update to 3.0.0 alpha2
-- drop dependency on phpunit/php-timer
-- add dependencies on php-pdo_sqlite, doctrine/collections,
- symfony/stopwatch, symfony/dependency-injection
- and phpdocumentor/reflection-docblock
-
-* Mon Jan 5 2015 Remi Collet <remi@fedoraproject.org> - 2.6.2-1
-- Update to 2.6.2
-- open https://github.com/llaville/php-reflect/pull/16
-
-* Thu Dec 4 2014 Remi Collet <remi@fedoraproject.org> - 2.6.1-1
-- Update to 2.6.1
-
-* Thu Nov 13 2014 Remi Collet <remi@fedoraproject.org> - 2.6.0-1
-- Update to 2.6.0
-- add dependency on justinrainbow/json-schema
-
-* Thu Oct 16 2014 Remi Collet <remi@fedoraproject.org> - 2.5.0-1
-- Update to 2.5.0
-- add dependency on sebastian/version
-
-* Fri Sep 19 2014 Remi Collet <remi@fedoraproject.org> - 2.4.0-1
-- Update to 2.4.0
-
-* Fri Aug 22 2014 Remi Collet <remi@fedoraproject.org> - 2.3.0-1
-- Update to 2.3.0
-- add dependency on seld/jsonlint
-
-* Fri Jul 25 2014 Remi Collet <remi@fedoraproject.org> - 2.2.0-2
-- obsoletes php-channel-bartlett
-
-* Thu Jul 24 2014 Remi Collet <remi@fedoraproject.org> - 2.2.0-1
-- Update to 2.2.0
-
-* Wed Jul 23 2014 Remi Collet <remi@fedoraproject.org> - 2.2.0-0.1.fe9d18d
-- Test build of upcoming 2.2.0
-- add manpage
-
-* 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
-
-* Mon May 12 2014 Remi Collet <remi@fedoraproject.org> - 2.0.0-1
-- Update to 2.0.0
-- sources from github
-- patch autoloader to not rely on composer
-- drop documentation (link to online doc in description)
-
-* Sat Oct 12 2013 Remi Collet <remi@fedoraproject.org> - 1.9.0-1
-- Update to 1.9.0
-- raise dependency on PHP >= 5.3
-
-* Mon Sep 23 2013 Remi Collet <remi@fedoraproject.org> - 1.8.1-1
-- Update to 1.8.1
-
-* Fri Sep 20 2013 Remi Collet <remi@fedoraproject.org> - 1.8.0-1
-- Update to 1.8.0
-
-* Wed Jun 26 2013 Remi Collet <remi@fedoraproject.org> - 1.7.0-1
-- Update to 1.7.0
-
-* Sat Apr 06 2013 Remi Collet <remi@fedoraproject.org> - 1.6.2-1
-- Update to 1.6.2
-
-* Tue Feb 26 2013 Remi Collet <remi@fedoraproject.org> - 1.6.1-1
-- Update to 1.6.1
-
-* Fri Feb 22 2013 Remi Collet <remi@fedoraproject.org> - 1.6.0-1
-- Version 1.6.0 (stable) - API 1.6.0 (stable)
-- html documentation is now provided by upstream
-
-* Mon Nov 26 2012 Remi Collet <remi@fedoraproject.org> - 1.5.0-2
-- generate documentation using asciidoc, without phing
-
-* Mon Nov 26 2012 Remi Collet <remi@fedoraproject.org> - 1.5.0-1
-- Version 1.5.0 (stable) - API 1.5.0 (stable)
-- drop documentation build
-
-* Tue Oct 30 2012 Remi Collet <remi@fedoraproject.org> - 1.4.3-1
-- Version 1.4.3 (stable) - API 1.4.0 (stable)
-
-* Tue Aug 14 2012 Remi Collet <remi@fedoraproject.org> - 1.4.2-2
-- rebuildt for new pear_testdir
-
-* Wed Aug 01 2012 Remi Collet <remi@fedoraproject.org> - 1.4.2-1
-- Version 1.4.2 (stable) - API 1.4.0 (stable)
-
-* Fri Jul 20 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.3.0-3
-- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
-
-* Fri Feb 17 2012 Remi Collet <remi@fedoraproject.org> - 1.3.0-2
-- bump release
-
-* Fri Feb 17 2012 Remi Collet <remi@fedoraproject.org> - 1.3.0-1
-- Version 1.3.0 (stable) - API 1.3.0 (stable)
-
-* Sun Feb 05 2012 Remi Collet <remi@fedoraproject.org> - 1.2.0-1
-- Version 1.2.0 (stable) - API 1.2.0 (stable)
-
-* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.1.0-2
-- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
-
-* Fri Nov 11 2011 Remi Collet <Fedora@FamilleCollet.com> - 1.1.0-1
-- Version 1.1.0 (stable) - API 1.1.0 (stable)
-
-* Mon Sep 19 2011 Remi Collet <Fedora@FamilleCollet.com> - 1.0.2-2
-- remove unused .js and improve installation of generated doc
-- use buildroot macro
-
-* Mon Jul 18 2011 Remi Collet <Fedora@FamilleCollet.com> - 1.0.2-1
-- Version 1.0.2 (stable) - API 1.0.0 (stable)
-
-* Thu Jun 16 2011 Remi Collet <Fedora@FamilleCollet.com> - 1.0.1-1
-- Version 1.0.1 (stable) - API 1.0.0 (stable)
-
-* Thu Jun 02 2011 Remi Collet <Fedora@FamilleCollet.com> - 1.0.0-1
-- Version 1.0.0 (stable) - API 1.0.0 (stable)
-- add HTML documentation
-
-* Tue Apr 26 2011 Remi Collet <Fedora@FamilleCollet.com> - 1.0.0-0.1.RC1
-- Version 1.0.0RC1 (beta) - API 1.0.0 (beta)
-
-* Sun Apr 17 2011 Remi Collet <Fedora@FamilleCollet.com> - 0.7.0-1
-- Version 0.7.0 (beta) - API 0.7.0 (beta)
-
-* Mon Apr 11 2011 Remi Collet <Fedora@FamilleCollet.com> - 0.6.0-1
-- Version 0.6.0 (beta) - API 0.6.0 (beta)
-
-* Wed Apr 06 2011 Remi Collet <Fedora@FamilleCollet.com> - 0.5.1-1
-- Version 0.5.1 (beta) - API 0.5.0 (beta)
-
-* Fri Mar 25 2011 Remi Collet <Fedora@FamilleCollet.com> - 0.5.0-1
-- Version 0.5.0 (beta) - API 0.5.0 (beta)
-
-* Fri Feb 25 2011 Remi Collet <Fedora@FamilleCollet.com> - 0.4.0-1
-- Version 0.4.0 (beta)
-- Initial RPM package
-
diff --git a/php-bartlett-PHP-Reflect-pr16.patch b/php-bartlett-PHP-Reflect-pr16.patch
deleted file mode 100644
index 9cb5bb5..0000000
--- a/php-bartlett-PHP-Reflect-pr16.patch
+++ /dev/null
@@ -1,23 +0,0 @@
-From 9ab5673d110729d23197f2b68bb0685fa8696640 Mon Sep 17 00:00:00 2001
-From: Remi Collet <fedora@famillecollet.com>
-Date: Mon, 5 Jan 2015 14:58:42 +0100
-Subject: [PATCH] fix failed tests because of file order
-
----
- tests/PhpFeature/V504Test.php | 3 ++-
- 1 file changed, 2 insertions(+), 1 deletion(-)
-
-diff --git a/tests/PhpFeature/V504Test.php b/tests/PhpFeature/V504Test.php
-index 14a23b8..ad39ff8 100644
---- a/tests/PhpFeature/V504Test.php
-+++ b/tests/PhpFeature/V504Test.php
-@@ -52,7 +52,8 @@ public static function setUpBeforeClass()
- $finder->files()
- ->name('gh15.php')
- ->name('php504ArrayFeatures.php')
-- ->in(self::$fixtures);
-+ ->in(self::$fixtures)
-+ ->sortByName()
- ;
-
- $pm = new ProviderManager;
diff --git a/php-bartlett-PHP-Reflect-rpm.patch b/php-bartlett-PHP-Reflect-rpm.patch
deleted file mode 100644
index 1b7c93b..0000000
--- a/php-bartlett-PHP-Reflect-rpm.patch
+++ /dev/null
@@ -1,113 +0,0 @@
-diff -up ./bin/phpreflect.json.dist.rpm ./bin/phpreflect.json.dist
---- ./bin/phpreflect.json.dist.rpm 2014-10-16 14:13:07.000000000 +0200
-+++ ./bin/phpreflect.json.dist 2014-10-16 16:49:30.538850254 +0200
-@@ -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 2014-10-16 14:13:07.000000000 +0200
-+++ ./bin/phpreflect 2014-10-16 16:50:40.458190967 +0200
-@@ -1,15 +1,11 @@
--#!/usr/bin/env php
-+#!/usr/bin/php
- <?php
-
- if (\Phar::running()) {
- $vendorDir = 'phar://phpreflect.phar/vendor';
- } else {
- $baseDir = dirname(__DIR__);
-- $vendorDir = $baseDir . '/vendor';
--
-- if (!file_exists($vendorDir . '/autoload.php')) {
-- $vendorDir = dirname(dirname($baseDir));
-- }
-+ $vendorDir = '/usr/share/php';
-
- if (!getenv("REFLECT")) {
- $home = defined('PHP_WINDOWS_VERSION_BUILD') ? 'USERPROFILE' : 'HOME';
-@@ -26,8 +22,29 @@ if (\Phar::running()) {
- }
- }
- }
--$loader = require_once $vendorDir . '/autoload.php';
--$loader->setUseIncludePath(true);
-+require_once $vendorDir . '/PhpParser/Autoloader.php';
-+PhpParser\Autoloader::register();
-+
-+require_once $vendorDir . '/Symfony/Component/ClassLoader/UniversalClassLoader.php';
-+
-+require_once $vendorDir . '/PHP/Timer.php';
-+require_once $vendorDir . '/SebastianBergmann/Version/Version.php';
-+
-+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,
-+ 'Doctrine\\Common\\Cache' => $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 2014-10-16 14:13:07.000000000 +0200
-+++ ./tests/bootstrap.php 2014-10-16 16:49:30.538850254 +0200
-@@ -1,6 +1,19 @@
- <?php
-
- $baseDir = dirname(__DIR__);
--$vendorDir = $baseDir . '/vendor';
-+$vendorDir = '/usr/share/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(
-+ 'Bartlett\\Tests\\Reflect' => $baseDir . '/tests',
-+ 'Bartlett' => $baseDir . '/src',
-+));
-+$loader->useIncludePath(true);
-+$loader->register();
-diff -up ./tests/EnvironmentTest.php.prev ./tests/EnvironmentTest.php
---- ./tests/EnvironmentTest.php.prev 2014-11-13 17:38:59.895447844 +0100
-+++ ./tests/EnvironmentTest.php 2014-11-13 17:39:02.138456731 +0100
-@@ -168,6 +168,8 @@ class EnvironmentTest extends \PHPUnit_F
- ),
- );
-
-+ unset($var['plugins'][1]); // Cache added by our patch
-+
- $this->assertEquals(
- $config,
- $var,
diff --git a/php-bartlett-PHP-Reflect.spec b/php-bartlett-PHP-Reflect.spec
index 6eadcc2..3b73a98 100644
--- a/php-bartlett-PHP-Reflect.spec
+++ b/php-bartlett-PHP-Reflect.spec
@@ -2,94 +2,128 @@
#
# Copyright (c) 2011-2015 Remi Collet
# License: CC-BY-SA
-# http://creativecommons.org/licenses/by-sa/3.0/
+# http://creativecommons.org/licenses/by-sa/4.0/
#
# Please, preserve the changelog entries
#
-%global gh_commit 6b059b7106c74e9db5d7dd84c2995eb6fe678331
-#global gh_short %(c=%{gh_commit}; echo ${c:0:7})
+%global bootstrap 0
+%global gh_commit 5c26dbcc14b65b888d9eb507be5ed0a1bb8db68d
+%global gh_short %(c=%{gh_commit}; echo ${c:0:7})
+#global gh_date 20150331
%global gh_owner llaville
%global gh_project php-reflect
+#global prever RC2
+%if %{bootstrap}
+%global with_tests %{?_with_tests:1}%{!?_with_tests:0}
+%else
+%global with_tests %{?_without_tests:0}%{!?_without_tests:1}
+%endif
Name: php-bartlett-PHP-Reflect
-Version: 2.6.2
+Version: 3.0.0
%global specrel 1
-Release: %{?gh_short:0.%{specrel}.git%{gh_short}}%{!?gh_short:%{specrel}}%{?dist}
+Release: %{?gh_date:0.%{specrel}.%{?prever}%{!?prever:%{gh_date}git%{gh_short}}}%{!?gh_date:%{specrel}}%{?dist}
Summary: Adds the ability to reverse-engineer PHP
Group: Development/Libraries
License: BSD
URL: http://php5.laurent-laville.org/reflect/
-Source0: https://github.com/%{gh_owner}/%{gh_project}/archive/%{gh_commit}/%{gh_project}-%{version}%{?gh_short:-%{gh_short}}.tar.gz
+Source0: https://github.com/%{gh_owner}/%{gh_project}/archive/%{gh_commit}/%{gh_project}-%{version}%{?prever}-%{gh_short}.tar.gz
# Autoloader for RPM - die composer !
# Enable cache plugin
-Patch0: %{name}-rpm.patch
+Patch0: %{name}-3.0.0-rpm.patch
-# https://github.com/llaville/php-reflect/pull/16
-Patch1: %{name}-pr16.patch
-
-BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch: noarch
-BuildRequires: php(language) >= 5.3
+BuildRequires: php(language) >= 5.3
+%if %{with_tests}
# to run test suite
BuildRequires: %{_bindir}/phpunit
-Requires: php-composer(sebastian/version) >= 1.0
-BuildRequires: php-composer(phpunit/php-timer) >= 1.0
-BuildRequires: php-composer(nikic/php-parser) >= 1.0
-BuildRequires: php-composer(symfony/class-loader) >= 2.5
-BuildRequires: php-composer(symfony/event-dispatcher) >= 2.5
-BuildRequires: php-composer(symfony/finder) >= 2.5
-BuildRequires: php-composer(symfony/console) >= 2.5
-BuildRequires: php-composer(seld/jsonlint) >= 1.1
-BuildRequires: php-composer(justinrainbow/json-schema) >= 1.3
-
-# From composer.json, "require"
-# "php": ">=5.3.0",
+BuildRequires: php-composer(sebastian/version) >= 1.0
+BuildRequires: php-composer(nikic/php-parser) >= 1.1
+BuildRequires: php-composer(doctrine/collections) >= 1.2
+BuildRequires: php-composer(symfony/class-loader) >= 2.5
+BuildRequires: php-composer(symfony/event-dispatcher) >= 2.5
+BuildRequires: php-composer(symfony/finder) >= 2.5
+BuildRequires: php-composer(symfony/console) >= 2.5
+BuildRequires: php-composer(symfony/stopwatch) >= 2.5
+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
+BuildRequires: php-composer(bartlett/umlwriter) >= 1.0
+%endif
+
+# From composer.json, "require": {
+# "php": ">=5.3.2",
# "ext-tokenizer": "*",
# "ext-pcre": "*",
# "ext-spl": "*",
# "ext-json": "*",
# "ext-date": "*",
+# "ext-reflection": "*",
# "sebastian/version": "~1.0",
-# "phpunit/php-timer": "~1.0",
-# "nikic/php-parser": "~1.0",
+# "nikic/php-parser": "~1.1",
+# "doctrine/collections": "~1.2",
# "symfony/event-dispatcher": "~2.5",
# "symfony/finder": "~2.5",
# "symfony/console": "~2.5"
+# "symfony/stopwatch": "~2.5",
+# "symfony/dependency-injection": "~2.5",
+# "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
+Requires: php-pdo_sqlite
Requires: php-reflection
Requires: php-spl
Requires: php-tokenizer
-Requires: php-composer(sebastian/version) >= 1.0
-Requires: php-composer(sebastian/version) < 2
-Requires: php-composer(phpunit/php-timer) >= 1.0
-Requires: php-composer(phpunit/php-timer) < 2
-Requires: php-composer(nikic/php-parser) >= 1.0
-Requires: php-composer(nikic/php-parser) < 2
-Requires: php-composer(symfony/event-dispatcher) >= 2.5
-Requires: php-composer(symfony/event-dispatcher) < 3
-Requires: php-composer(symfony/finder) >= 2.5
-Requires: php-composer(symfony/finder) < 3
-Requires: php-composer(symfony/console) >= 2.5
-Requires: php-composer(symfony/console) < 3
-Requires: php-composer(seld/jsonlint) >= 1.1
-Requires: php-composer(seld/jsonlint) < 2
-Requires: php-composer(justinrainbow/json-schema) >= 1.3
-Requires: php-composer(justinrainbow/json-schema) < 2
-# From composer.json, "suggest"
+Requires: php-composer(sebastian/version) >= 1.0
+Requires: php-composer(sebastian/version) < 2
+Requires: php-composer(nikic/php-parser) >= 1.1
+Requires: php-composer(nikic/php-parser) < 2
+Requires: php-composer(doctrine/collections) >= 1.2
+Requires: php-composer(doctrine/collections) < 2
+Requires: php-composer(symfony/event-dispatcher) >= 2.5
+Requires: php-composer(symfony/event-dispatcher) < 3
+Requires: php-composer(symfony/finder) >= 2.5
+Requires: php-composer(symfony/finder) < 3
+Requires: php-composer(symfony/console) >= 2.5
+Requires: php-composer(symfony/console) < 3
+Requires: php-composer(symfony/stopwatch) >= 2.5
+Requires: php-composer(symfony/stopwatch) < 3
+Requires: php-composer(symfony/dependency-injection) >= 2.5
+Requires: php-composer(symfony/dependency-injection) < 3
+Requires: php-composer(phpdocumentor/reflection-docblock) >= 2.0
+Requires: php-composer(phpdocumentor/reflection-docblock) < 3
+Requires: php-composer(seld/jsonlint) >= 1.1
+Requires: php-composer(seld/jsonlint) < 2
+Requires: php-composer(justinrainbow/json-schema) >= 1.3
+Requires: php-composer(justinrainbow/json-schema) < 2
+# "require-dev": {
+# "monolog/monolog": "~1.10",
+# "bartlett/umlwriter": "~1.0"
+# "suggest": {
# "doctrine/cache": "Allow caching results"
+# "psr/log": "Allow logging events with the LogPlugin",
+# "monolog/monolog": "Allow logging events with the LogPlugin",
+# "bartlett/phpunit-loggertestlistener": "Allow logging unit tests to your favorite PSR-3 logger interface",
+# "bartlett/umlwriter": "Allow writing UML class diagrams (Graphviz or PlantUML)"
Requires: php-composer(doctrine/cache)
+%if ! %{bootstrap}
+Requires: php-composer(bartlett/umlwriter) >= 1.0
+Requires: php-composer(bartlett/umlwriter) < 2
+%endif
# For our patch
Requires: php-composer(symfony/class-loader) >= 2.5
Requires: php-composer(symfony/class-loader) < 3
Obsoletes: php-channel-bartlett <= 1.3
+
Provides: php-composer(bartlett/php-reflect) = %{version}
@@ -102,13 +136,11 @@ Documentation: http://php5.laurent-laville.org/reflect/manual/current/en/
%prep
%setup -q -n %{gh_project}-%{gh_commit}
-#setup -q -n %{gh_project}-%{version}
%patch0 -p1 -b .rpm
-%patch1 -p1 -b .pr16
-sed -e 's/@package_version@/%{version}/' \
- -i $(find src -name \*.php)
+sed -e 's/@package_version@/%{version}%{?prever}/' \
+ -i $(find src -name \*.php) bin/phpreflect
%build
@@ -116,7 +148,6 @@ sed -e 's/@package_version@/%{version}/' \
%install
-rm -rf %{buildroot}
mkdir -p %{buildroot}%{_datadir}/php
cp -pr src/Bartlett %{buildroot}%{_datadir}/php/Bartlett
@@ -126,12 +157,16 @@ install -D -p -m 644 bin/phpreflect.1 %{buildroot}%{_mandir}/man1/phpref
%check
-# Version 2.0.0 : OK (155 tests, 156 assertions)
-%{_bindir}/phpunit
-
+%if %{with_tests}
+# Required when bartlett/php-compatinfo installed (local build)
+export BARTLETT_COMPATINFO_DB=%{_datadir}/php-bartlett-PHP-CompatInfo/compatinfo.sqlite
-%clean
-rm -rf %{buildroot}
+# Version 3.0.0 : OK, but incomplete, skipped, or risky tests!
+# Tests: 122, Assertions: 123, Incomplete: 3.
+%{_bindir}/phpunit -v
+%else
+: Test suite disabled
+%endif
%post
@@ -142,17 +177,64 @@ fi
%files
-%defattr(-,root,root,-)
%{!?_licensedir:%global license %%doc}
%license LICENSE
%doc composer.json README.*
%config(noreplace) %{_sysconfdir}/phpreflect.json
%{_bindir}/phpreflect
-%{_datadir}/php/Bartlett
+%{_datadir}/php/Bartlett/Reflect*
%{_mandir}/man1/phpreflect.1*
%changelog
+* Fri Apr 3 2015 Remi Collet <remi@fedoraproject.org> - 3.0.0-1
+- update to 3.0.0
+- cleanup EL-5 stuff
+
+* Tue Mar 31 2015 Remi Collet <remi@fedoraproject.org> - 3.0.0-0.13.20150331git7efd1d0
+- pull latest upstream changes
+
+* Tue Mar 31 2015 Remi Collet <remi@fedoraproject.org> - 3.0.0-0.12.20150330git2c88d1a
+- pull latest upstream changes
+
+* Tue Mar 24 2015 Remi Collet <remi@fedoraproject.org> - 3.0.0-0.11.RC2
+- update to 3.0.0 RC2
+- add dependency on bartlett/umlwriter
+
+* Thu Mar 12 2015 Remi Collet <remi@fedoraproject.org> - 3.0.0-0.10.RC1
+- update to 3.0.0 RC1
+
+* Thu Feb 26 2015 Remi Collet <remi@fedoraproject.org> - 3.0.0-0.9.20150226gitaab371c
+- update to 3.0.0 beta3
+
+* Mon Feb 23 2015 Remi Collet <remi@fedoraproject.org> - 3.0.0-0.8.20150219gite7f804e
+- fix output
+
+* Sun Feb 22 2015 Remi Collet <remi@fedoraproject.org> - 3.0.0-0.7.20150219gite7f804e
+- fix reported version
+
+* Sun Feb 22 2015 Remi Collet <remi@fedoraproject.org> - 3.0.0-0.6.20150219gite7f804e
+- update to 3.0.0 beta2
+
+* 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)
+
+* Mon Jan 19 2015 Remi Collet <remi@fedoraproject.org> - 3.0.0-0.3.20150118git398cdae
+- new 3.0 snapshot
+
+* Fri Jan 16 2015 Remi Collet <remi@fedoraproject.org> - 3.0.0-0.2.20150115git0189a64
+- update to 3.0.0 alpha3
+
+* Tue Jan 6 2015 Remi Collet <remi@fedoraproject.org> - 3.0.0-0.1.20150105git51f7968
+- update to 3.0.0 alpha2
+- drop dependency on phpunit/php-timer
+- add dependencies on php-pdo_sqlite, doctrine/collections,
+ symfony/stopwatch, symfony/dependency-injection
+ and phpdocumentor/reflection-docblock
+
* Mon Jan 5 2015 Remi Collet <remi@fedoraproject.org> - 2.6.2-1
- Update to 2.6.2
- open https://github.com/llaville/php-reflect/pull/16