mirror of
https://github.com/rectorphp/rector.git
synced 2025-01-18 05:48:21 +01:00
50 lines
1.8 KiB
PHP
50 lines
1.8 KiB
PHP
<?php declare(strict_types=1);
|
|
|
|
require_once __DIR__ . '/vendor/autoload.php';
|
|
|
|
use Isolated\Symfony\Component\Finder\Finder;
|
|
|
|
return [
|
|
'prefix' => 'RectorPrefixed',
|
|
'finders' => [
|
|
Finder::create()
|
|
->files()
|
|
->ignoreVCS(true)
|
|
// ↓ this is regex!
|
|
->notName('#LICENSE|.*\\.md|.*\\.dist|Makefile|composer\\.json|composer\\.lock|.*\\.sh#')
|
|
->in(__DIR__ .'/bin')
|
|
->in(__DIR__ .'/config')
|
|
->in(__DIR__ .'/packages')
|
|
->in(__DIR__ .'/src')
|
|
->in(__DIR__ .'/vendor')
|
|
->exclude([
|
|
'docs',
|
|
'Tests',
|
|
'tests',
|
|
'Test',
|
|
'test',
|
|
'humbug/php-scoper',
|
|
'tracy/tracy',
|
|
])
|
|
,
|
|
// to make "composer dump" work
|
|
Finder::create()->append([
|
|
'composer.json',
|
|
// Fixes non-standard php-cs-fixer tests in /src
|
|
__DIR__ . '/vendor/friendsofphp/php-cs-fixer/tests/TestCase.php',
|
|
// Files dependencies in prod vendor
|
|
__DIR__ . '/vendor/humbug/php-scoper/src/functions.php',
|
|
__DIR__ . '/vendor/tracy/tracy/src/shortcuts.php',
|
|
// dependency for "composer dump"
|
|
__DIR__ . '/vendor/composer/installed.json'
|
|
]),
|
|
// 'whitelist' - be careful, this adds aliases to end of each whitelisted class
|
|
|
|
// Fixes non-standard php-cs-fixer tests in /src:
|
|
// "Could not scan for classes inside "/var/www/rector/build/vendor/friendsofphp/php-cs-fixer/tests/Test/AbstractFixerTestCase.php" which does not appear to be a file nor a folder"
|
|
Finder::create()
|
|
->files()
|
|
->in(__DIR__ . '/vendor/friendsofphp/php-cs-fixer/tests/Test')
|
|
],
|
|
];
|