8000 [FrameworkBundle] Trigger deprecations on stderr instead of using tri… · symfony/symfony@663eb29 · GitHub
[go: up one dir, main page]

Skip to content

Commit 663eb29

Browse files
welcoMatticfabpot
authored andcommitted
[FrameworkBundle] Trigger deprecations on stderr instead of using trigger_deprecation call
1 parent 1b8aa3c commit 663eb29

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/Symfony/Bundle/FrameworkBundle/Command/TranslationUpdateCommand.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -140,11 +140,11 @@ protected function execute(InputInterface $input, OutputInterface $output): int
140140
$xliffVersion = $input->getOption('xliff-version') ?? '1.2';
141141

142142
if ($input->getOption('xliff-version')) {
143-
trigger_deprecation('symfony/framework-bundle', '5.3', 'The "--xliff-version" option is deprecated, use "--format=xlf%d" instead.', 10 * $xliffVersion);
143+
$errorIo->warning(sprintf('The "--xliff-version" option is deprecated since version 5.3, use "--format=xlf%d" instead.', 10 * $xliffVersion));
144144
}
145145

146146
if ($input->getOption('output-format')) {
147-
trigger_deprecation('symfony/framework-bundle', '5.3', 'The "--output-format" option is deprecated, use "--format=xlf%d" instead.', 10 * $xliffVersion);
147+
$errorIo->warning(sprintf('The "--output-format" option is deprecated since version 5.3, use "--format=xlf%d" instead.', 10 * $xliffVersion));
148148
}
149149

150150
switch ($format) {

src/Symfony/Component/Messenger/Command/AbstractFailedMessagesCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ protected function printPendingMessagesMessage(ReceiverInterface $receiver, Symf
183183
protected function getReceiver(/* string $name = null */): ReceiverInterface
184184
{
185185
if (1 > \func_num_args() && __CLASS__ !== static::class && __CLASS__ !== (new \ReflectionMethod($this, __FUNCTION__))->getDeclaringClass()->getName() && !$this instanceof \PHPUnit\Framework\MockObject\MockObject && !$this instanceof \Prophecy\Prophecy\ProphecySubjectInterface && !$this instanceof \Mockery\MockInterface) {
186-
trigger_error_deprecation('symfony/messenger', '5.3', 'The "%s()" method will have a new "string $name" argument in version 6.0, not defining it is deprecated.', __METHOD__);
186+
trigger_deprecation('symfony/messenger', '5.3', 'The "%s()" method will have a new "string $name" argument in version 6.0, not defining it is deprecated.', __METHOD__);
187187
}
188188
$name = \func_num_args() > 0 ? func_get_arg(0) : null;
189189

0 commit comments

Comments
 (0)
0