-
-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Rework more controllers #7893
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
Rework more controllers #7893
Conversation
service_container/autowiring.rst
Outdated
the ``TransformerInterface`` and injects it automatically. Even when using | ||
interfaces (and you should), building the service graph and refactoring the project | ||
is easier than with standard definitions. | ||
The autowiring subsystem detects that the ``Rot13Transformer::class`` service |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using the class
constant here reads confusing. I would use the FQCN instead.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok, updated 👍
service_container/autowiring.rst
Outdated
interfaces (and you should), building the service graph and refactoring the project | ||
is easier than with standard definitions. | ||
The autowiring subsystem detects that the ``Rot13Transformer::class`` service | ||
implements the ``TransformerInterface`` and injects it automatically. Even when |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't we miss the alias for the AppBundle\TransformerInterface
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Autowiring using types still works but is deprecated (TransformerInterface
is detected on Rot13Transformer
), do you mind if we reword this more deeply this later in another PR? Or maybe I can simply add a note that it is deprecated?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We already have the alias a bit further down. Can we maybe just reorder the sections here?
a76eb45
to
689c723
Compare
I reworked the autowiring article to focus on fqcn aliases. |
Thanks @GuilhemN! I had not gotten to these articles yet, so it's perfect! I will review the autowire article a bit further... because it's really important... but Idefinitely wanted to start by merging your changes :). Cheers! |
AppBundle\Rot13Transformer: ~ | ||
|
||
# the ``AppBundle\Rot13Transformer`` service will be injected when | ||
# a ``AppBundle\TransformerInterface`` type-hint is detected |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
an
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
see #7914
No description provided.