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.spec135
1 files changed, 90 insertions, 45 deletions
diff --git a/php-bartlett-PHP-Reflect.spec b/php-bartlett-PHP-Reflect.spec
index 1bf6a67..7b29888 100644
--- a/php-bartlett-PHP-Reflect.spec
+++ b/php-bartlett-PHP-Reflect.spec
@@ -7,7 +7,7 @@
# Please, preserve the changelog entries
#
%global bootstrap 0
-%global gh_commit 7fe0e8e023b3126344a1bc5c2a408d49249001eb
+%global gh_commit 6609c40a1695ce5bcbaa814214cf4e8d88e21569
%global gh_short %(c=%{gh_commit}; echo ${c:0:7})
#global gh_date 20150331
%global gh_owner llaville
@@ -19,19 +19,20 @@
%global with_tests %{?_without_tests:0}%{!?_without_tests:1}
%endif
-%if 0%{?fedora} >= 27
-%global sym_prefix php-symfony3
+%if 0%{?fedora} >= 27 || 0%{?rhel} >= 8
+%global sym_prefix php-symfony4
+%global phpunit %{_bindir}/phpunit7
%else
-%global sym_prefix php-symfony
+%global sym_prefix php-symfony3
+%global phpunit %{_bindir}/phpunit
%endif
Name: php-bartlett-PHP-Reflect
-Version: 4.2.2
-%global specrel 2
+Version: 4.3.0
+%global specrel 1
Release: %{?gh_date:1%{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}/%{name}-%{version}%{?prever}-%{gh_short}.tar.gz
@@ -40,17 +41,35 @@ Source0: https://github.com/%{gh_owner}/%{gh_project}/archive/%{gh_commit
Source1: %{name}-autoload.php
# Enable cache plugin
-Patch0: %{name}-4.0.0-rpm.patch
+Patch0: %{name}-4.3.0-rpm.patch
BuildArch: noarch
BuildRequires: php(language) >= 5.5
%if %{with_tests}
# to run test suite
-BuildRequires: %{_bindir}/phpunit
+BuildRequires: %{phpunit}
+# remirepo:1
+%if 0%{?fedora} >= 27 || 0%{?rhel} >= 8
+BuildRequires: (php-composer(sebastian/version) >= 1.0 with php-composer(sebastian/version) < 3)
+BuildRequires: (php-composer(nikic/php-parser) >= 3.1 with php-composer(nikic/php-parser) < 4)
+BuildRequires: (php-composer(doctrine/collections) >= 1.4 with php-composer(doctrine/collections) < 2)
+BuildRequires: (php-composer(symfony/event-dispatcher) >= 2.5 with php-composer(symfony/event-dispatcher) < 5)
+BuildRequires: (php-composer(symfony/finder) >= 2.5 with php-composer(symfony/finder) < 5)
+BuildRequires: (php-composer(symfony/console) >= 2.5 with php-composer(symfony/console) < 5)
+BuildRequires: (php-composer(symfony/stopwatch) >= 2.5 with php-composer(symfony/stopwatch) < 5)
+BuildRequires: (php-composer(symfony/dependency-injection) >= 2.5 with php-composer(symfony/dependency-injection) < 5)
+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(doctrine/cache) >= 1.3 with php-composer(doctrine/cache) < 2)
+# remirepo:24
+%else
BuildRequires: php-composer(sebastian/version) >= 1.0
BuildRequires: php-composer(sebastian/version) < 3
-BuildRequires: php-nikic-php-parser
-BuildRequires: php-composer(doctrine/collections) >= 1.2
+BuildRequires: php-nikic-php-parser3 >= 3.1
+BuildRequires: php-composer(doctrine/collections) >= 1.4
BuildRequires: php-composer(doctrine/collections) < 2
BuildRequires: %{sym_prefix}-event-dispatcher
BuildRequires: %{sym_prefix}-finder
@@ -65,14 +84,17 @@ BuildRequires: php-composer(justinrainbow/json-schema) >= 1.3
BuildRequires: php-composer(justinrainbow/json-schema) < 2
BuildRequires: php-composer(monolog/monolog) >= 1.10
BuildRequires: php-composer(monolog/monolog) < 2
-# For our patch / autoloader
-BuildRequires: php-doctrine-collections >= 1.3.0-2
-BuildRequires: php-doctrine-cache >= 1.4.1
+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
+%endif
+# For our autoloader
BuildRequires: php-composer(fedora/autoloader)
%endif
# From composer.json, "require": {
-# "php": ">=5.5",
+# "php": "^5.5|^7.0",
# "ext-tokenizer": "*",
# "ext-pcre": "*",
# "ext-spl": "*",
@@ -80,29 +102,48 @@ BuildRequires: php-composer(fedora/autoloader)
# "ext-date": "*",
# "ext-reflection": "*",
# "sebastian/version": "^1.0|^2.0",
-# "nikic/php-parser": "^2.1",
-# "doctrine/collections": "^1.2",
-# "symfony/event-dispatcher": "^2.5|^3.0",
-# "symfony/finder": "^2.5|^3.0",
-# "symfony/console": "^2.5|^3.0",
-# "symfony/stopwatch": "^2.5|^3.0",
-# "symfony/dependency-injection": "^2.5|^3.0",
+# "nikic/php-parser": "^3.1",
+# "doctrine/collections": "^1.4",
+# "symfony/event-dispatcher": "^2.5|^3.0|^4.0",
+# "symfony/finder": "^2.5|^3.0|^4.0",
+# "symfony/console": "^2.5|^3.0|^4.0",
+# "symfony/stopwatch": "^2.5|^3.0|^4.0",
+# "symfony/dependency-injection": "^2.5|^3.0|^4.0",
# "phpdocumentor/reflection-docblock": "^3.0",
# "justinrainbow/json-schema": "^1.3",
# "seld/jsonlint": "^1.1"
+# "psr/log": "^1.0"
Requires: php(language) >= 5.5
Requires: php-cli
+Requires: php-reflection
Requires: php-date
Requires: php-json
Requires: php-pcre
-Requires: php-pdo_sqlite
-Requires: php-reflection
+Requires: php-phar
Requires: php-spl
Requires: php-tokenizer
+# remirepo:1
+%if 0%{?fedora} >= 27 || 0%{?rhel} >= 8
+Requires: (php-composer(sebastian/version) >= 1.0 with php-composer(sebastian/version) < 3)
+Requires: (php-composer(nikic/php-parser) >= 3.1 with php-composer(nikic/php-parser) < 4)
+Requires: (php-composer(doctrine/collections) >= 1.4 with php-composer(doctrine/collections) < 2)
+Requires: (php-composer(symfony/event-dispatcher) >= 2.5 with php-composer(symfony/event-dispatcher) < 5)
+Requires: (php-composer(symfony/finder) >= 2.5 with php-composer(symfony/finder) < 5)
+Requires: (php-composer(symfony/console) >= 2.5 with php-composer(symfony/console) < 5)
+Requires: (php-composer(symfony/stopwatch) >= 2.5 with php-composer(symfony/stopwatch) < 5)
+Requires: (php-composer(symfony/dependency-injection) >= 2.5 with php-composer(symfony/dependency-injection) < 5)
+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)
+# Mandatory for our patch
+Requires: (php-composer(doctrine/cache) >= 1.3 with php-composer(doctrine/cache) < 2)
+# remirepo:23
+%else
Requires: php-composer(sebastian/version) >= 1.0
Requires: php-composer(sebastian/version) < 3
-Requires: php-nikic-php-parser
-Requires: php-composer(doctrine/collections) >= 1.2
+Requires: php-nikic-php-parser3 >= 3.1
+Requires: php-composer(doctrine/collections) >= 1.4
Requires: php-composer(doctrine/collections) < 2
Requires: %{sym_prefix}-event-dispatcher
Requires: %{sym_prefix}-finder
@@ -115,35 +156,27 @@ 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
+# Mandatory for our patch
+Requires: php-composer(doctrine/cache) >= 1.3
+Requires: php-composer(doctrine/cache) < 2
+%endif
# "require-dev": {
-# "doctrine/cache": "~1.3",
-# "psr/log": "~1.0",
# "monolog/monolog": "~1.10",
-# "bartlett/phpunit-loggertestlistener": "~1.3",
-# "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) >= 1.3
-Requires: php-composer(doctrine/cache) < 2
-Requires: php-composer(psr/log) >= 1.0
-Requires: php-composer(psr/log) < 2
%if ! %{bootstrap}
Requires: php-composer(bartlett/umlwriter) >= 1.0
Requires: php-composer(bartlett/umlwriter) < 2
-%if 0%{?fedora} >= 21
-Suggests: php-composer(psr/log)
+%if 0%{?fedora} >= 21 || 0%{?rhel} >= 8
Suggests: php-composer(monolog/monolog)
%endif
%endif
-# For our patch / autoloader
+# For our autoloader
Requires: php-composer(fedora/autoloader)
-Requires: php-doctrine-collections >= 1.3.0-2
-Requires: php-doctrine-cache >= 1.4.1
-Requires: php-PsrLog >= 1.0.0-8
Obsoletes: php-channel-bartlett <= 1.3
@@ -161,6 +194,8 @@ Documentation: http://php5.laurent-laville.org/reflect/manual/current/en/
%setup -q -n %{gh_project}-%{gh_commit}
%patch0 -p1 -b .rpm
+find . -name \*.rpm -delete -print
+
cp %{SOURCE1} src/Bartlett/Reflect/autoload.php
sed -e 's/@package_version@/%{version}%{?prever}/' \
@@ -183,9 +218,10 @@ install -D -p -m 644 bin/phpreflect.1 %{buildroot}%{_mandir}/man1/phpref
%check
%if %{with_tests}
ret=0
-for cmd in php php70 php71 php72; do
- if which $cmd; then
- $cmd %{_bindir}/phpunit \
+for cmdarg in "php %{phpunit}" "php70 %{_bindir}/phpunit" php71 php72 php73; do
+ if which $cmdarg; then
+ set $cmdarg
+ $1 ${2:-%{_bindir}/phpunit7} \
--include-path=%{buildroot}%{_datadir}/php \
--verbose || ret=1
fi
@@ -214,6 +250,15 @@ fi
%changelog
+* Mon Nov 26 2018 Remi Collet <remi@remirepo.net> - 4.3.0-1
+- update to 4.3.0
+- use range dependencies
+- raise dependency on nikic/php-parser 3.1
+- raise dependency on doctrine/collections 1.4
+- add dependency on psr/log
+- allow Symfony 4
+- switch to phpunit7
+
* Tue Dec 19 2017 Remi Collet <remi@remirepo.net> - 4.2.2-2
- fix autoloader to ensure nikic/php-parser v2 is used