Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

[Scheduler] Compilerpass wrongly assumes every messenger receiver has an alias  #53811

Copy link
Copy link
Closed
@zluiten

Description

@zluiten
Issue body actions

Symfony version(s) affected

7.0.3

Description

The AddScheduleMessengerPass.php#L38-L40 wrongly assumes every service tagged with "messenger.receiver" has an alias, but the alias is technically optional: MessengerPass.php#L266.

How to reproduce

Add a messenger receiver to your application and just tag it without specifying an alias:

App\Receiver\MyReceiver:
  class: App\Receiver\MyReceiver
  tags: [ { name: 'messenger.receiver' } ]

Then add the symfony/scheduler package to your project. The compiling of the container will fail with

In AddScheduleMessengerPass.php line 39:

  [ErrorException]
  Warning: Undefined array key "alias"

Possible Solution

No response

Additional Context

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.