summaryrefslogtreecommitdiffstats
path: root/php-bartlett-PHP-CompatInfo-5.4.0-rpm.patch
diff options
context:
space:
mode:
Diffstat (limited to 'php-bartlett-PHP-CompatInfo-5.4.0-rpm.patch')
-rw-r--r--php-bartlett-PHP-CompatInfo-5.4.0-rpm.patch55
1 files changed, 55 insertions, 0 deletions
diff --git a/php-bartlett-PHP-CompatInfo-5.4.0-rpm.patch b/php-bartlett-PHP-CompatInfo-5.4.0-rpm.patch
new file mode 100644
index 0000000..6626bdf
--- /dev/null
+++ b/php-bartlett-PHP-CompatInfo-5.4.0-rpm.patch
@@ -0,0 +1,55 @@
+diff -up ./bin/phpcompatinfo.rpm ./bin/phpcompatinfo
+--- ./bin/phpcompatinfo.rpm 2020-10-01 11:23:52.000000000 +0200
++++ ./bin/phpcompatinfo 2020-10-02 12:29:00.346660651 +0200
+@@ -5,22 +5,13 @@ if (PHP_SAPI !== 'cli') {
+ return;
+ }
+
+-if (\Phar::running()) {
+- $vendorDir = 'phar://phpcompatinfo.phar/vendor';
+-} else {
+- $baseDir = dirname(__DIR__);
+- $vendorDir = $baseDir . '/vendor';
+-
+- if (!file_exists($vendorDir . '/autoload.php')) {
+- $vendorDir = dirname(dirname($baseDir));
+- }
+-}
++$vendorDir = '/usr/share/php/Bartlett/CompatInfo';
+ require_once $vendorDir . '/autoload.php';
+
+ use Bartlett\CompatInfo\Console\ApplicationInterface;
+
+ /** @var \Symfony\Component\DependencyInjection\ContainerBuilder $container */
+-$container = require dirname(__DIR__) . '/config/container.php';
++$container = require $vendorDir . '/config/container.php';
+
+ $app = $container->get(ApplicationInterface::class);
+ $app->setContainer($container);
+diff -up ./src/Bartlett/CompatInfo/Console/Application.php.rpm ./src/Bartlett/CompatInfo/Console/Application.php
+--- ./src/Bartlett/CompatInfo/Console/Application.php.rpm 2020-10-02 12:05:49.767768616 +0200
++++ ./src/Bartlett/CompatInfo/Console/Application.php 2020-10-02 12:10:02.129841590 +0200
+@@ -30,8 +30,6 @@ use Symfony\Component\DependencyInjectio
+ use Symfony\Component\EventDispatcher\EventDispatcher;
+ use Symfony\Component\EventDispatcher\EventDispatcherInterface ;
+
+-use PackageVersions\Versions;
+-
+ use function substr_count;
+
+ /**
+@@ -77,14 +75,6 @@ class Application extends BaseApplicatio
+ $version = self::VERSION;
+ } elseif (substr_count($version, '.') === 2) {
+ // release is in X.Y.Z format
+- } else {
+- // composer or git strategy
+- $version = Versions::getVersion('bartlett/php-compatinfo');
+- list($ver, ) = explode('@', $version);
+-
+- if (strpos($ver, 'dev') === false) {
+- $version = $ver;
+- }
+ }
+ parent::__construct(self::NAME, $version);
+