summaryrefslogtreecommitdiffstats
path: root/php-bartlett-PHP-Reflect.spec
diff options
context:
space:
mode:
Diffstat (limited to 'php-bartlett-PHP-Reflect.spec')
-rw-r--r--php-bartlett-PHP-Reflect.spec78
1 files changed, 54 insertions, 24 deletions
diff --git a/php-bartlett-PHP-Reflect.spec b/php-bartlett-PHP-Reflect.spec
index ff20278..b1e4b29 100644
--- a/php-bartlett-PHP-Reflect.spec
+++ b/php-bartlett-PHP-Reflect.spec
@@ -7,13 +7,13 @@
# Please, preserve the changelog entries
#
%global bootstrap 0
-%global gh_commit 577395256a2b8fa43f4de747254bd236372de8b8
+%global gh_commit 983763e11d1898965e2b8ccf4b163182a2c713b2
%global gh_short %(c=%{gh_commit}; echo ${c:0:7})
#global gh_date 20150331
%global gh_owner llaville
%global gh_project php-reflect
%global upstream_version 5.0.0
-%global upstream_prever alpha1
+%global upstream_prever alpha3
%if %{bootstrap}
%global with_tests 0%{?_with_tests:1}
%else
@@ -32,7 +32,8 @@ License: BSD
URL: http://php5.laurent-laville.org/reflect/
Source0: https://github.com/%{gh_owner}/%{gh_project}/archive/%{gh_commit}/%{name}-%{upstream_version}%{?upstream_prever}-%{gh_short}.tar.gz
-# Autoloader for RPM - die composer !
+# Fix autoloader path
+# Fix version and avoir jean85/pretty-package-versions (relying on composer.lock)
Source1: %{name}-autoload.php
# Enable cache plugin
@@ -48,21 +49,26 @@ BuildRequires: %{phpunit}
BuildRequires: (php-composer(sebastian/version) >= 1.0 with php-composer(sebastian/version) < 3)
BuildRequires: (php-composer(nikic/php-parser) >= 4.0 with php-composer(nikic/php-parser) < 5)
BuildRequires: (php-composer(doctrine/collections) >= 1.4 with php-composer(doctrine/collections) < 2)
-BuildRequires: (php-composer(phpdocumentor/reflection-docblock) >= 3.0 with php-composer(phpdocumentor/reflection-docblock) < 4)
BuildRequires: (php-composer(seld/jsonlint) >= 1.1 with php-composer(seld/jsonlint) < 2)
BuildRequires: (php-composer(justinrainbow/json-schema) >= 1.3 with php-composer(justinrainbow/json-schema) < 2)
BuildRequires: (php-composer(monolog/monolog) >= 1.10 with php-composer(monolog/monolog) < 2)
BuildRequires: (php-composer(psr/log) >= 1.0 with php-composer(psr/log) < 2)
+BuildRequires: (php-composer(league/tactician) >= 1.0 with php-composer(league/tactician) < 2)
+BuildRequires: (php-composer(zendframework/zenddiagnostics) >= 1.4 with php-composer(zendframework/zenddiagnostics) < 2)
BuildRequires: (php-composer(doctrine/cache) >= 1.3 with php-composer(doctrine/cache) < 2)
-# remirepo:19
+# "require-dev": {
+# "monolog/monolog": "~1.10",
+# "andrewsville/php-token-reflection": "^1.4"
+BuildRequires: (php-composer(monolog/monolog) >= 1.10 with php-composer(monolog/monolog) < 2)
+BuildRequires: (php-composer(andrewsville/php-token-reflection) >= 1.4 with php-composer(andrewsville/php-token-reflection) < 2)
+
+# remirepo:25
%else
BuildRequires: php-composer(sebastian/version) >= 1.0
BuildRequires: php-composer(sebastian/version) < 3
BuildRequires: php-nikic-php-parser4
BuildRequires: php-composer(doctrine/collections) >= 1.4
BuildRequires: php-composer(doctrine/collections) < 2
-BuildRequires: php-composer(phpdocumentor/reflection-docblock) >= 3.0
-BuildRequires: php-composer(phpdocumentor/reflection-docblock) < 4
BuildRequires: php-composer(seld/jsonlint) >= 1.1
BuildRequires: php-composer(seld/jsonlint) < 2
BuildRequires: php-composer(justinrainbow/json-schema) >= 1.3
@@ -71,8 +77,16 @@ BuildRequires: php-composer(monolog/monolog) >= 1.10
BuildRequires: php-composer(monolog/monolog) < 2
BuildRequires: php-composer(psr/log) >= 1.0
BuildRequires: php-composer(psr/log) < 2
-BuildRequires: php-composer(doctrine/cache) >= 1.3
-BuildRequires: php-composer(doctrine/cache) < 2
+BuildRequires: php-composer(league/tactician) < 2
+BuildRequires: php-composer(league/tactician) >= 1.0
+BuildRequires: php-composer(zendframework/zenddiagnostics) < 2
+BuildRequires: php-composer(zendframework/zenddiagnostics) >= 1.4
+BuildRequires: php-composer(doctrine/cache) < 2
+BuildRequires: php-composer(doctrine/cache) >= 1.3
+BuildRequires: php-composer(monolog/monolog) < 2
+BuildRequires: php-composer(monolog/monolog) >= 1.10
+BuildRequires: php-composer(andrewsville/php-token-reflection) < 2
+BuildRequires: php-composer(andrewsville/php-token-reflection) >= 1.4
%endif
BuildRequires: %{sym_prefix}-event-dispatcher
BuildRequires: %{sym_prefix}-finder
@@ -99,10 +113,12 @@ BuildRequires: php-composer(fedora/autoloader)
# "symfony/console": "^3.0|^4.0",
# "symfony/stopwatch": "^3.0|^4.0",
# "symfony/dependency-injection": "^3.0|^4.0",
-# "phpdocumentor/reflection-docblock": "^3.0",
# "justinrainbow/json-schema": "^1.3",
# "seld/jsonlint": "^1.1"
-# "psr/log": "^1.0"
+# "psr/log": "^1.0",
+# "league/tactician": "^1.0",
+# "jean85/pretty-package-versions": "^1.2",
+# "zendframework/zenddiagnostics": "^1.4"
Requires: php(language) >= 7.1
Requires: php-cli
Requires: php-reflection
@@ -117,27 +133,30 @@ Requires: php-tokenizer
Requires: (php-composer(sebastian/version) >= 1.0 with php-composer(sebastian/version) < 3)
Requires: (php-composer(nikic/php-parser) >= 4.0 with php-composer(nikic/php-parser) < 5)
Requires: (php-composer(doctrine/collections) >= 1.4 with php-composer(doctrine/collections) < 2)
-Requires: (php-composer(phpdocumentor/reflection-docblock) >= 3.0 with php-composer(phpdocumentor/reflection-docblock) < 4)
Requires: (php-composer(seld/jsonlint) >= 1.1 with php-composer(seld/jsonlint) < 2)
Requires: (php-composer(justinrainbow/json-schema) >= 1.3 with php-composer(justinrainbow/json-schema) < 2)
Requires: (php-composer(psr/log) >= 1.0 with php-composer(psr/log) < 2)
+Requires: (php-composer(league/tactician) >= 1.0 with php-composer(league/tactician) < 2)
+Requires: (php-composer(zendframework/zenddiagnostics) >= 1.4 with php-composer(zendframework/zenddiagnostics) < 2)
# Mandatory for our patch
Requires: (php-composer(doctrine/cache) >= 1.3 with php-composer(doctrine/cache) < 2)
-# remirepo:18
+# remirepo:20
%else
Requires: php-composer(sebastian/version) >= 1.0
Requires: php-composer(sebastian/version) < 3
Requires: php-nikic-php-parser4
Requires: php-composer(doctrine/collections) >= 1.4
Requires: php-composer(doctrine/collections) < 2
-Requires: php-composer(phpdocumentor/reflection-docblock) >= 3.0
-Requires: php-composer(phpdocumentor/reflection-docblock) < 4
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
Requires: php-composer(psr/log) >= 1.0
Requires: php-composer(psr/log) < 2
+Requires: php-composer(league/tactician) < 2
+Requires: php-composer(league/tactician) >= 1.0
+Requires: php-composer(zendframework/zenddiagnostics) < 2
+Requires: php-composer(zendframework/zenddiagnostics) >= 1.4
# Mandatory for our patch
Requires: php-composer(doctrine/cache) >= 1.3
Requires: php-composer(doctrine/cache) < 2
@@ -147,12 +166,9 @@ Requires: %{sym_prefix}-finder
Requires: %{sym_prefix}-console
Requires: %{sym_prefix}-stopwatch
Requires: %{sym_prefix}-dependency-injection
-# "require-dev": {
-# "monolog/monolog": "~1.10",
# "suggest": {
# "doctrine/cache": "Allow caching results"
-# "bartlett/phpunit-loggertestlistener": "Allow logging unit tests to your favorite PSR-3 logger interface",
-# "bartlett/umlwriter": "Allow writing UML class diagrams (Graphviz or PlantUML)"
+# "bartlett/phpunit-loggertestlistener": "Allow logging unit tests to your favorite PSR-3 logger interface"
%if ! %{bootstrap}
%if 0%{?fedora} >= 27 || 0%{?rhel} >= 8
Requires: (php-composer(bartlett/umlwriter) >= 1.0 with php-composer(bartlett/umlwriter) < 2)
@@ -183,10 +199,14 @@ Documentation: http://php5.laurent-laville.org/reflect/manual/current/en/
%patch0 -p1 -b .rpm
find . -name \*.rpm -delete -print
-cp %{SOURCE1} src/Bartlett/Reflect/autoload.php
+# Use package version
+sed -e 's/@VERSION@/%{upstream_version}%{?upstream_prever}/' \
+ -i src/Reflect/Presentation/Console/Application.php
+
+cp %{SOURCE1} src/Reflect/autoload.php
-sed -e 's/@package_version@/%{?upstream_prever:-%{upstream_prever}}/' \
- -i $(find src -name \*.php) bin/phpreflect
+mv src/Reflect/Appplication src/Reflect/Application
+sed -e 's/Appplication/Application/' -i src/Reflect/Application/Command/Analyser*php
%build
@@ -194,8 +214,8 @@ sed -e 's/@package_version@/%{?upstream_prever:-%{upstream_prever}}/' \
%install
-mkdir -p %{buildroot}%{_datadir}/php
-cp -pr src/Bartlett %{buildroot}%{_datadir}/php/Bartlett
+mkdir -p %{buildroot}%{_datadir}/php
+cp -pr src %{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
@@ -204,6 +224,8 @@ install -D -p -m 644 bin/phpreflect.1 %{buildroot}%{_mandir}/man1/phpref
%check
%if %{with_tests}
+sed -e 's:@BUILDROOT@:%{buildroot}:' -i tests/bootstrap.php
+
ret=0
for cmdarg in "php %{phpunit}" php71 php72 php73; do
if which $cmdarg; then
@@ -237,6 +259,14 @@ fi
%changelog
+* Tue Apr 9 2019 Remi Collet <remi@remirepo.net> - 5.0.0~alpha3-1
+- update to 5.0.0-alpha3
+- add dependency on league/tactician
+- add dependency on zendframework/zenddiagnostics
+- drop dependency on phpdocumentor/reflection-docblock
+- open https://github.com/llaville/php-reflect/pull/32
+ fix typo in Appplication
+
* Mon Jan 21 2019 Remi Collet <remi@remirepo.net> - 5.0.0~alpha1-1
- update to 5.0.0-alpha1
- raise dependency on PHP 7.1