mirror of
https://github.com/rectorphp/rector.git
synced 2025-01-19 14:27:14 +01:00
[Symfony 5.2] Change Param type declaration for Chat/Email/Sms NotificationInterface (#5420)
This commit is contained in:
parent
3784552b70
commit
760facb75b
@ -154,4 +154,29 @@ return static function (ContainerConfigurator $containerConfigurator): void {
|
||||
),
|
||||
]),
|
||||
]]);
|
||||
|
||||
# https://github.com/symfony/symfony/blob/5.x/UPGRADE-5.2.md#notifier
|
||||
$services->set(AddParamTypeDeclarationRector::class)
|
||||
->call('configure', [[
|
||||
AddParamTypeDeclarationRector::PARAMETER_TYPEHINTS => ValueObjectInliner::inline([
|
||||
new AddParamTypeDeclaration(
|
||||
'Symfony\Component\Notifier\Notification\ChatNotificationInterface',
|
||||
'asChatMessage',
|
||||
0,
|
||||
new ObjectType('Symfony\Component\Notifier\Recipient\RecipientInterface'),
|
||||
),
|
||||
new AddParamTypeDeclaration(
|
||||
'Symfony\Component\Notifier\Notification\EmailNotificationInterface',
|
||||
'asEmailMessage',
|
||||
0,
|
||||
new ObjectType('Symfony\Component\Notifier\Recipient\EmailRecipientInterface'),
|
||||
),
|
||||
new AddParamTypeDeclaration(
|
||||
'Symfony\Component\Notifier\Notification\SmsNotificationInterface',
|
||||
'asSmsMessage',
|
||||
0,
|
||||
new ObjectType('Symfony\Component\Notifier\Recipient\SmsRecipientInterface'),
|
||||
),
|
||||
]),
|
||||
]]);
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user