diff options
-rw-r--r-- | php-bartlett-PHP-CompatInfo-rpm.patch | 34 | ||||
-rw-r--r-- | php-bartlett-PHP-CompatInfo-upstream.patch | 84 | ||||
-rw-r--r-- | php-bartlett-PHP-CompatInfo.spec | 28 |
3 files changed, 48 insertions, 98 deletions
diff --git a/php-bartlett-PHP-CompatInfo-rpm.patch b/php-bartlett-PHP-CompatInfo-rpm.patch index a39ef5a..f35d15c 100644 --- a/php-bartlett-PHP-CompatInfo-rpm.patch +++ b/php-bartlett-PHP-CompatInfo-rpm.patch @@ -1,13 +1,36 @@ +diff -up ./bin/phpcompatinfo.json.dist.rpm ./bin/phpcompatinfo.json.dist +--- ./bin/phpcompatinfo.json.dist.rpm 2014-08-22 08:17:40.045281815 +0200 ++++ ./bin/phpcompatinfo.json.dist 2014-08-22 08:17:46.784308376 +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/phpcompatinfo.rpm ./bin/phpcompatinfo ---- ./bin/phpcompatinfo.rpm 2014-07-22 20:58:01.000000000 +0200 -+++ ./bin/phpcompatinfo 2014-07-24 07:35:44.357468394 +0200 +--- ./bin/phpcompatinfo.rpm 2014-08-21 21:09:22.000000000 +0200 ++++ ./bin/phpcompatinfo 2014-08-22 08:28:20.750827392 +0200 @@ -1,4 +1,4 @@ -#!/usr/bin/env php +#!/usr/bin/php <?php ini_set('memory_limit', -1); -@@ -22,7 +22,25 @@ if (\Phar::running()) { +@@ -23,7 +23,26 @@ if (\Phar::running()) { } } } @@ -28,6 +51,7 @@ diff -up ./bin/phpcompatinfo.rpm ./bin/phpcompatinfo + 'Symfony\\Component\\EventDispatcher' => $vendorDir, + 'Symfony\\Component\\Console' => $vendorDir, + 'Symfony\\Component\\ClassLoader' => $vendorDir, ++ 'Seld\\JsonLint' => $vendorDir, + 'Bartlett' => $vendorDir, +)); +$loader->register(); @@ -35,8 +59,8 @@ diff -up ./bin/phpcompatinfo.rpm ./bin/phpcompatinfo if (PHP_SAPI !== 'cli') { return; diff -up ./tests/bootstrap.php.rpm ./tests/bootstrap.php ---- ./tests/bootstrap.php.rpm 2014-07-22 20:58:01.000000000 +0200 -+++ ./tests/bootstrap.php 2014-07-24 07:35:28.060391649 +0200 +--- ./tests/bootstrap.php.rpm 2014-08-21 21:09:22.000000000 +0200 ++++ ./tests/bootstrap.php 2014-08-22 08:30:12.203270207 +0200 @@ -1,8 +1,29 @@ <?php diff --git a/php-bartlett-PHP-CompatInfo-upstream.patch b/php-bartlett-PHP-CompatInfo-upstream.patch deleted file mode 100644 index a42c72d..0000000 --- a/php-bartlett-PHP-CompatInfo-upstream.patch +++ /dev/null @@ -1,84 +0,0 @@ -From c45d362462779cf67a06f2e991e88f4c6ca4908d Mon Sep 17 00:00:00 2001 -From: Remi Collet <fedora@famillecollet.com> -Date: Thu, 24 Jul 2014 16:58:37 +0200 -Subject: [PATCH] fix ref version for haru, ssh2 and stomp extension - -Signed-off-by: Laurent Laville <laurent.laville@gmail.com> ---- - src/Bartlett/CompatInfo/Reference/Extension/HaruExtension.php | 2 +- - src/Bartlett/CompatInfo/Reference/Extension/Ssh2Extension.php | 2 +- - src/Bartlett/CompatInfo/Reference/Extension/StompExtension.php | 2 +- - 3 files changed, 3 insertions(+), 3 deletions(-) - -diff --git a/src/Bartlett/CompatInfo/Reference/Extension/HaruExtension.php b/src/Bartlett/CompatInfo/Reference/Extension/HaruExtension.php -index 0445211..d6783f6 100644 ---- a/src/Bartlett/CompatInfo/Reference/Extension/HaruExtension.php -+++ b/src/Bartlett/CompatInfo/Reference/Extension/HaruExtension.php -@@ -7,7 +7,7 @@ - class HaruExtension extends AbstractReference - { - const REF_NAME = 'haru'; -- const REF_VERSION = ''; -+ const REF_VERSION = '1.0.4'; // 2012-12-23 - - public function __construct() - { -diff --git a/src/Bartlett/CompatInfo/Reference/Extension/Ssh2Extension.php b/src/Bartlett/CompatInfo/Reference/Extension/Ssh2Extension.php -index 102ac4c..e958f4a 100644 ---- a/src/Bartlett/CompatInfo/Reference/Extension/Ssh2Extension.php -+++ b/src/Bartlett/CompatInfo/Reference/Extension/Ssh2Extension.php -@@ -7,7 +7,7 @@ - class Ssh2Extension extends AbstractReference - { - const REF_NAME = 'ssh2'; -- const REF_VERSION = ''; -+ const REF_VERSION = '0.12'; // 2012-10-15 - - public function __construct() - { -diff --git a/src/Bartlett/CompatInfo/Reference/Extension/StompExtension.php b/src/Bartlett/CompatInfo/Reference/Extension/StompExtension.php -index b2c5ce7..20f77a5 100644 ---- a/src/Bartlett/CompatInfo/Reference/Extension/StompExtension.php -+++ b/src/Bartlett/CompatInfo/Reference/Extension/StompExtension.php -@@ -7,7 +7,7 @@ - class StompExtension extends AbstractReference - { - const REF_NAME = 'stomp'; -- const REF_VERSION = ''; -+ const REF_VERSION = '1.0.5'; // 2012-11-18 - - public function __construct() - { --- -1.9.3 - -From b3bcf488623080ad0de6965d478692dbc6c3e921 Mon Sep 17 00:00:00 2001 -From: Remi Collet <fedora@famillecollet.com> -Date: Thu, 24 Jul 2014 16:59:05 +0200 -Subject: [PATCH] don't use extension version if not registered in reference, - fix snmp issue - -Signed-off-by: Laurent Laville <laurent.laville@gmail.com> ---- - src/Bartlett/CompatInfo/Reference/AbstractReference.php | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -diff --git a/src/Bartlett/CompatInfo/Reference/AbstractReference.php b/src/Bartlett/CompatInfo/Reference/AbstractReference.php -index 3bef201..2926813 100644 ---- a/src/Bartlett/CompatInfo/Reference/AbstractReference.php -+++ b/src/Bartlett/CompatInfo/Reference/AbstractReference.php -@@ -186,9 +186,10 @@ public function getCurrentVersion() - { - $version = phpversion($this->name); - $pattern = '/^[0-9]+\.[0-9]+/'; -- if (!preg_match($pattern, $version)) { -+ if (empty($this->version) || !preg_match($pattern, $version)) { - /** - * When version is not provided by the extension, or not standard format -+ * or we don't have it in our reference (ex snmp) because have no sense - * be sure at least to return latest PHP version supported. - */ - $version = $this->getLatestPhpVersion(); --- -1.9.3 - diff --git a/php-bartlett-PHP-CompatInfo.spec b/php-bartlett-PHP-CompatInfo.spec index 8763e39..d46871b 100644 --- a/php-bartlett-PHP-CompatInfo.spec +++ b/php-bartlett-PHP-CompatInfo.spec @@ -6,14 +6,14 @@ # # Please, preserve the changelog entries # -%global gh_commit 23d66048d3aac6093e215143274eb95e8556da70 +%global gh_commit fca41fa03aec12bacf1c281a4fa6b832960f2fb4 #global gh_short %(c=%{gh_commit}; echo ${c:0:7}) %global gh_owner llaville %global gh_project php-compat-info Name: php-bartlett-PHP-CompatInfo -Version: 3.2.0 -%global specrel 3 +Version: 3.3.0 +%global specrel 1 Release: %{?gh_short:0.%{specrel}.git%{gh_short}}%{!?gh_short:%{specrel}}%{?dist} Summary: Find out version and the extensions required for a piece of code to run @@ -24,13 +24,13 @@ Source0: https://github.com/%{gh_owner}/%{gh_project}/archive/%{gh_commit # Autoloader for RPM - die composer ! Patch0: %{name}-rpm.patch -Patch1: %{name}-upstream.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildArch: noarch BuildRequires: php(language) >= 5.3.0 # to run test suite BuildRequires: %{_bindir}/phpunit +# 2.2 is enough for test (2.3 required for cache) BuildRequires: php-composer(bartlett/php-reflect) >= 2.2 # From composer.json, "require" @@ -40,16 +40,20 @@ BuildRequires: php-composer(bartlett/php-reflect) >= 2.2 # "ext-spl": "*", # "ext-json": "*", # "symfony/console": "~2.5", -# "bartlett/php-reflect": "~2.2" +# "bartlett/php-reflect": "~2.3", +# "seld/jsonlint": "~1.1" Requires: php(language) >= 5.3.0 +Requires: php-intl Requires: php-json Requires: php-libxml Requires: php-pcre Requires: php-spl -Requires: php-composer(bartlett/php-reflect) >= 2.2 +Requires: php-composer(bartlett/php-reflect) >= 2.3 Requires: php-composer(bartlett/php-reflect) < 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 # From composer.json, "suggest" # "doctrine/cache": "Allow caching results, since bartlett/php-reflect 2.2" Requires: php-composer(doctrine/cache) @@ -59,8 +63,6 @@ Requires: php-composer(nikic/php-parser) Requires: php-composer(symfony/class-loader) Requires: php-composer(symfony/event-dispatcher) Requires: php-composer(symfony/finder) -# From phpcompatinfo report for version 3.2.0 -Requires: php-curl Provides: phpcompatinfo = %{version} Provides: php-composer(bartlett/php-compatinfo) = %{version} @@ -79,7 +81,6 @@ Documentation: http://php5.laurent-laville.org/compatinfo/manual/3.2/en/ %setup -q -n %{gh_project}-%{gh_commit} %patch0 -p1 -b .rpm -%patch1 -p1 -b .git sed -e 's/@package_version@/%{version}/' \ -i $(find src -name \*.php) @@ -100,6 +101,9 @@ install -D -p -m 644 bin/phpcompatinfo.1 %{buildroot}%{_mandir}/man1/php %check +# Not ready (local build with php 5.6 and xcache 4.0-dev) +rm tests/Reference/Extension/XcacheExtensionTest.php + # OK, but incomplete or skipped tests! # Tests: 810, Assertions: 10996, Skipped: 80, when most extensions installed # Tests: 551, Assertions: 6833, Skipped: 378, in mock @@ -132,6 +136,12 @@ fi %changelog +* Fri Aug 24 2014 Remi Collet <remi@fedoraproject.org> - 3.3.0-1 +- Update to 3.2.0 +- add dependency on seld/jsonlint +- raise dependency on bartlett/php-reflect 2.3 +- enable the cache plugin in default configuration + * Fri Jul 25 2014 Remi Collet <remi@fedoraproject.org> - 3.2.0-3 - cleanup pear registration |