Skip to content

Conversation

OskarStark
Copy link
Contributor

@@ -58,6 +58,9 @@ argument of type ``service_closure``:
App\Service\MyService:
arguments: [!service_closure '@mailer']

# In case the dependency is optional
# arguments: [!service_closure '@?mailer']
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure if this works actually

Copy link
Contributor

@alamirault alamirault May 10, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I checked and it's ok, if mailer service doesn't exist, null is pass instead

@OskarStark
Copy link
Contributor Author

@nicolas-grekas can you confirm?

@OskarStark OskarStark merged commit 7597ea3 into symfony:5.4 May 11, 2023
@OskarStark OskarStark deleted the comment branch December 7, 2024 11:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants