From 7e831fdc889e67f67070d16d8902c99fb58b371b Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Tue, 6 Oct 2015 08:25:58 +0200 Subject: php-bartlett-PHP-CompatInfo: 4.5.0 --- php-bartlett-PHP-CompatInfo-4.4.0-rpm.patch | 120 ---------------------------- php-bartlett-PHP-CompatInfo-4.5.0-rpm.patch | 120 ++++++++++++++++++++++++++++ php-bartlett-PHP-CompatInfo.spec | 26 +++--- 3 files changed, 131 insertions(+), 135 deletions(-) delete mode 100644 php-bartlett-PHP-CompatInfo-4.4.0-rpm.patch create mode 100644 php-bartlett-PHP-CompatInfo-4.5.0-rpm.patch diff --git a/php-bartlett-PHP-CompatInfo-4.4.0-rpm.patch b/php-bartlett-PHP-CompatInfo-4.4.0-rpm.patch deleted file mode 100644 index cdba4af..0000000 --- a/php-bartlett-PHP-CompatInfo-4.4.0-rpm.patch +++ /dev/null @@ -1,120 +0,0 @@ -diff -up ./bin/phpcompatinfo.json.dist.rpm ./bin/phpcompatinfo.json.dist ---- ./bin/phpcompatinfo.json.dist.rpm 2015-07-11 10:04:30.000000000 +0200 -+++ ./bin/phpcompatinfo.json.dist 2015-07-13 09:06:15.108698079 +0200 -@@ -6,6 +6,19 @@ - } - ], - "plugins": [ -+ { -+ "name": "Cache", -+ "class": "Bartlett\\Reflect\\Plugin\\CachePlugin", -+ "options": { -+ "adapter": "DoctrineCacheAdapter", -+ "backend": { -+ "class": "Doctrine\\Common\\Cache\\FilesystemCache", -+ "args": [ -+ "%{HOME}/.cache/php-reflect" -+ ] -+ } -+ } -+ } - ], - "analysers" : [ - ], -diff -up ./bin/phpcompatinfo.rpm ./bin/phpcompatinfo ---- ./bin/phpcompatinfo.rpm 2015-07-11 10:04:30.000000000 +0200 -+++ ./bin/phpcompatinfo 2015-07-13 09:06:15.114698099 +0200 -@@ -1,23 +1,12 @@ - #!/usr/bin/env php - setUseIncludePath(true); - - if (\Phar::running()) { - if ($home) { -@@ -35,18 +24,10 @@ if (PHP_SAPI !== 'cli') { - return; - } - --if (\Phar::running()) { -- try { -- Bartlett\CompatInfo\Environment::checkRequirements(); -- } catch (\RuntimeException $e) { -- die ($e->getMessage()); -- } --} -- - use Bartlett\Reflect\Environment; - use Bartlett\CompatInfo\Console\Application; - - Environment::setScanDir(); - --$application = new Application($appName, '4.4'); -+$application = new Application($appName, '@package_version@'); - $application->run(); -diff -up ./data/handleDB.php.rpm ./data/handleDB.php ---- ./data/handleDB.php.rpm 2015-07-11 10:04:30.000000000 +0200 -+++ ./data/handleDB.php 2015-07-13 09:06:15.108698079 +0200 -@@ -11,7 +11,8 @@ - * @since Release 4.0.0alpha3 - */ - --require_once dirname(__DIR__) . '/vendor/autoload.php'; -+require_once __DIR__ . '/../src/Bartlett/CompatInfo/autoload.php'; -+ - require_once __DIR__ . '/ReferenceCollection.php'; - - use Bartlett\CompatInfo\Reference\ExtensionFactory; -diff -up ./src/Bartlett/CompatInfo/Environment.php.rpm ./src/Bartlett/CompatInfo/Environment.php ---- ./src/Bartlett/CompatInfo/Environment.php.rpm 2015-07-13 09:10:10.271476463 +0200 -+++ ./src/Bartlett/CompatInfo/Environment.php 2015-07-13 09:10:52.422615982 +0200 -@@ -36,6 +36,12 @@ class Environment - */ - public static function initRefDb() - { -+ if (($database = getenv('BARTLETT_COMPATINFO_DB')) && file_exists($database)) { -+ return new \PDO('sqlite:' . $database); -+ } else if (file_exists($database = '/usr/share/php-bartlett-PHP-CompatInfo/compatinfo.sqlite')) { -+ return new \PDO('sqlite:' . $database); -+ } -+ - $database = 'compatinfo.sqlite'; - $tempDir = sys_get_temp_dir() . '/bartlett'; - -diff -up ./tests/bootstrap.php.rpm ./tests/bootstrap.php ---- ./tests/bootstrap.php.rpm 2015-07-11 10:04:30.000000000 +0200 -+++ ./tests/bootstrap.php 2015-07-13 09:06:15.108698079 +0200 -@@ -1,8 +1,11 @@ - addPrefix('Bartlett\\Tests\\CompatInfo', $baseDir . '/tests'); - -+putenv('BARTLETT_COMPATINFO_DB='.dirname(__DIR__).'/data/compatinfo.sqlite'); -+# Class not catched by autoloader - require __DIR__ . '/Reference/GenericTest.php'; diff --git a/php-bartlett-PHP-CompatInfo-4.5.0-rpm.patch b/php-bartlett-PHP-CompatInfo-4.5.0-rpm.patch new file mode 100644 index 0000000..60280df --- /dev/null +++ b/php-bartlett-PHP-CompatInfo-4.5.0-rpm.patch @@ -0,0 +1,120 @@ +diff -up ./bin/phpcompatinfo.json.dist.rpm ./bin/phpcompatinfo.json.dist +--- ./bin/phpcompatinfo.json.dist.rpm 2015-07-11 10:04:30.000000000 +0200 ++++ ./bin/phpcompatinfo.json.dist 2015-07-13 09:06:15.108698079 +0200 +@@ -6,6 +6,19 @@ + } + ], + "plugins": [ ++ { ++ "name": "Cache", ++ "class": "Bartlett\\Reflect\\Plugin\\CachePlugin", ++ "options": { ++ "adapter": "DoctrineCacheAdapter", ++ "backend": { ++ "class": "Doctrine\\Common\\Cache\\FilesystemCache", ++ "args": [ ++ "%{HOME}/.cache/php-reflect" ++ ] ++ } ++ } ++ } + ], + "analysers" : [ + ], +diff -up ./bin/phpcompatinfo.rpm ./bin/phpcompatinfo +--- ./bin/phpcompatinfo.rpm 2015-07-11 10:04:30.000000000 +0200 ++++ ./bin/phpcompatinfo 2015-07-13 09:06:15.114698099 +0200 +@@ -1,23 +1,12 @@ + #!/usr/bin/env php + setUseIncludePath(true); + + if (\Phar::running()) { + if ($home) { +@@ -35,18 +24,10 @@ if (PHP_SAPI !== 'cli') { + return; + } + +-if (\Phar::running()) { +- try { +- Bartlett\CompatInfo\Environment::checkRequirements(); +- } catch (\RuntimeException $e) { +- die ($e->getMessage()); +- } +-} +- + use Bartlett\Reflect\Environment; + use Bartlett\CompatInfo\Console\Application; + + Environment::setScanDir(); + +-$application = new Application($appName, '4.5'); ++$application = new Application($appName, '@package_version@'); + $application->run(); +diff -up ./data/handleDB.php.rpm ./data/handleDB.php +--- ./data/handleDB.php.rpm 2015-07-11 10:04:30.000000000 +0200 ++++ ./data/handleDB.php 2015-07-13 09:06:15.108698079 +0200 +@@ -11,7 +11,8 @@ + * @since Release 4.0.0alpha3 + */ + +-require_once dirname(__DIR__) . '/vendor/autoload.php'; ++require_once __DIR__ . '/../src/Bartlett/CompatInfo/autoload.php'; ++ + require_once __DIR__ . '/ReferenceCollection.php'; + + use Bartlett\CompatInfo\Reference\ExtensionFactory; +diff -up ./src/Bartlett/CompatInfo/Environment.php.rpm ./src/Bartlett/CompatInfo/Environment.php +--- ./src/Bartlett/CompatInfo/Environment.php.rpm 2015-07-13 09:10:10.271476463 +0200 ++++ ./src/Bartlett/CompatInfo/Environment.php 2015-07-13 09:10:52.422615982 +0200 +@@ -36,6 +36,12 @@ class Environment + */ + public static function initRefDb() + { ++ if (($database = getenv('BARTLETT_COMPATINFO_DB')) && file_exists($database)) { ++ return new \PDO('sqlite:' . $database); ++ } else if (file_exists($database = '/usr/share/php-bartlett-PHP-CompatInfo/compatinfo.sqlite')) { ++ return new \PDO('sqlite:' . $database); ++ } ++ + $database = 'compatinfo.sqlite'; + $tempDir = sys_get_temp_dir() . '/bartlett'; + +diff -up ./tests/bootstrap.php.rpm ./tests/bootstrap.php +--- ./tests/bootstrap.php.rpm 2015-07-11 10:04:30.000000000 +0200 ++++ ./tests/bootstrap.php 2015-07-13 09:06:15.108698079 +0200 +@@ -1,8 +1,11 @@ + addPrefix('Bartlett\\Tests\\CompatInfo', $baseDir . '/tests'); + ++putenv('BARTLETT_COMPATINFO_DB='.dirname(__DIR__).'/data/compatinfo.sqlite'); ++# Class not catched by autoloader + require __DIR__ . '/Reference/GenericTest.php'; diff --git a/php-bartlett-PHP-CompatInfo.spec b/php-bartlett-PHP-CompatInfo.spec index e1c143d..d9f6949 100644 --- a/php-bartlett-PHP-CompatInfo.spec +++ b/php-bartlett-PHP-CompatInfo.spec @@ -7,17 +7,17 @@ # Please, preserve the changelog entries # %{!?php_version: %global php_version %(php -r 'echo PHP_VERSION;' 2>/dev/null)} -%global gh_commit 03c8d2f50e8f3f5472d8f01da153b1cf1fb66932 +%global gh_commit 31d781af6cf6113db85da8838bf25eb73e7b093e %global gh_short %(c=%{gh_commit}; echo ${c:0:7}) -%global gh_date 20150930 +#global gh_date 20151005 %global gh_owner llaville %global gh_project php-compat-info #global prever RC2 %global with_tests %{?_without_tests:0}%{!?_without_tests:1} Name: php-bartlett-PHP-CompatInfo -Version: 4.4.0 -%global specrel 3 +Version: 4.5.0 +%global specrel 1 Release: %{?gh_date:0.%{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 @@ -32,10 +32,8 @@ Source1: fedora-review-check # Autoloader for RPM - die composer ! Source2: %{name}-autoload.php -Source3: Pthreads3.methods.json - # Autoload and sqlite database path -Patch0: %{name}-4.4.0-rpm.patch +Patch0: %{name}-4.5.0-rpm.patch BuildArch: noarch BuildRequires: php(language) >= 5.3.2 @@ -120,8 +118,6 @@ sed -e 's/@package_version@/%{version}%{?prever}/' \ %build -cp %{SOURCE3} data/references/ - : Generate the references database %{_bindir}/php -d date.timezone=Europe/Paris data/handleDB.php db:init @@ -143,13 +139,10 @@ install -D -p -m 755 %{SOURCE1} %{buildroot}%{_datadir}/%{name} # drop some test because of RC version rm tests/Reference/Extension/AmqpExtensionTest.php rm tests/Reference/Extension/SphinxExtensionTest.php + %if 0%{?fedora} < 21 && 0%{?rhel} < 7 -#rm tests/Reference/Extension/CurlExtensionTest.php -#rm tests/Reference/Extension/LibxmlExtensionTest.php -%endif -%if "%{php_version}" < "5.5" -# https://github.com/llaville/php-compat-info/issues/206 -rm tests/Reference/Extension/IntlExtensionTest.php +rm tests/Reference/Extension/CurlExtensionTest.php +rm tests/Reference/Extension/LibxmlExtensionTest.php %endif %{_bindir}/phpunit \ @@ -177,6 +170,9 @@ fi %changelog +* Tue Oct 6 2015 Remi Collet - 4.5.0-1 +- update to 4.5.0 + * Sat Oct 3 2015 Remi Collet - 4.4.0-3 - test build of master -- cgit