Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions packages/Config/RectorConfig.php
Original file line number Diff line number Diff line change
Expand Up @@ -296,6 +296,25 @@ public function indent(string $character, int $count): void
SimpleParameterProvider::setParameter(Option::INDENT_SIZE, $count);
}

/**
* @api deprecated, just for BC layer warning
*/
public function services(): void
{
trigger_error(
'The services() method is deprecated. Use $rectorConfig->singleton(ServiceType::class) instead',
E_USER_ERROR
);
}

/**
* @api deprecated, just for BC layer warning
*/
public function defaults(): void
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

defaults() method is only can be called if services() has return value and called as fluent, so this should not needed since services() got trigger_error() already.

{
trigger_error('The defaults() method is deprecated. You can remove it.', E_USER_ERROR);
}

private function isRuleNoLongerExists(mixed $skipRule): bool
{
return // only validate string
Expand Down