summaryrefslogtreecommitdiffstats
path: root/php-bartlett-PHP-Reflect-4.4.0-rpm.patch
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2020-07-06 15:26:53 +0200
committerRemi Collet <remi@remirepo.net>2020-07-06 15:26:53 +0200
commit175725fc3ff0510060e4658fb601e91097bba9c1 (patch)
tree31b3fe07ed4d0c89672157d08d068ae9546a39dc /php-bartlett-PHP-Reflect-4.4.0-rpm.patch
parent89eee77a5ca75e7fe6063213061e431260731e74 (diff)
test build for upcoming 4.4.0
raise dependency on PHP 7.1.3 raise dependency on sebastian/version 2.0 raise dependency on nikic/php-parser 4.5 raise dependency on phpdocumentor/reflection-docblock 4.3 raise dependency on justinrainbow/json-schema 5.2 raise dependency on seld/jsonlint 1.4 add dependency on phpdocumentor/type-resolver 0.4 raise dependency on Symfony 4.4 and allow 5 switch to phpunit8
Diffstat (limited to 'php-bartlett-PHP-Reflect-4.4.0-rpm.patch')
-rw-r--r--php-bartlett-PHP-Reflect-4.4.0-rpm.patch98
1 files changed, 98 insertions, 0 deletions
diff --git a/php-bartlett-PHP-Reflect-4.4.0-rpm.patch b/php-bartlett-PHP-Reflect-4.4.0-rpm.patch
new file mode 100644
index 0000000..313cfad
--- /dev/null
+++ b/php-bartlett-PHP-Reflect-4.4.0-rpm.patch
@@ -0,0 +1,98 @@
+diff -up ./bin/phpreflect.json.dist.rpm ./bin/phpreflect.json.dist
+--- ./bin/phpreflect.json.dist.rpm 2018-11-25 10:01:50.000000000 +0100
++++ ./bin/phpreflect.json.dist 2018-11-26 11:37:03.281529780 +0100
+@@ -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/phpreflect.rpm ./bin/phpreflect
+--- ./bin/phpreflect.rpm 2018-11-25 10:01:50.000000000 +0100
++++ ./bin/phpreflect 2018-11-26 11:37:12.715581845 +0100
+@@ -2,22 +2,16 @@
+ <?php
+ $appName = 'phpReflect';
+
+-if (\Phar::running()) {
+- $vendorDir = 'phar://' . strtolower($appName) . '.phar/vendor';
+-} else {
+- $baseDir = dirname(__DIR__);
+- $vendorDir = $baseDir . '/vendor';
+-
+- if (!file_exists($vendorDir . '/autoload.php')) {
+- $vendorDir = dirname(dirname($baseDir));
+- }
+-
+- if (!getenv("BARTLETTRC")) {
+- putenv("BARTLETTRC=" . strtolower($appName) . '.json');
+- }
++$vendorDir = '/usr/share/php';
++if (is_file('/usr/share/php-bartlett-PHP-CompatInfo/compatinfo.sqlite')) {
++ putenv('BARTLETT_COMPATINFO_DB=/usr/share/php-bartlett-PHP-CompatInfo/compatinfo.sqlite');
+ }
+-$loader = require_once $vendorDir . '/autoload.php';
+-$loader->setUseIncludePath(true);
++if (!getenv("BARTLETTRC")) {
++ putenv("BARTLETTRC=" . strtolower($appName) . '.json');
++}
++
++require_once $vendorDir . '/Bartlett/Reflect/autoload.php';
++
+
+ if (PHP_SAPI !== 'cli') {
+ return;
+@@ -28,5 +22,5 @@ use Bartlett\Reflect\Console\Application
+
+ Environment::setScanDir();
+
+-$application = new Application($appName, '4.4');
++$application = new Application($appName, '@package_version@');
+ $application->run();
+diff -up ./tests/bootstrap.php.rpm ./tests/bootstrap.php
+--- ./tests/bootstrap.php.rpm 2018-11-25 10:01:50.000000000 +0100
++++ ./tests/bootstrap.php 2018-11-26 11:37:03.281529780 +0100
+@@ -1,11 +1,10 @@
+ <?php
+
+ $baseDir = dirname(__DIR__);
+-$vendorDir = $baseDir . '/vendor';
++$vendorDir = '/usr/share/php';
+
+-$loader = require_once $vendorDir . '/autoload.php';
+-$loader->addClassMap(
+- array(
++require_once 'Bartlett/Reflect/autoload.php';
++$tab = array(
+ 'Bartlett\Tests\Reflect\Analyser\FooAnalyser'
+ => __DIR__ . '/Analyser/FooAnalyser.php',
+ 'Bartlett\Tests\Reflect\Analyser\BarAnalyser'
+@@ -14,5 +13,13 @@ $loader->addClassMap(
+ => __DIR__ . '/Model/GenericModelTest.php',
+ 'Bartlett\Tests\Reflect\Environment\YourLogger'
+ => __DIR__ . '/Environment/YourLogger.php',
+- )
+ );
++
++\Fedora\Autoloader\Autoload::addClassMap($tab, '/');
++\Fedora\Autoloader\Autoload::addPsr4('Bartlett\\Tests\\Reflect', $baseDir . '/tests');
++
++// Needed when installed for 'Bartlett\CompatInfo\Analyser\CompatibilityAnalyser'
++if (is_file('/usr/share/php-bartlett-PHP-CompatInfo/compatinfo.sqlite')) {
++ putenv("BARTLETT_COMPATINFO_DB=/usr/share/php-bartlett-PHP-CompatInfo/compatinfo.sqlite");
++}
++