From 4b5b5874f72907c5567dc9a0c2b9f39585ebb81a Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Mon, 13 Jul 2015 09:31:40 +0200 Subject: php-bartlett-PHP-CompatInfo: 4.4.0 --- php-bartlett-PHP-CompatInfo-4.4.0-rpm.patch | 120 ++++++++++++++++++++++++++++ 1 file changed, 120 insertions(+) create mode 100644 php-bartlett-PHP-CompatInfo-4.4.0-rpm.patch (limited to 'php-bartlett-PHP-CompatInfo-4.4.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 new file mode 100644 index 0000000..dd91593 --- /dev/null +++ b/php-bartlett-PHP-CompatInfo-4.4.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.3'); ++$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'; -- cgit