Skip to content

[DependencyInjection][HttpKernel] document Autowire attribute #16629

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

Merged
merged 2 commits into from
May 1, 2022

Conversation

kbond
Copy link
Member

@kbond kbond commented Mar 18, 2022

@kbond
Copy link
Member Author

kbond commented Mar 18, 2022

I believe the "Code Blocks" action will be fixed with #16627.

controller.rst Outdated
// ...

/**
* @Route("/lucky/number/{max}")
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe something to do in another PR, but why don't we use the attribute style? Especially with this feature from Symfony 6.1

Copy link
Member Author

Choose a reason for hiding this comment

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

Agree, was just following the method from the other examples in this file. Probably a separate PR is best.

Verified

This commit was signed with the committer’s verified signature.
kbond Kevin Bond
@kbond kbond force-pushed the autowire-attribute branch from ba58c0d to f32aec1 Compare April 21, 2022 12:35
@wouterj wouterj merged commit f5785b2 into symfony:6.1 May 1, 2022
@kbond kbond deleted the autowire-attribute branch May 1, 2022 14:58
@wouterj
Copy link
Member

wouterj commented May 1, 2022

Thank you @kbond. Pretty cool feature, and with great docs :)

I've moved things around, to not duplicate too much. To be honest, the service container articles need some rewriting in general, so the place is not ideal at the moment, but I think having it in the autowiring article makes most sense.

javiereguiluz added a commit that referenced this pull request May 4, 2022
…kbond)

This PR was squashed before being merged into the 6.1 branch.

Discussion
----------

[DependencyInjection] adjust `Autowire` attribute docs

Follow up to #16629 per slack discussion.

For services and expressions, explicitly use the named argument.

Commits
-------

fd05739 [DependencyInjection] adjust `Autowire` attribute docs
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.

None yet

4 participants