8000 non-existent service "router.request_context" in v2.5.0 · Issue #163 · symfony/swiftmailer-bundle · GitHub
[go: up one dir, main page]

Skip to content
This repository was archived by the owner on Feb 6, 2022. It is now read-only.

non-existent service "router.request_context" in v2.5.0 #163

Closed
quantumpacket opened this issue Mar 2, 2017 · 4 comments
Closed

non-existent service "router.request_context" in v2.5.0 #163

quantumpacket opened this issue Mar 2, 2017 · 4 comments

Comments

@quantumpacket
Copy link
quantumpacket commented Mar 2, 2017

I have a basic CLI app and just updated this bundle to 2.5.x and now I am getting the following error message presumably from this commit 183b291. This seems similar to this issue. I don't need a router in my CLI app so I have removed it from my config, but switmailer-bundle is depending on it.

[Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException]
The service "swiftmailer.mailer.default.transport.dynamic" has a dependency
on a non-existent service "router.request_context".

@fabpot
Copy link
Member
fabpot commented Mar 2, 2017

ping @HeahDude

@stof
Copy link
Member
stof commented Mar 2, 2017

we should add on-invalid=null for the reference, as the request_context is used only for the SMTP configurator, and it is optional there.

However, this issue should be triggered only when using a dynamic configuration for the transport, which is weird if you just updated the bundle (as such config was forbidden with the previous version). Otherwise, it means that the new code is buggy and always uses dynamic mode.

@HeahDude
Copy link
Contributor
HeahDude commented Mar 2, 2017

Should I mention that @stof is right? See #166.

@HeahDude
Copy link
Contributor
HeahDude commented Mar 2, 2017

@stof about

Otherwise, it means that the new code is buggy and always uses dynamic mode.

This is conditioned by https://github.com/symfony/swiftmailer-bundle/pull/161/files#diff-5d7bc2844ac399afc20f4d92a4897c2cR75, should be safe right?

fabpot added a commit that referenced this issue Mar 2, 2017
This PR was merged into the 2.5-dev branch.

Discussion
----------

Fixed smtp usage without request context

Closes #163.

Commits
-------

90a381a Fixed smtp usage without request context
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants
0