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
|
diff -up ./php-cs-fixer.rpm ./php-cs-fixer
--- ./php-cs-fixer.rpm 2019-11-04 09:02:13.808580217 +0100
+++ ./php-cs-fixer 2019-11-04 09:03:24.388258652 +0100
@@ -43,38 +43,7 @@ set_error_handler(function ($severity, $
}
});
-$require = true;
-if (class_exists('Phar')) {
- // Maybe this file is used as phar-stub? Let's try!
- 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!
- $possibleFiles = [__DIR__.'/../../autoload.php', __DIR__.'/../autoload.php', __DIR__.'/vendor/autoload.php'];
- $file = null;
- foreach ($possibleFiles as $possibleFile) {
- if (file_exists($possibleFile)) {
- $file = $possibleFile;
-
- break;
- }
- }
-
- if (null === $file) {
- throw new RuntimeException('Unable to locate autoload.php file.');
- }
-
- require_once $file;
-
- unset($possibleFiles, $possibleFile, $file);
-}
-unset($require);
+require_once '/usr/share/php/PhpCsFixer/autoload.php';
use Composer\XdebugHandler\XdebugHandler;
use PhpCsFixer\Console\Application;
diff -up ./src/Console/Command/HelpCommand.php.rpm ./src/Console/Command/HelpCommand.php
--- ./src/Console/Command/HelpCommand.php.rpm 2019-11-04 09:01:59.000000000 +0100
+++ ./src/Console/Command/HelpCommand.php 2019-11-04 09:02:13.808580217 +0100
@@ -377,6 +377,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 2019-11-04 09:01:59.000000000 +0100
+++ ./tests/AutoReview/ProjectCodeTest.php 2019-11-04 09:02:13.808580217 +0100
@@ -473,8 +473,11 @@ final class ProjectCodeTest extends Test
->files()
->name('*.php')
->in(__DIR__.'/../../src')
+ ->notName('autoload.php')
->exclude([
'Resources',
+ 'diff',
+ 'tests',
])
;
|