Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[Messenger] Deprecate StopWorkerOnSignalsListener #50997

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
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
5 changes: 5 additions & 0 deletions UPGRADE-6.4.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,11 @@ HttpKernel
* `BundleInterface` no longer extends `ContainerAwareInterface`
* Add native return types to `TraceableEventDispatcher` and to `MergeExtensionConfigurationPass`

Messenger
---------

* Deprecate `StopWorkerOnSignalsListener` in favor of using the `SignalableCommandInterface`

MonologBridge
-------------

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,7 @@
->tag('monolog.logger', ['channel' => 'messenger'])

->set('messenger.listener.stop_worker_signals_listener', StopWorkerOnSignalsListener::class)
->deprecate('6.4', 'symfony/messenger', 'The "%service_id%" service is deprecated, use the "Symfony\Component\Console\Command\SignalableCommandInterface" instead.')
->args([
null,
service('logger')->ignoreOnInvalid(),
Expand All @@ -210,7 +211,7 @@
->tag('monolog.logger', ['channel' => 'messenger'])

->alias('messenger.listener.stop_worker_on_sigterm_signal_listener', 'messenger.listener.stop_worker_signals_listener')
->deprecate('6.3', 'symfony/messenger', 'The "%alias_id%" service is deprecated, use "messenger.listener.stop_worker_signals_listener" instead.')
->deprecate('6.3', 'symfony/messenger', 'The "%alias_id%" service is deprecated, use the "Symfony\Component\Console\Command\SignalableCommandInterface" instead.')

->set('messenger.listener.stop_worker_on_stop_exception_listener', StopWorkerOnCustomStopExceptionListener::class)
->tag('kernel.event_subscriber')
Expand Down
5 changes: 5 additions & 0 deletions src/Symfony/Component/Messenger/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
CHANGELOG
=========

6.4
---

* Deprecate `StopWorkerOnSignalsListener` in favor of using the `SignalableCommandInterface`

6.3
---

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,15 @@
namespace Symfony\Component\Messenger\EventListener;

use Psr\Log\LoggerInterface;
use Symfony\Component\Console\Command\SignalableCommandInterface;
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
use Symfony\Component\Messenger\Event\WorkerStartedEvent;

/**
* @author Tobias Schultze <http://tobion.de>
* @author Grégoire Pineau <[email protected]>
*
* @deprecated since Symfony 6.4, use the {@see SignalableCommandInterface} instead
*/
class StopWorkerOnSignalsListener implements EventSubscriberInterface
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,15 @@

namespace Symfony\Component\Messenger\EventListener;

trigger_deprecation('symfony/messenger', '6.3', '"%s" is deprecated, use "%s" instead.', StopWorkerOnSigtermSignalListener::class, StopWorkerOnSignalsListener::class);

use Psr\Log\LoggerInterface;
use Symfony\Component\Console\Command\SignalableCommandInterface;

trigger_deprecation('symfony/messenger', '6.3', '"%s" is deprecated, use the "%s" instead.', StopWorkerOnSigtermSignalListener::class, SignalableCommandInterface::class);

/**
* @author Tobias Schultze <http://tobion.de>
*
* @deprecated since Symfony 6.3, use the StopWorkerOnSignalsListener instead
* @deprecated since Symfony 6.3, use the {@see SignalableCommandInterface} instead
*/
class StopWorkerOnSigtermSignalListener extends StopWorkerOnSignalsListener
{
Expand Down