Skip to content

The service "messenger.middleware.deduplicate_middleware" has a dependency on a non-existent service "lock.factory" #60329

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

Open
lyrixx opened this issue May 2, 2025 · 0 comments · May be fixed by #60330

Comments

@lyrixx
Copy link
Member

lyrixx commented May 2, 2025

Symfony version(s) affected

7.3.0

Description

I just updated my application, cleared the cache, and now when the kernel boot, I got the following error:

I have no name! /app/server/backend bin/console 

In CheckExceptionOnInvalidReferenceBehaviorPass.php line 116:
                                                                                                                                                                                           
  The service "messenger.middleware.deduplicate_middleware" has a dependency on a non-existent service "lock.factory". Did you mean one of these: "ulid.factory", "uuid.factory", "form.factory"?                                                                                                                                                                                 

The very strange thing, is we don't use the messenger.middleware.deduplicate_middleware messenger middleware

edit: see

if ($lockEnabled && class_exists(DeduplicateMiddleware::class) && class_exists(LockFactory::class)) {
$defaultMiddleware['before'][] = ['id' => 'deduplicate_middleware'];
} else {
$container->removeDefinition('messenger.middleware.deduplicate_middleware');
}

=> IMHO, this middleware should be optin! But it's another story

How to reproduce

I guess it occurs with a fresh symfony + mesenger + lock + all lock have a name different from default

Possible Solution

#60330

Additional Context

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants