Skip to content

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

Merged
merged 2 commits into from
May 16, 2017
Merged

Rework more controllers #7893

merged 2 commits into from
May 16, 2017

Conversation

GuilhemN
Copy link
Contributor

No description provided.

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
Copy link
Member

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ok, updated 👍

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
Copy link
Member

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?

Copy link
Contributor Author

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?

Copy link
Member

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?

@GuilhemN GuilhemN force-pushed the DI33 branch 2 times, most recently from a76eb45 to 689c723 Compare May 13, 2017 17:56
@GuilhemN
Copy link
Contributor Author

I reworked the autowiring article to focus on fqcn aliases.

@weaverryan
Copy link
Member

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!

@weaverryan weaverryan merged commit 3b75147 into symfony:master May 16, 2017
weaverryan added a commit that referenced this pull request May 16, 2017
This PR was squashed before being merged into the master branch (closes #7893).

Discussion
----------

Rework more controllers

Commits
-------

3b75147 update
1f6edd4 Rework more controllers
@GuilhemN GuilhemN deleted the DI33 branch May 16, 2017 15:11
AppBundle\Rot13Transformer: ~

# the ``AppBundle\Rot13Transformer`` service will be injected when
# a ``AppBundle\TransformerInterface`` type-hint is detected
Copy link
Member

Choose a reason for hiding this comment

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

an

Copy link
Contributor Author

Choose a reason for hiding this comment

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

see #7914

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.

4 participants