Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[FrameworkBundle] debug:autowiring: don't list FQCN when they are aliased #25290

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 1 commit into from
Dec 8, 2017

Conversation

nicolas-grekas
Copy link
Member

Q A
Branch? master
Bug fix? no
New feature? yes
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets -
License MIT
Doc PR -

In order to favor type-hinting for interfaces, I propose to not list the class as explicitly autowireable when an alias exists for it.

Which means displaying only

  App\FooInterface                                              
      alias to App\Foo                                          

instead of

  App\Foo                                                       
  App\FooInterface                                              
      alias to App\Foo                                          

ping @weaverryan

@nicolas-grekas nicolas-grekas added this to the 4.1 milestone Dec 3, 2017
@nicolas-grekas nicolas-grekas changed the title [FrameworkBundle] debug:autowiring: don't list aliases classes when they are aliased [FrameworkBundle] debug:autowiring: don't list FQCN when they are aliased Dec 3, 2017
Copy link
Member

@weaverryan weaverryan left a comment

Choose a reason for hiding this comment

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

Hmmm, ok. If I’m correct, in practice, this would only affect end-user services if the user is using their own interfaces. So yes, why not clean things up and point them in the right direction.

@fabpot
Copy link
Member

fabpot commented Dec 8, 2017

Thank you @nicolas-grekas.

@fabpot fabpot merged commit 8cbfa1e into symfony:master Dec 8, 2017
fabpot added a commit that referenced this pull request Dec 8, 2017
…en they are aliased (nicolas-grekas)

This PR was merged into the 4.1-dev branch.

Discussion
----------

[FrameworkBundle] debug:autowiring: don't list FQCN when they are aliased

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | -
| License       | MIT
| Doc PR        | -

In order to favor type-hinting for interfaces, I propose to not list the class as explicitly autowireable when an alias exists for it.

Which means displaying only
```
  App\FooInterface
      alias to App\Foo
```

instead of
```
  App\Foo
  App\FooInterface
      alias to App\Foo
```

ping @weaverryan

Commits
-------

8cbfa1e [FrameworkBundle] debug:autowiring: don't list FQCN when they are aliased
@nicolas-grekas nicolas-grekas deleted the debug-autow-cmd branch December 8, 2017 12:43
@fabpot fabpot mentioned this pull request May 7, 2018
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.

7 participants