mirror of
https://github.com/rectorphp/rector.git
synced 2025-01-20 06:38:46 +01:00
misc (#4036)
This commit is contained in:
parent
60aa571c71
commit
3220d3d93a
@ -7,11 +7,8 @@ use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigura
|
||||
|
||||
return static function (ContainerConfigurator $containerConfigurator): void {
|
||||
$containerConfigurator->import(__DIR__ . '/../packages/**/config/config.*');
|
||||
|
||||
$containerConfigurator->import(__DIR__ . '/../rules/**/config/config.*');
|
||||
|
||||
$containerConfigurator->import(__DIR__ . '/services.php');
|
||||
|
||||
$containerConfigurator->import(__DIR__ . '/../utils/**/config/config.php', null, true);
|
||||
|
||||
$parameters = $containerConfigurator->parameters();
|
||||
@ -19,24 +16,18 @@ return static function (ContainerConfigurator $containerConfigurator): void {
|
||||
$parameters->set(Option::PATHS, []);
|
||||
|
||||
$parameters->set(Option::FILE_EXTENSIONS, ['php']);
|
||||
|
||||
$parameters->set(Option::EXCLUDE_PATHS, []);
|
||||
|
||||
$parameters->set(Option::EXCLUDE_RECTORS, []);
|
||||
|
||||
$parameters->set(Option::AUTOLOAD_PATHS, []);
|
||||
|
||||
$parameters->set(Option::PROJECT_TYPE, 'proprietary');
|
||||
|
||||
$parameters->set(Option::NESTED_CHAIN_METHOD_CALL_LIMIT, 30);
|
||||
|
||||
$parameters->set(Option::AUTO_IMPORT_NAMES, false);
|
||||
|
||||
$parameters->set(Option::IMPORT_SHORT_CLASSES, true);
|
||||
|
||||
$parameters->set(Option::IMPORT_DOC_BLOCKS, true);
|
||||
|
||||
$parameters->set(Option::PHP_VERSION_FEATURES, null);
|
||||
|
||||
$parameters->set('safe_types', false);
|
||||
$parameters->set(Option::PROJECT_TYPE, Option::PROJECT_TYPE_PROPRIETARY);
|
||||
$parameters->set(Option::NESTED_CHAIN_METHOD_CALL_LIMIT, 30);
|
||||
$parameters->set(Option::SAFE_TYPES, false);
|
||||
};
|
||||
|
@ -26,7 +26,6 @@ return static function (ContainerConfigurator $containerConfigurator): void {
|
||||
PropertyToMethodRector::PROPERTIES_TO_METHOD_CALLS => inline_value_objects([
|
||||
// source: https://book.cakephp.org/3.0/en/appendices/3-4-migration-guide.html
|
||||
new PropertyToMethodCall('Cake\Network\Request', 'params', 'getAttribute', null, ['params']),
|
||||
|
||||
new PropertyToMethodCall('Cake\Network\Request', 'data', 'getData'),
|
||||
new PropertyToMethodCall('Cake\Network\Request', 'query', 'getQueryParams'),
|
||||
new PropertyToMethodCall('Cake\Network\Request', 'cookies', 'getCookie'),
|
||||
@ -240,14 +239,11 @@ return static function (ContainerConfigurator $containerConfigurator): void {
|
||||
]]);
|
||||
|
||||
$services->set(RenameClassRector::class)
|
||||
->call(
|
||||
'configure',
|
||||
[[
|
||||
RenameClassRector::OLD_TO_NEW_CLASSES => [
|
||||
'Cake\Database\Schema\Table' => 'Cake\Database\Schema\TableSchema',
|
||||
],
|
||||
]]
|
||||
);
|
||||
->call('configure', [[
|
||||
RenameClassRector::OLD_TO_NEW_CLASSES => [
|
||||
'Cake\Database\Schema\Table' => 'Cake\Database\Schema\TableSchema',
|
||||
],
|
||||
]]);
|
||||
|
||||
$services->set(NormalToFluentRector::class)
|
||||
->call('configure', [[
|
||||
|
@ -96,6 +96,11 @@ final class Option
|
||||
*/
|
||||
public const PROJECT_TYPE_OPEN_SOURCE = 'open-source';
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
public const PROJECT_TYPE_PROPRIETARY = 'proprietary';
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
|
Loading…
x
Reference in New Issue
Block a user