summaryrefslogtreecommitdiffstats
path: root/php-cs-fixer-autoload.patch
blob: 221f1ad188d133d352ff9289c83dd60faf44a326 (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
diff -up ./php-cs-fixer.rpm ./php-cs-fixer
--- ./php-cs-fixer.rpm	2017-10-02 15:47:01.068895386 +0200
+++ ./php-cs-fixer	2017-10-02 15:48:29.217404013 +0200
@@ -41,18 +41,7 @@ set_error_handler(function ($severity, $
     }
 });
 
-try {
-    // 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) {
-    // OK, it's not, let give Composer autoloader a try!
-    if (file_exists($a = __DIR__.'/../../autoload.php')) {
-        require_once $a;
-    } else {
-        require_once __DIR__.'/vendor/autoload.php';
-    }
-}
+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 15:46:28.000000000 +0200
+++ ./src/Console/Command/HelpCommand.php	2017-10-02 15:47:01.069895391 +0200
@@ -344,6 +344,8 @@ EOF
     {
         static $version = null;
 
+        return Application::VERSION;
+
         if (null !== $version) {
             return $version;
         }
diff -up ./tests/AutoReview/ProjectCodeTest.php.rpm ./tests/AutoReview/ProjectCodeTest.php
--- ./tests/AutoReview/ProjectCodeTest.php.rpm	2017-10-02 15:46:28.000000000 +0200
+++ ./tests/AutoReview/ProjectCodeTest.php	2017-10-02 15:47:01.069895391 +0200
@@ -379,8 +379,10 @@ final class ProjectCodeTest extends Test
             ->files()
             ->name('*.php')
             ->in(__DIR__.'/../../src')
+            ->notName('autoload.php')
             ->exclude(array(
                 'Resources',
+                'tests',
             ))
         ;