summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--composer.json16
-rw-r--r--php-bartlett-PHP-Reflect-autoload.php16
-rw-r--r--php-bartlett-PHP-Reflect-rpm.patch (renamed from php-bartlett-PHP-Reflect-4.3.0-rpm.patch)2
-rw-r--r--php-bartlett-PHP-Reflect.spec63
4 files changed, 47 insertions, 50 deletions
diff --git a/composer.json b/composer.json
index d9832f5..9bf7b8f 100644
--- a/composer.json
+++ b/composer.json
@@ -10,7 +10,7 @@
"issues": "https://github.com/llaville/php-reflect/issues"
},
"require": {
- "php": "^5.5|^7.0",
+ "php": "^7.1",
"ext-tokenizer": "*",
"ext-pcre": "*",
"ext-phar": "*",
@@ -19,13 +19,13 @@
"ext-date": "*",
"ext-reflection": "*",
"sebastian/version": "^1.0|^2.0",
- "nikic/php-parser": "^3.1",
+ "nikic/php-parser": "^4.0",
"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",
+ "symfony/event-dispatcher": "^3.0|^4.0",
+ "symfony/finder": "^3.0|^4.0",
+ "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",
@@ -36,8 +36,6 @@
},
"suggest": {
"doctrine/cache": "Allow caching results",
- "bartlett/monolog-callbackfilterhandler": "Advanced filtering strategies for Monolog",
- "bartlett/monolog-growlhandler": "Sends notifications to Growl for Monolog",
"bartlett/phpunit-loggertestlistener": "Allow logging unit tests to your favorite PSR-3 logger interface",
"bartlett/umlwriter": "Allow writing UML class diagrams (Graphviz or PlantUML)"
},
diff --git a/php-bartlett-PHP-Reflect-autoload.php b/php-bartlett-PHP-Reflect-autoload.php
index 5e1a183..4b8bcb5 100644
--- a/php-bartlett-PHP-Reflect-autoload.php
+++ b/php-bartlett-PHP-Reflect-autoload.php
@@ -6,25 +6,21 @@
require_once '/usr/share/php/Fedora/Autoloader/autoload.php';
\Fedora\Autoloader\Autoload::addPsr4('Bartlett\\', dirname(__DIR__));
-\Fedora\Autoloader\Dependencies::required(array(
- '/usr/share/php/PhpParser3/autoload.php',
- array(
- '/usr/share/php/Symfony4/Component/autoload.php',
- '/usr/share/php/Symfony3/Component/autoload.php',
- '/usr/share/php/Symfony/Component/autoload.php',
- ),
+\Fedora\Autoloader\Dependencies::required([
+ '/usr/share/php/PhpParser4/autoload.php',
+ '/usr/share/php/Symfony4/Component/autoload.php',
'/usr/share/php/Seld/JsonLint/autoload.php',
'/usr/share/php/JsonSchema/autoload.php',
'/usr/share/php/SebastianBergmann/Version/autoload.php',
'/usr/share/php/Doctrine/Common/Collections/autoload.php',
'/usr/share/php/Doctrine/Common/Cache/autoload.php',
'/usr/share/php/phpDocumentor/Reflection/DocBlock/autoload.php',
-));
-\Fedora\Autoloader\Dependencies::optional(array(
+]);
+\Fedora\Autoloader\Dependencies::optional([
'/usr/share/php/Bartlett/CompatInfo/autoload.php', // Needed when installed for 'Bartlett\CompatInfo\Analyser\CompatibilityAnalyser'
'/usr/share/php/Bartlett/UmlWriter/autoload.php',
'/usr/share/php/Psr/Log/autoload.php',
'/usr/share/php/Monolog/autoload.php',
-));
+]);
$vendorDir = '/usr/share/php';
diff --git a/php-bartlett-PHP-Reflect-4.3.0-rpm.patch b/php-bartlett-PHP-Reflect-rpm.patch
index 40f8a59..a219426 100644
--- a/php-bartlett-PHP-Reflect-4.3.0-rpm.patch
+++ b/php-bartlett-PHP-Reflect-rpm.patch
@@ -60,7 +60,7 @@ diff -up ./bin/phpreflect.rpm ./bin/phpreflect
Environment::setScanDir();
--$application = new Application($appName, '4.3');
+-$application = new Application($appName, '5.0-dev');
+$application = new Application($appName, '@package_version@');
$application->run();
diff -up ./tests/bootstrap.php.rpm ./tests/bootstrap.php
diff --git a/php-bartlett-PHP-Reflect.spec b/php-bartlett-PHP-Reflect.spec
index 63e06b5..1d6edaa 100644
--- a/php-bartlett-PHP-Reflect.spec
+++ b/php-bartlett-PHP-Reflect.spec
@@ -7,30 +7,25 @@
# Please, preserve the changelog entries
#
%global bootstrap 0
-%global gh_commit 6609c40a1695ce5bcbaa814214cf4e8d88e21569
+%global gh_commit 577395256a2b8fa43f4de747254bd236372de8b8
%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
+%global upstream_version 5.0.0
+%global upstream_prever alpha1
%if %{bootstrap}
-%global with_tests %{?_with_tests:1}%{!?_with_tests:0}
+%global with_tests 0%{?_with_tests:1}
%else
-%global with_tests %{?_without_tests:0}%{!?_without_tests:1}
+%global with_tests 0%{!?_without_tests:1}
%endif
-%if 0%{?fedora} >= 27 || 0%{?rhel} >= 8
%global sym_prefix php-symfony4
%global phpunit %{_bindir}/phpunit7
-%else
-%global sym_prefix php-symfony3
-%global phpunit %{_bindir}/phpunit
-%endif
Name: php-bartlett-PHP-Reflect
-Version: 4.3.0
-%global specrel 2
-Release: %{?gh_date:1%{specrel}.%{?prever}%{!?prever:%{gh_date}git%{gh_short}}}%{!?gh_date:%{specrel}}%{?dist}
+Version: %{upstream_version}%{?upstream_prever:~%{upstream_prever}}
+Release: 1%{?dist}
Summary: Adds the ability to reverse-engineer PHP
License: BSD
@@ -44,26 +39,26 @@ Source1: %{name}-autoload.php
Patch0: %{name}-4.3.0-rpm.patch
BuildArch: noarch
-BuildRequires: php(language) >= 5.5
+BuildRequires: php(language) >= 7.1
%if %{with_tests}
# to run test suite
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(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(doctrine/cache) >= 1.3 with php-composer(doctrine/cache) < 2)
+BuildRequires: (php-composer(doctrine/cache) >= 1.3 with php-composer(doctrine/cache) < 2)
# remirepo:19
%else
BuildRequires: php-composer(sebastian/version) >= 1.0
BuildRequires: php-composer(sebastian/version) < 3
-BuildRequires: php-nikic-php-parser3 >= 3.1
+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
@@ -89,7 +84,7 @@ BuildRequires: php-composer(fedora/autoloader)
%endif
# From composer.json, "require": {
-# "php": "^5.5|^7.0",
+# "php": "^7.1",
# "ext-tokenizer": "*",
# "ext-pcre": "*",
# "ext-spl": "*",
@@ -97,18 +92,18 @@ BuildRequires: php-composer(fedora/autoloader)
# "ext-date": "*",
# "ext-reflection": "*",
# "sebastian/version": "^1.0|^2.0",
-# "nikic/php-parser": "^3.1",
+# "nikic/php-parser": "^4.0",
# "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",
+# "symfony/event-dispatcher": "^3.0|^4.0",
+# "symfony/finder": "^3.0|^4.0",
+# "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"
-Requires: php(language) >= 5.5
+Requires: php(language) >= 7.1
Requires: php-cli
Requires: php-reflection
Requires: php-date
@@ -120,7 +115,7 @@ 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(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)
@@ -132,7 +127,7 @@ Requires: (php-composer(doctrine/cache) >= 1.3 with ph
%else
Requires: php-composer(sebastian/version) >= 1.0
Requires: php-composer(sebastian/version) < 3
-Requires: php-nikic-php-parser3 >= 3.1
+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
@@ -159,10 +154,12 @@ Requires: %{sym_prefix}-dependency-injection
# "bartlett/phpunit-loggertestlistener": "Allow logging unit tests to your favorite PSR-3 logger interface",
# "bartlett/umlwriter": "Allow writing UML class diagrams (Graphviz or PlantUML)"
%if ! %{bootstrap}
+%if 0%{?fedora} >= 27 || 0%{?rhel} >= 8
+Requires: (php-composer(bartlett/umlwriter) >= 1.0 with php-composer(bartlett/umlwriter) < 2)
+Suggests: php-composer(monolog/monolog)
+%else
Requires: php-composer(bartlett/umlwriter) >= 1.0
Requires: php-composer(bartlett/umlwriter) < 2
-%if 0%{?fedora} >= 21 || 0%{?rhel} >= 8
-Suggests: php-composer(monolog/monolog)
%endif
%endif
# For our autoloader
@@ -188,7 +185,7 @@ find . -name \*.rpm -delete -print
cp %{SOURCE1} src/Bartlett/Reflect/autoload.php
-sed -e 's/@package_version@/%{version}%{?prever}/' \
+sed -e 's/@package_version@/%{?upstream_prever:-%{upstream_prever}}/' \
-i $(find src -name \*.php) bin/phpreflect
@@ -208,7 +205,7 @@ install -D -p -m 644 bin/phpreflect.1 %{buildroot}%{_mandir}/man1/phpref
%check
%if %{with_tests}
ret=0
-for cmdarg in "php %{phpunit}" "php70 %{_bindir}/phpunit" php71 php72 php73; do
+for cmdarg in "php %{phpunit}" php71 php72 php73; do
if which $cmdarg; then
set $cmdarg
$1 ${2:-%{_bindir}/phpunit7} \
@@ -240,6 +237,12 @@ fi
%changelog
+* 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
+- raise dependency on nikic/php-parser 4.0
+- only Symfony 4 and PHPUnit 7
+
* Sun Dec 9 2018 Remi Collet <remi@remirepo.net> - 4.3.0-2
- Fedora: switch to symfony4 only, see #1657328