mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-25 11:38:44 +02:00
N°6934 - Symfony 6.4 - upgrade Symfony bundles to 6.4 (#580)
* Update Symfony lib to version ~6.4.0 * Update code missing return type * Add an iTop general configuration entry to store application secret (Symfony mandatory parameter) * Use dependency injection in ExceptionListener & UserProvider classes
This commit is contained in:
@@ -16,6 +16,7 @@ use Symfony\Bundle\FrameworkBundle\Command\AssetsInstallCommand;
|
||||
use Symfony\Bundle\FrameworkBundle\Command\CacheClearCommand;
|
||||
use Symfony\Bundle\FrameworkBundle\Command\CachePoolClearCommand;
|
||||
use Symfony\Bundle\FrameworkBundle\Command\CachePoolDeleteCommand;
|
||||
use Symfony\Bundle\FrameworkBundle\Command\CachePoolInvalidateTagsCommand;
|
||||
use Symfony\Bundle\FrameworkBundle\Command\CachePoolListCommand;
|
||||
use Symfony\Bundle\FrameworkBundle\Command\CachePoolPruneCommand;
|
||||
use Symfony\Bundle\FrameworkBundle\Command\CacheWarmupCommand;
|
||||
@@ -37,16 +38,21 @@ use Symfony\Bundle\FrameworkBundle\Command\TranslationDebugCommand;
|
||||
use Symfony\Bundle\FrameworkBundle\Command\TranslationUpdateCommand;
|
||||
use Symfony\Bundle\FrameworkBundle\Command\WorkflowDumpCommand;
|
||||
use Symfony\Bundle\FrameworkBundle\Command\YamlLintCommand;
|
||||
use Symfony\Bundle\FrameworkBundle\Console\Application;
|
||||
use Symfony\Bundle\FrameworkBundle\EventListener\SuggestMissingPackageSubscriber;
|
||||
use Symfony\Component\Console\EventListener\ErrorListener;
|
||||
use Symfony\Component\Console\Messenger\RunCommandMessageHandler;
|
||||
use Symfony\Component\Dotenv\Command\DebugCommand as DotenvDebugCommand;
|
||||
use Symfony\Component\Messenger\Command\ConsumeMessagesCommand;
|
||||
use Symfony\Component\Messenger\Command\DebugCommand;
|
||||
use Symfony\Component\Messenger\Command\DebugCommand as MessengerDebugCommand;
|
||||
use Symfony\Component\Messenger\Command\FailedMessagesRemoveCommand;
|
||||
use Symfony\Component\Messenger\Command\FailedMessagesRetryCommand;
|
||||
use Symfony\Component\Messenger\Command\FailedMessagesShowCommand;
|
||||
use Symfony\Component\Messenger\Command\SetupTransportsCommand;
|
||||
use Symfony\Component\Messenger\Command\StatsCommand;
|
||||
use Symfony\Component\Messenger\Command\StopWorkersCommand;
|
||||
use Symfony\Component\Scheduler\Command\DebugCommand as SchedulerDebugCommand;
|
||||
use Symfony\Component\Serializer\Command\DebugCommand as SerializerDebugCommand;
|
||||
use Symfony\Component\Translation\Command\TranslationPullCommand;
|
||||
use Symfony\Component\Translation\Command\TranslationPushCommand;
|
||||
use Symfony\Component\Translation\Command\XliffLintCommand;
|
||||
@@ -93,6 +99,12 @@ return static function (ContainerConfigurator $container) {
|
||||
])
|
||||
->tag('console.command')
|
||||
|
||||
->set('console.command.cache_pool_invalidate_tags', CachePoolInvalidateTagsCommand::class)
|
||||
->args([
|
||||
tagged_locator('cache.taggable', 'pool'),
|
||||
])
|
||||
->tag('console.command')
|
||||
|
||||
->set('console.command.cache_pool_delete', CachePoolDeleteCommand::class)
|
||||
->args([
|
||||
service('cache.global_clearer'),
|
||||
@@ -152,6 +164,8 @@ return static function (ContainerConfigurator $container) {
|
||||
[], // Receiver names
|
||||
service('messenger.listener.reset_services')->nullOnInvalid(),
|
||||
[], // Bus names
|
||||
service('messenger.rate_limiter_locator')->nullOnInvalid(),
|
||||
null,
|
||||
])
|
||||
->tag('console.command')
|
||||
->tag('monolog.logger', ['channel' => 'messenger'])
|
||||
@@ -163,7 +177,7 @@ return static function (ContainerConfigurator $container) {
|
||||
])
|
||||
->tag('console.command')
|
||||
|
||||
->set('console.command.messenger_debug', DebugCommand::class)
|
||||
->set('console.command.messenger_debug', MessengerDebugCommand::class)
|
||||
->args([
|
||||
[], // Message to handlers mapping
|
||||
])
|
||||
@@ -181,14 +195,18 @@ return static function (ContainerConfigurator $container) {
|
||||
abstract_arg('Receivers'),
|
||||
service('messenger.routable_message_bus'),
|
||||
service('event_dispatcher'),
|
||||
service('logger'),
|
||||
service('logger')->nullOnInvalid(),
|
||||
service('messenger.transport.native_php_serializer')->nullOnInvalid(),
|
||||
null,
|
||||
])
|
||||
->tag('console.command')
|
||||
->tag('monolog.logger', ['channel' => 'messenger'])
|
||||
|
||||
->set('console.command.messenger_failed_messages_show', FailedMessagesShowCommand::class)
|
||||
->args([
|
||||
abstract_arg('Default failure receiver name'),
|
||||
abstract_arg('Receivers'),
|
||||
service('messenger.transport.native_php_serializer')->nullOnInvalid(),
|
||||
])
|
||||
->tag('console.command')
|
||||
|
||||
@@ -196,6 +214,20 @@ return static function (ContainerConfigurator $container) {
|
||||
->args([
|
||||
abstract_arg('Default failure receiver name'),
|
||||
abstract_arg('Receivers'),
|
||||
service('messenger.transport.native_php_serializer')->nullOnInvalid(),
|
||||
])
|
||||
->tag('console.command')
|
||||
|
||||
->set('console.command.messenger_stats', StatsCommand::class)
|
||||
->args([
|
||||
service('messenger.receiver_locator'),
|
||||
abstract_arg('Receivers names'),
|
||||
])
|
||||
->tag('console.command')
|
||||
|
||||
->set('console.command.scheduler_debug', SchedulerDebugCommand::class)
|
||||
->args([
|
||||
tagged_locator('scheduler.schedule_provider', 'name'),
|
||||
])
|
||||
->tag('console.command')
|
||||
|
||||
@@ -213,6 +245,12 @@ return static function (ContainerConfigurator $container) {
|
||||
])
|
||||
->tag('console.command')
|
||||
|
||||
->set('console.command.serializer_debug', SerializerDebugCommand::class)
|
||||
->args([
|
||||
service('serializer.mapping.class_metadata_factory'),
|
||||
])
|
||||
->tag('console.command')
|
||||
|
||||
->set('console.command.translation_debug', TranslationDebugCommand::class)
|
||||
->args([
|
||||
service('translator'),
|
||||
@@ -267,6 +305,9 @@ return static function (ContainerConfigurator $container) {
|
||||
->tag('console.command', ['command' => 'translation:push'])
|
||||
|
||||
->set('console.command.workflow_dump', WorkflowDumpCommand::class)
|
||||
->args([
|
||||
tagged_locator('workflow', 'name'),
|
||||
])
|
||||
->tag('console.command')
|
||||
|
||||
->set('console.command.xliff_lint', XliffLintCommand::class)
|
||||
@@ -327,5 +368,18 @@ return static function (ContainerConfigurator $container) {
|
||||
service('secrets.local_vault')->ignoreOnInvalid(),
|
||||
])
|
||||
->tag('console.command')
|
||||
|
||||
->set('console.messenger.application', Application::class)
|
||||
->share(false)
|
||||
->call('setAutoExit', [false])
|
||||
->args([
|
||||
service('kernel'),
|
||||
])
|
||||
|
||||
->set('console.messenger.execute_command_handler', RunCommandMessageHandler::class)
|
||||
->args([
|
||||
service('console.messenger.application'),
|
||||
])
|
||||
->tag('messenger.message_handler')
|
||||
;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user