diff options
Diffstat (limited to 'php-bartlett-PHP-CompatInfo-5.3.0-rpm.patch')
-rw-r--r-- | php-bartlett-PHP-CompatInfo-5.3.0-rpm.patch | 50 |
1 files changed, 34 insertions, 16 deletions
diff --git a/php-bartlett-PHP-CompatInfo-5.3.0-rpm.patch b/php-bartlett-PHP-CompatInfo-5.3.0-rpm.patch index 74e4a1c..e460999 100644 --- a/php-bartlett-PHP-CompatInfo-5.3.0-rpm.patch +++ b/php-bartlett-PHP-CompatInfo-5.3.0-rpm.patch @@ -1,6 +1,6 @@ diff -up ./bin/phpcompatinfo.json.dist.rpm ./bin/phpcompatinfo.json.dist ---- ./bin/phpcompatinfo.json.dist.rpm 2020-07-06 10:54:23.000000000 +0200 -+++ ./bin/phpcompatinfo.json.dist 2020-07-06 15:17:00.620618627 +0200 +--- ./bin/phpcompatinfo.json.dist.rpm 2020-07-07 10:49:03.000000000 +0200 ++++ ./bin/phpcompatinfo.json.dist 2020-07-07 15:10:25.330090185 +0200 @@ -6,6 +6,19 @@ } ], @@ -22,41 +22,59 @@ diff -up ./bin/phpcompatinfo.json.dist.rpm ./bin/phpcompatinfo.json.dist "analysers" : [ ], diff -up ./bin/phpcompatinfo.rpm ./bin/phpcompatinfo ---- ./bin/phpcompatinfo.rpm 2020-07-06 15:17:00.620618627 +0200 -+++ ./bin/phpcompatinfo 2020-07-06 15:20:53.977038529 +0200 +--- ./bin/phpcompatinfo.rpm 2020-07-07 10:49:03.000000000 +0200 ++++ ./bin/phpcompatinfo 2020-07-07 15:10:25.330090185 +0200 @@ -1,23 +1,13 @@ #!/usr/bin/env php <?php - $appName = 'phpCompatInfo'; + $appName = 'phpcompatinfo'; +$vendorDir = '/usr/share/php'; -if (\Phar::running()) { -- $vendorDir = 'phar://' . strtolower($appName) . '.phar/vendor'; +- $vendorDir = 'phar://' . $appName . '.phar/vendor'; -} else { - $baseDir = dirname(__DIR__); - $vendorDir = $baseDir . '/vendor'; -- ++require_once $vendorDir . '/Bartlett/CompatInfo/autoload.php'; + - if (!file_exists($vendorDir . '/autoload.php')) { - $vendorDir = dirname(dirname($baseDir)); - } - - if (!getenv("BARTLETTRC")) { -- putenv("BARTLETTRC=" . strtolower($appName) . '.json'); +- putenv("BARTLETTRC=" . $appName . '.json'); - } -+require_once $vendorDir . '/Bartlett/CompatInfo/autoload.php'; -+ +if (!getenv("BARTLETTRC")) { -+ putenv("BARTLETTRC=" . strtolower($appName) . '.json'); ++ putenv("BARTLETTRC=" . $appName . '.json'); } -$loader = require_once $vendorDir . '/autoload.php'; -$loader->setUseIncludePath(true); if (PHP_SAPI !== 'cli') { return; -@@ -28,5 +18,5 @@ use Bartlett\CompatInfo\Console\Applicat +diff -up ./src/Bartlett/CompatInfo/Console/Application.php.rpm ./src/Bartlett/CompatInfo/Console/Application.php +--- ./src/Bartlett/CompatInfo/Console/Application.php.rpm 2020-07-07 10:49:03.000000000 +0200 ++++ ./src/Bartlett/CompatInfo/Console/Application.php 2020-07-07 15:10:37.214047839 +0200 +@@ -16,8 +16,6 @@ namespace Bartlett\CompatInfo\Console; + use Bartlett\CompatInfo\Util\Database; + use Bartlett\Reflect\Console\Application as BaseApplication; + +-use Jean85\PrettyVersions; +- + use OutOfBoundsException; + + /** +@@ -48,12 +46,7 @@ class Application extends BaseApplicatio - Environment::setScanDir(); + public function __construct() + { +- try { +- $version = PrettyVersions::getVersion('bartlett/php-compatinfo')->getPrettyVersion(); +- } catch (OutOfBoundsException $e) { +- $version = self::VERSION; +- } +- parent::__construct(self::NAME, $version); ++ parent::__construct(self::NAME, self::VERSION); + } --$application = new Application($appName, '5.2.3'); -+$application = new Application($appName, '@package_version@'); - $application->run(); + /** |