summaryrefslogtreecommitdiffstats
path: root/php-bartlett-PHP-CompatInfo-5.3.0-rpm.patch
blob: e460999cfcdc2db30fd771ec7b030e503ba5570b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
diff -up ./bin/phpcompatinfo.json.dist.rpm ./bin/phpcompatinfo.json.dist
--- ./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 @@
         }
     ],
     "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	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';
+$vendorDir = '/usr/share/php';
 
-if (\Phar::running()) {
-    $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=" . $appName . '.json');
-    }
+if (!getenv("BARTLETTRC")) {
+    putenv("BARTLETTRC=" . $appName . '.json');
 }
-$loader = require_once $vendorDir . '/autoload.php';
-$loader->setUseIncludePath(true);
 
 if (PHP_SAPI !== 'cli') {
     return;
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
 
     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);
     }
 
     /**