-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Cleanup solution and add note about why this hack has been introduced
- Loading branch information
1 parent
17b15ff
commit 65c94ea
Showing
5 changed files
with
29 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<?php | ||
declare(strict_types=1); | ||
|
||
namespace ErickSkrauch\PhpCsFixer\Fixer; | ||
|
||
use PhpCsFixer\AbstractFixer; | ||
|
||
// PHP-CS-Fixer 3.59.3 has changed implementation of the AbstractFixer by removing method `configure` from it | ||
// and introducing a separate trait \PhpCsFixer\Fixer\ConfigurableFixerTrait with this method inside. | ||
// To mitigate these changes and maintain compatibility with older versions of PHP-CS-Fixer, this solution was created. | ||
// | ||
// Commit: https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/commit/064efa1f#diff-e1fb45756cd1d53b6d67072d8a026692c07af55617018229b0bf4ab6c22e3e53L105 | ||
// See https://github.com/erickskrauch/php-cs-fixer-custom-fixers/issues/12 | ||
if (method_exists(AbstractFixer::class, 'configure')) { | ||
trait ConfigurableFixerTrait { | ||
|
||
} | ||
} else { | ||
trait ConfigurableFixerTrait { | ||
use \PhpCsFixer\Fixer\ConfigurableFixerTrait; | ||
|
||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.