This commit is contained in:
Tomas Votruba 2020-08-27 11:06:47 +02:00 committed by GitHub
parent 60aa571c71
commit 3220d3d93a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 13 additions and 21 deletions

View File

@ -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);
};

View File

@ -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', [[

View File

@ -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
*/