소스 검색

symfony messenger upgrade

Vincent 2 년 전
부모
커밋
93954d36fa
2개의 변경된 파일18개의 추가작업 그리고 8개의 파일을 삭제
  1. 4 1
      .env
  2. 14 7
      config/packages/messenger.yaml

+ 4 - 1
.env

@@ -51,7 +51,10 @@ WKHTMLTOIMAGE_PATH=/usr/local/bin/wkhtmltoimage
 ###< knplabs/knp-snappy-bundle ###
 
 ###> symfony/messenger ###
-MESSENGER_TRANSPORT_DSN=doctrine://default
+# Choose one of the transports below
+# MESSENGER_TRANSPORT_DSN=amqp://guest:guest@localhost:5672/%2f/messages
+# MESSENGER_TRANSPORT_DSN=redis://localhost:6379/messages
+MESSENGER_TRANSPORT_DSN=doctrine://default?auto_setup=0
 ###< symfony/messenger ###
 
 ###> AdminAssos configuration ###

+ 14 - 7
config/packages/messenger.yaml

@@ -1,15 +1,13 @@
 framework:
     messenger:
         # Uncomment this (and the failed transport below) to send failed messages to this transport for later handling.
-        failure_transport: failed
-
-        reset_on_message: true
+        # failure_transport: failed
 
         transports:
             # https://symfony.com/doc/current/messenger.html#transport-configuration
-            async: '%env(MESSENGER_TRANSPORT_DSN)%'
-            failed: '%env(MESSENGER_TRANSPORT_DSN)%?queue_name=failed'
-            sync: 'sync://'
+            # async: '%env(MESSENGER_TRANSPORT_DSN)%'
+            # failed: 'doctrine://default?queue_name=failed'
+            # sync: 'sync://'
 
         routing:
             # Route your messages to the transports
@@ -18,4 +16,13 @@ framework:
             'App\Message\Command\Export': async
             'App\Message\Command\Typo3\Typo3UpdateCommand': async
             'App\Message\Command\Typo3\Typo3DeleteCommand': async
-            'App\Message\Command\Typo3\Typo3UndeleteCommand': async
+            'App\Message\Command\Typo3\Typo3UndeleteCommand': async
+
+
+# when@test:
+#    framework:
+#        messenger:
+#            transports:
+#                # replace with your transport name here (e.g., my_transport: 'in-memory://')
+#                # For more Messenger testing tools, see https://github.com/zenstruck/messenger-test
+#                async: 'in-memory://'