summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2018-11-28 09:27:34 +0100
committerRemi Collet <remi@remirepo.net>2018-11-28 09:27:34 +0100
commit0c7679632b3dc90fedd1ec8b4c3f030097d2a519 (patch)
treeeee8bdf168eee5a54767c3d02f337cc1c4cd64a1
parent16d8fb666217a4f9b4e3f7a0938085fa22b418ee (diff)
update to 5.1.0
raise dependency on bartlett/php-reflect 4.3 add explicit dependency on nikic/php-parser add explicit dependency on doctrine/cache add dependency on psr/log switch to phpunit7
-rw-r--r--composer.json25
-rw-r--r--php-bartlett-PHP-CompatInfo-5.1.0-autoload.php (renamed from php-bartlett-PHP-CompatInfo-5.0.0-autoload.php)6
-rw-r--r--php-bartlett-PHP-CompatInfo-5.1.0-rpm.patch (renamed from php-bartlett-PHP-CompatInfo-5.0.0-rpm.patch)30
-rw-r--r--php-bartlett-PHP-CompatInfo.spec94
4 files changed, 85 insertions, 70 deletions
diff --git a/composer.json b/composer.json
index 76baccf..5277e8f 100644
--- a/composer.json
+++ b/composer.json
@@ -9,34 +9,24 @@
"source": "https://github.com/llaville/php-compat-info",
"issues": "https://github.com/llaville/php-compat-info/issues"
},
- "repositories": [
- {
- "type": "pear",
- "url": "https://pear.php.net"
- }
- ],
"require": {
- "php": ">=5.5",
+ "php": "^5.5|^7.0",
"ext-libxml": "*",
"ext-pcre": "*",
"ext-spl": "*",
"ext-json": "*",
"ext-pdo_sqlite": "*",
- "bartlett/php-reflect": "^4.2",
- "bartlett/php-compatinfo-db": "^1.23"
+ "bartlett/php-reflect": "^4.3",
+ "nikic/php-parser": "^3.1",
+ "bartlett/php-compatinfo-db": "^1.23",
+ "psr/log": "^1.0"
},
"require-dev": {
"doctrine/cache": "^1.3",
- "psr/log": "^1.0",
- "monolog/monolog": "^1.10",
- "bartlett/monolog-callbackfilterhandler": "^1.0",
- "bartlett/monolog-growlhandler": "^1.0",
- "bartlett/phpunit-loggertestlistener": "^1.5",
- "bartlett/umlwriter": "^1.0"
+ "monolog/monolog": "^1.10"
},
"suggest": {
"doctrine/cache": "Allow caching results, since bartlett/php-reflect 2.2",
- "psr/log": "Allow logging events with the LogPlugin",
"monolog/monolog": "Allow logging events with the LogPlugin",
"bartlett/monolog-callbackfilterhandler": "Advanced filtering strategies for Monolog",
"bartlett/monolog-growlhandler": "Sends notifications to Growl for Monolog",
@@ -70,9 +60,6 @@
}
},
"config": {
- "platform": {
- "php": "5.5.0"
- },
"optimize-autoloader": true
}
}
diff --git a/php-bartlett-PHP-CompatInfo-5.0.0-autoload.php b/php-bartlett-PHP-CompatInfo-5.1.0-autoload.php
index 4297383..61e455b 100644
--- a/php-bartlett-PHP-CompatInfo-5.0.0-autoload.php
+++ b/php-bartlett-PHP-CompatInfo-5.1.0-autoload.php
@@ -9,5 +9,11 @@ require_once '/usr/share/php/Fedora/Autoloader/autoload.php';
\Fedora\Autoloader\Dependencies::required(array(
'/usr/share/php/Bartlett/Reflect/autoload.php',
'/usr/share/php/Bartlett/CompatInfoDb/autoload.php',
+ '/usr/share/php/PhpParser3/autoload.php',
+ '/usr/share/php/Psr/Log/autoload.php',
+ '/usr/share/php/Doctrine/Common/Cache/autoload.php',
+));
+\Fedora\Autoloader\Dependencies::optional(array(
+ '/usr/share/php/Monolog/autoload.php',
));
diff --git a/php-bartlett-PHP-CompatInfo-5.0.0-rpm.patch b/php-bartlett-PHP-CompatInfo-5.1.0-rpm.patch
index 55a4c09..d8a8fb7 100644
--- a/php-bartlett-PHP-CompatInfo-5.0.0-rpm.patch
+++ b/php-bartlett-PHP-CompatInfo-5.1.0-rpm.patch
@@ -1,6 +1,6 @@
diff -up ./bin/phpcompatinfo.json.dist.rpm ./bin/phpcompatinfo.json.dist
---- ./bin/phpcompatinfo.json.dist.rpm 2015-12-05 10:11:45.000000000 +0100
-+++ ./bin/phpcompatinfo.json.dist 2015-12-07 09:08:39.785273332 +0100
+--- ./bin/phpcompatinfo.json.dist.rpm 2018-11-27 22:03:39.000000000 +0100
++++ ./bin/phpcompatinfo.json.dist 2018-11-28 08:53:47.258278539 +0100
@@ -6,6 +6,19 @@
}
],
@@ -22,9 +22,9 @@ diff -up ./bin/phpcompatinfo.json.dist.rpm ./bin/phpcompatinfo.json.dist
"analysers" : [
],
diff -up ./bin/phpcompatinfo.rpm ./bin/phpcompatinfo
---- ./bin/phpcompatinfo.rpm 2015-12-05 10:11:45.000000000 +0100
-+++ ./bin/phpcompatinfo 2015-12-07 09:14:17.072783363 +0100
-@@ -1,52 +1,21 @@
+--- ./bin/phpcompatinfo.rpm 2018-11-28 08:53:47.258278539 +0100
++++ ./bin/phpcompatinfo 2018-11-28 08:55:38.807878501 +0100
+@@ -1,40 +1,22 @@
#!/usr/bin/env php
<?php
$appName = 'phpCompatInfo';
@@ -43,24 +43,13 @@ diff -up ./bin/phpcompatinfo.rpm ./bin/phpcompatinfo
- if (!getenv("BARTLETTRC")) {
- putenv("BARTLETTRC=" . strtolower($appName) . '.json');
- }
--}
--$loader = require_once $vendorDir . '/autoload.php';
--$loader->setUseIncludePath(true);
--
--if (\Phar::running()) {
-- if ($home) {
-- // when optional resources are not embedded in phar distribution,
-- // avoid PHP Warnings, and lookup first in global vendor dir (COMPOSER_HOME) if exists
-- $classMapfiltered = $fallbackClassMap($loader->getClassMap(), 'Net_Growl');
-- $loader->addClassMap($classMapfiltered);
--
-- // try to find PEAR Net_Growl classes package in folder $fallbackNetGrowlDir (see phar-stub.php)
-- $loader->add(false, $fallbackNetGrowlDir);
-- }
+require_once $vendorDir . '/Bartlett/CompatInfo/autoload.php';
++
+if (!getenv("BARTLETTRC")) {
+ putenv("BARTLETTRC=" . strtolower($appName) . '.json');
}
+-$loader = require_once $vendorDir . '/autoload.php';
+-$loader->setUseIncludePath(true);
if (PHP_SAPI !== 'cli') {
return;
@@ -79,7 +68,6 @@ diff -up ./bin/phpcompatinfo.rpm ./bin/phpcompatinfo
Environment::setScanDir();
--$application = new Application($appName, '5.0');
+-$application = new Application($appName, '5.1');
+$application = new Application($appName, '@package_version@');
$application->run();
-
diff --git a/php-bartlett-PHP-CompatInfo.spec b/php-bartlett-PHP-CompatInfo.spec
index 0e7fa54..0dc48f5 100644
--- a/php-bartlett-PHP-CompatInfo.spec
+++ b/php-bartlett-PHP-CompatInfo.spec
@@ -11,7 +11,7 @@
%undefine __brp_mangle_shebangs
%{!?php_version: %global php_version %(php -r 'echo PHP_VERSION;' 2>/dev/null)}
-%global gh_commit ecf11cf73912e56cc91814b540e4789cdc8739c6
+%global gh_commit e1239c5433be4a121ade2ab5aec9bb81faae7134
%global gh_short %(c=%{gh_commit}; echo ${c:0:7})
#global gh_date 20151005
%global gh_owner llaville
@@ -26,7 +26,7 @@
%endif
Name: php-bartlett-PHP-CompatInfo
-Version: 5.0.12
+Version: 5.1.0
%global specrel 1
Release: %{?gh_date:1%{specrel}.%{?prever}%{!?prever:%{gh_date}git%{gh_short}}}%{!?gh_date:%{specrel}}%{?dist}
Summary: Find out version and the extensions required for a piece of code to run
@@ -40,39 +40,53 @@ Source0: https://github.com/%{gh_owner}/%{gh_project}/archive/%{gh_commit
Source1: fedora-review-check
# Autoloader for RPM - die composer !
-Source2: %{name}-5.0.0-autoload.php
+Source2: %{name}-5.1.0-autoload.php
# Autoload and sqlite database path
-Patch0: %{name}-5.0.0-rpm.patch
+Patch0: %{name}-5.1.0-rpm.patch
BuildArch: noarch
BuildRequires: php(language) >= 5.5
%if %{with_tests}
# to run test suite
-BuildRequires: %{_bindir}/phpunit
BuildRequires: php-pdo_sqlite
-%if 0%{?fedora} >= 27
-BuildRequires: (php-composer(bartlett/php-reflect) >= 4.2 with php-composer(bartlett/php-reflect) < 5)
-BuildRequires: (php-composer(bartlett/php-compatinfo-db) >= 1.23 with php-composer(bartlett/php-compatinfo-db) < 2)
+# remirepo:1
+%if 0%{?fedora} >= 27 || 0%{?rhel} >= 8
+%global phpunit %{_bindir}/phpunit7
+BuildRequires: (php-composer(bartlett/php-reflect) >= 4.3 with php-composer(bartlett/php-reflect) < 5)
+BuildRequires: (php-composer(nikic/php-parser) >= 3.1 with php-composer(nikic/php-parser) < 4)
+BuildRequires: (php-composer(bartlett/php-compatinfo-db) >= 1.23 with php-composer(bartlett/php-compatinfo-db) < 2)
+BuildRequires: (php-composer(psr/log) >= 1.0 with php-composer(psr/log) < 2)
+Requires: (php-composer(doctrine/cache) >= 1.3 with php-composer(doctrine/cache) < 2)
+# remirepo:12
%else
-BuildRequires: php-composer(bartlett/php-reflect) < 5
-BuildRequires: php-composer(bartlett/php-reflect) >= 4.2
-BuildRequires: php-composer(bartlett/php-compatinfo-db) < 2
-BuildRequires: php-composer(bartlett/php-compatinfo-db) >= 1.23
+%global phpunit %{_bindir}/phpunit
+BuildRequires: php-composer(bartlett/php-reflect) < 5
+BuildRequires: php-composer(bartlett/php-reflect) >= 4.2
+BuildRequires: php-nikic-php-parser3 >= 3.1
+BuildRequires: php-composer(bartlett/php-compatinfo-db) < 2
+BuildRequires: php-composer(bartlett/php-compatinfo-db) >= 1.23
+BuildRequires: php-composer(psr/log) < 2
+BuildRequires: php-composer(psr/log) >= 1.0
+BuildRequires: php-composer(doctrine/cache) < 2
+BuildRequires: php-composer(doctrine/cache) >= 1.3
%endif
+BuildRequires: %{phpunit}
# For our patch / autoloader
BuildRequires: php-composer(fedora/autoloader)
%endif
# From composer.json, "require"
-# "php": ">=5.5",
+# "php": "^5.5|^7.0",
# "ext-libxml": "*",
# "ext-pcre": "*",
# "ext-spl": "*",
# "ext-json": "*",
# "ext-pdo_sqlite": "*",
-# "bartlett/php-reflect": "^4.2",
-# "bartlett/php-compatinfo-db": "^1.23"
+# "bartlett/php-reflect": "^4.3",
+# "nikic/php-parser": "^3.1",
+# "bartlett/php-compatinfo-db": "^1.23",
+# "psr/log": "^1.0"
Requires: php(language) >= 5.5
Requires: php-cli
Requires: php-json
@@ -80,26 +94,31 @@ Requires: php-libxml
Requires: php-pcre
Requires: php-pdo_sqlite
Requires: php-spl
-%if 0%{?fedora} >= 27
-Requires: (php-composer(bartlett/php-reflect) >= 4.2 with php-composer(bartlett/php-reflect) < 5)
-Requires: (php-composer(bartlett/php-compatinfo-db) >= 1.23 with php-composer(bartlett/php-compatinfo-db) < 2)
+# remirepo:1
+%if 0%{?fedora} >= 27 || 0%{?rhel} >= 8
+Requires: (php-composer(bartlett/php-reflect) >= 4.3 with php-composer(bartlett/php-reflect) < 5)
+Requires: (php-composer(nikic/php-parser) >= 3.1 with php-composer(nikic/php-parser) < 4)
+Requires: (php-composer(bartlett/php-compatinfo-db) >= 1.23 with php-composer(bartlett/php-compatinfo-db) < 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:12
%else
-Requires: php-composer(bartlett/php-reflect) < 5
-Requires: php-composer(bartlett/php-reflect) >= 4.2
+Requires: php-composer(bartlett/php-reflect) < 5
+Requires: php-composer(bartlett/php-reflect) >= 4.2
+Requires: php-nikic-php-parser3 >= 3.1
Requires: php-composer(bartlett/php-compatinfo-db) < 2
Requires: php-composer(bartlett/php-compatinfo-db) >= 1.23
+Requires: php-composer(psr/log) < 2
+Requires: php-composer(psr/log) >= 1.0
+# Mandatory for our patch
+Requires: php-composer(doctrine/cache) < 2
+Requires: php-composer(doctrine/cache) >= 1.3
%endif
# From composer.json, "require-dev": {
-# "doctrine/cache": "^1.3",
-# "psr/log": "^1.0",
# "monolog/monolog": "^1.10",
-# "bartlett/monolog-callbackfilterhandler": "^1.0",
-# "bartlett/monolog-growlhandler": "^1.0",
-# "bartlett/phpunit-loggertestlistener": "^1.5",
-# "bartlett/umlwriter": "^1.0"
# From composer.json, "suggest"
# "doctrine/cache": "Allow caching results, since bartlett/php-reflect 2.2",
-# "psr/log": "Allow logging events with the LogPlugin",
# "monolog/monolog": "Allow logging events with the LogPlugin",
# "bartlett/monolog-callbackfilterhandler": "Advanced filtering strategies for Monolog",
# "bartlett/monolog-growlhandler": "Sends notifications to Growl for Monolog",
@@ -107,6 +126,11 @@ Requires: php-composer(bartlett/php-compatinfo-db) >= 1.23
# "bartlett/umlwriter": "Allow writing UML class diagrams (Graphviz or PlantUML)"
# "doctrine/cache": "Allow caching results, since bartlett/php-reflect 2.2"
# "bartlett/umlwriter": "Allow writing UML class diagrams (Graphviz or PlantUML)"
+# remirepo:1
+%if 0%{?fedora} >= 21 || 0%{?rhel} >= 8
+Suggests: php-composer(monolog/monolog)
+# remirepo:1
+%endif
# Required by autoloader
Requires: php-composer(fedora/autoloader)
@@ -160,9 +184,11 @@ ln -s %{buildroot}%{_datadir}/php/Bartlett/CompatInfo/autoload.php vendor/
ret=0
-for cmd in php php70 php71 php72; do
- if which $cmd; then
- $cmd %{_bindir}/phpunit --include-path %{buildroot}%{_datadir}/php --verbose || ret=1
+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
done
exit $ret
@@ -188,6 +214,14 @@ fi
%changelog
+* Wed Nov 28 2018 Remi Collet <remi@remirepo.net> - 5.1.0-1
+- update to 5.1.0
+- raise dependency on bartlett/php-reflect 4.3
+- add explicit dependency on nikic/php-parser
+- add explicit dependency on doctrine/cache
+- add dependency on psr/log
+- switch to phpunit7
+
* Fri Feb 2 2018 Remi Collet <remi@remirepo.net> - 5.0.12-1
- Update to 5.0.12 (no change)
- use range dependency on F27+