Symfony 我的SuluSyliusConsumerBundle配置有什么问题?
我有一个Sulu和一个Sylius应用程序,我正在尝试使用SuluSyliusBundle和RabbitMQ集成它们。我已经添加了以下配置 亚马尔信使Symfony 我的SuluSyliusConsumerBundle配置有什么问题?,symfony,rabbitmq,sylius,sulu,symfony-messenger,Symfony,Rabbitmq,Sylius,Sulu,Symfony Messenger,我有一个Sulu和一个Sylius应用程序,我正在尝试使用SuluSyliusBundle和RabbitMQ集成它们。我已经添加了以下配置 亚马尔信使 framework: router: resource: "%kernel.project_dir%/config/routing_%sulu.context%.yml" messenger: # Uncomment this (and the failed transport below) to send f
framework:
router:
resource: "%kernel.project_dir%/config/routing_%sulu.context%.yml"
messenger:
# Uncomment this (and the failed transport below) to send failed messages to this transport for later handling.
# failure_transport: failed
buses:
message_bus:
middleware:
- doctrine_transaction
- event_middleware
# Uncomment this (and the failed transport below) to send failed messages to this transport for later handling.
# failure_transport: failed
transports:
# https://symfony.com/doc/current/messenger.html#transport-configuration
# async: '%env(MESSENGER_TRANSPORT_DSN)%'
# failed: 'doctrine://default?queue_name=failed'
# sync: 'sync://'
routing:
# Route your messages to the transports
# 'App\Message\YourMessage': async
sulu_sylius_consumer.yaml
sylius_base_url: 'http://127.0.0.1:8001'
sylius_default_channel: 'default_channel'
sylius_oauth_config:
username: api
password: api
client_id: demo_client
client_secret: secret_demo_client
route_defaults_fallback:
view: 'templates/products/default'
firewall_provider_key: 'main'
问题是,一旦我安装了bundle并添加了这两个配置,就会出现以下错误
我相信这是由messenger中的配置引起的。我已将路由添加到routes_admin.yaml,如文档中所示:
地址:yaml
app_events:
type: rest
resource: App\Controller\Admin\EventController
prefix: /admin/api
name_prefix: app.
options:
expose: true
app_event_registrations:
type: rest
resource: App\Controller\Admin\EventRegistrationController
prefix: /admin/api
name_prefix: app.
options:
expose: true
app_locations:
type: rest
resource: App\Controller\Admin\LocationController
prefix: /admin/api
name_prefix: app.
options:
expose: true
app_products:
type: rest
resource: App\Controller\Admin\ProductsController
prefix: /admin/api
name_prefix: app.
options:
expose: true
sulu_route:
mappings:
Sulu\Bundle\SyliusConsumerBundle\Model\RoutableResource\RoutableResource:
generator: schema
resource_key: product_content
options:
route_schema: "/products/{object.getCode()}"
routes_网站.yaml
app.event:
path: /{_locale}/event/{id}
controller: App\Controller\Website\EventWebsiteController::indexAction
app.product:
path: /{_locale}/product/{id}
controller: App\Controller\Website\ProductWebsiteController::indexAction
我可以做什么来修复此错误?
[编辑:添加了routes\u admin和routes\u website yaml]我已尝试在干净的sulu安装中安装捆绑包,但无法重现错误。你能发布你的路由的内容吗?你在那里添加了什么吗?我只添加了Sulu车间的练习,以及我自己的产品实体+它的管理员控制器。这可能是因为我正在继续从车间?我也会在一个新的Sulu安装中尝试这一点。看起来这只是messenger配置中的一个错误。谢谢