Skip to content

[DI] Cleanup remainings from autoregistration #26634

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
Mar 22, 2018

Conversation

nicolas-grekas
Copy link
Member

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

@nicolas-grekas nicolas-grekas added this to the 4.0 milestone Mar 22, 2018
@nicolas-grekas nicolas-grekas changed the title [DI] Cleanup remaings from autoregistration [DI] Cleanup remainings from autoregistration Mar 22, 2018
{
$this->lastFailure = null;
$type = $reference->getType();

if ($type !== (string) $reference || ($this->container->has($type) && !$this->container->findDefinition($type)->isAbstract())) {
return $reference;
}

if (!$reference->canBeAutoregistered()) {
Copy link
Member

Choose a reason for hiding this comment

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

is canBeAutoregistered still used anywhere ? AFAICT, this PR removes the only usages of the method. We should probably deprecate it.

Copy link
Member Author

Choose a reason for hiding this comment

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

We should probably deprecate it.

Yes, we can now in 4.1

@nicolas-grekas nicolas-grekas merged commit 74afff8 into symfony:4.0 Mar 22, 2018
nicolas-grekas added a commit that referenced this pull request Mar 22, 2018
…kas)

This PR was merged into the 4.0 branch.

Discussion
----------

[DI] Cleanup remainings from autoregistration

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

Commits
-------

74afff8 [DI] Cleanup remainings from autoregistration
nicolas-grekas added a commit that referenced this pull request Mar 22, 2018
…nd getRequiringClass() (nicolas-grekas)

This PR was merged into the 4.1-dev branch.

Discussion
----------

[DI] deprecate TypedReference::canBeAutoregistered() and getRequiringClass()

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

~Needs #26634~

Commits
-------

95fd81b [DI] deprecate TypedReference::canBeAutoregistered() and getRequiringClass()
@nicolas-grekas nicolas-grekas deleted the di-no-autoregister branch March 22, 2018 14:58
@fabpot fabpot mentioned this pull request Apr 3, 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.

3 participants