summaryrefslogtreecommitdiffstats
path: root/php-cs-fixer-autoload.patch
diff options
context:
space:
mode:
Diffstat (limited to 'php-cs-fixer-autoload.patch')
-rw-r--r--php-cs-fixer-autoload.patch33
1 files changed, 20 insertions, 13 deletions
diff --git a/php-cs-fixer-autoload.patch b/php-cs-fixer-autoload.patch
index 9ccd7e3..262a233 100644
--- a/php-cs-fixer-autoload.patch
+++ b/php-cs-fixer-autoload.patch
@@ -1,15 +1,21 @@
diff -up ./php-cs-fixer.rpm ./php-cs-fixer
---- ./php-cs-fixer.rpm 2017-10-02 16:04:28.744937463 +0200
-+++ ./php-cs-fixer 2017-10-02 16:04:55.577092013 +0200
-@@ -39,18 +39,7 @@ set_error_handler(function ($severity, $
+--- ./php-cs-fixer.rpm 2018-03-21 07:08:49.801165194 +0100
++++ ./php-cs-fixer 2018-03-21 07:09:08.527252780 +0100
+@@ -39,25 +39,7 @@ set_error_handler(function ($severity, $
}
});
--try {
+-$require = true;
+-if (class_exists('Phar')) {
- // Maybe this file is used as phar-stub? Let's try!
-- Phar::mapPhar('php-cs-fixer.phar');
-- require_once 'phar://php-cs-fixer.phar/vendor/autoload.php';
--} catch (PharException $e) {
+- try {
+- Phar::mapPhar('php-cs-fixer.phar');
+- require_once 'phar://php-cs-fixer.phar/vendor/autoload.php';
+- $require = false;
+- } catch (PharException $e) {
+- }
+-}
+-if ($require) {
- // OK, it's not, let give Composer autoloader a try!
- if (file_exists($a = __DIR__.'/../../autoload.php')) {
- require_once $a;
@@ -17,14 +23,15 @@ diff -up ./php-cs-fixer.rpm ./php-cs-fixer
- require_once __DIR__.'/vendor/autoload.php';
- }
-}
+-unset($require);
+require_once '/usr/share/php/PhpCsFixer/autoload.php';
use PhpCsFixer\Console\Application;
diff -up ./src/Console/Command/HelpCommand.php.rpm ./src/Console/Command/HelpCommand.php
---- ./src/Console/Command/HelpCommand.php.rpm 2017-10-02 16:03:56.000000000 +0200
-+++ ./src/Console/Command/HelpCommand.php 2017-10-02 16:04:28.744937463 +0200
-@@ -345,6 +345,8 @@ EOF
+--- ./src/Console/Command/HelpCommand.php.rpm 2018-03-21 07:06:08.000000000 +0100
++++ ./src/Console/Command/HelpCommand.php 2018-03-21 07:08:49.801165194 +0100
+@@ -368,6 +368,8 @@ EOF
{
static $version = null;
@@ -34,9 +41,9 @@ diff -up ./src/Console/Command/HelpCommand.php.rpm ./src/Console/Command/HelpCom
return $version;
}
diff -up ./tests/AutoReview/ProjectCodeTest.php.rpm ./tests/AutoReview/ProjectCodeTest.php
---- ./tests/AutoReview/ProjectCodeTest.php.rpm 2017-10-02 16:03:56.000000000 +0200
-+++ ./tests/AutoReview/ProjectCodeTest.php 2017-10-02 16:04:28.745937469 +0200
-@@ -383,8 +383,11 @@ final class ProjectCodeTest extends Test
+--- ./tests/AutoReview/ProjectCodeTest.php.rpm 2018-03-21 07:06:08.000000000 +0100
++++ ./tests/AutoReview/ProjectCodeTest.php 2018-03-21 07:08:49.801165194 +0100
+@@ -433,8 +433,11 @@ final class ProjectCodeTest extends Test
->files()
->name('*.php')
->in(__DIR__.'/../../src')