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.patch81
1 files changed, 11 insertions, 70 deletions
diff --git a/php-cs-fixer-autoload.patch b/php-cs-fixer-autoload.patch
index e24ef55..983d89a 100644
--- a/php-cs-fixer-autoload.patch
+++ b/php-cs-fixer-autoload.patch
@@ -1,71 +1,12 @@
diff -up ./php-cs-fixer.rpm ./php-cs-fixer
---- ./php-cs-fixer.rpm 2020-12-08 10:29:13.190515695 +0100
-+++ ./php-cs-fixer 2020-12-08 10:30:26.191258296 +0100
-@@ -52,39 +52,7 @@ set_error_handler(static function ($seve
- }
- });
-
--$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 2020-12-08 07:57:58.000000000 +0100
-+++ ./src/Console/Command/HelpCommand.php 2020-12-08 10:29:13.190515695 +0100
-@@ -374,6 +374,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 2020-12-08 07:57:59.000000000 +0100
-+++ ./tests/AutoReview/ProjectCodeTest.php 2020-12-08 10:29:13.190515695 +0100
-@@ -690,8 +690,11 @@ final class ProjectCodeTest extends Test
- ->files()
- ->name('*.php')
- ->in(__DIR__.'/../../src')
-+ ->notName('autoload.php')
- ->exclude([
- 'Resources',
-+ 'diff',
-+ 'tests',
- ])
- ;
-
+--- ./php-cs-fixer.rpm 2022-01-14 15:01:36.281743286 +0100
++++ ./php-cs-fixer 2022-01-14 15:01:59.983646138 +0100
+@@ -85,7 +85,7 @@ set_error_handler(static function ($seve
+
+ if ($require) {
+ // OK, it's not, let give Composer autoloader a try!
+- $possibleFiles = [__DIR__.'/../../autoload.php', __DIR__.'/../autoload.php', __DIR__.'/vendor/autoload.php'];
++ $possibleFiles = ['/usr/share/php-cs-fixer/vendor/autoload.php'];
+ $file = null;
+ foreach ($possibleFiles as $possibleFile) {
+ if (file_exists($possibleFile)) {