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

Skip to content

[DependencyInjection] replace DefinitionDecorator by ChildDefinition #20663

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 13, 2016

Conversation

xabbuh
Copy link
Member

@xabbuh xabbuh commented Nov 28, 2016

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

The DefinitionDecorator class does not deal with decorated services. It reflects a parent-child-relationship between definitions instead. To avoid confusion, this commit deprecates the existing DefinitionDecorator class and introduces a new DefinitionExtension class as replacement.

@@ -54,6 +54,9 @@ protected function tearDown()
$this->deleteTmpDir('Acl');
}

/**
* @group legacy
Copy link
Member Author

Choose a reason for hiding this comment

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

This is necessary until DoctrineBundle is compatible with the changes done in this PR.

@unkind
Copy link
Contributor

unkind commented Nov 28, 2016

The DefinitionDecorator class does not deal with decorated services

It reflects service that decorates another one, doesn't it?

@stof
Copy link
Member

stof commented Nov 28, 2016

@unkind no. The decorates feature uses normal definition to configure the composition (as the service definition for the decorator does not need to reuse anything from the original service as it gets it as a dependency instead).
DefinitionDecorator is used for the parent feature, i.e. a definition extending another one

@nicolas-grekas
Copy link
Member

DerivedDefinition? ChildDefinition?

@ogizanagi
Copy link
Contributor

I like ChildDefinition 👍

@julienfalque
Copy link
Contributor

👍 for ChildDefinition.

@xabbuh xabbuh force-pushed the definition-extension branch 3 times, most recently from cb93449 to a7c7477 Compare December 3, 2016 13:20
@xabbuh
Copy link
Member Author

xabbuh commented Dec 3, 2016

I renamed DefinitionExtension to ChildDefinition.

@nicolas-grekas nicolas-grekas added this to the 3.x milestone Dec 6, 2016
@nicolas-grekas nicolas-grekas changed the title [DependencyInjection] replace DefinitionDecorator with DefinitionExtension [DependencyInjection] replace DefinitionDecorator by ChildDefinition Dec 12, 2016
@nicolas-grekas
Copy link
Member

nicolas-grekas commented Dec 12, 2016

I'm tempted to vote +1, but then I also considered the burden that we'll put on bundles & co. Not sure it's worth it...

@xabbuh
Copy link
Member Author

xabbuh commented Dec 12, 2016

Given the confusion this class name caused in the past and still causes, I think we should dare to make this deprecation now and get rid of it in 4.0.

@fabpot
Copy link
Member

fabpot commented Dec 13, 2016

👍 There are some conflicts to be resolved.

@xabbuh xabbuh force-pushed the definition-extension branch 2 times, most recently from 377687f to 2ddb0e9 Compare December 13, 2016 09:21
The DefinitionDecorator class does not deal with decorated services. It
reflects a parent-child-relationship between definitions instead. To
avoid confusion, this commit deprecates the existing DefinitionDecorator
class and introduces a new ChildDefinition class as replacement.
@xabbuh xabbuh force-pushed the definition-extension branch from 2ddb0e9 to 184f7ff Compare December 13, 2016 11:26
@xabbuh
Copy link
Member Author

xabbuh commented Dec 13, 2016

conflicts are resolved

@fabpot
Copy link
Member

fabpot commented Dec 13, 2016

Thank you @xabbuh.

@fabpot fabpot merged commit 184f7ff into symfony:master Dec 13, 2016
fabpot added a commit that referenced this pull request Dec 13, 2016
…hildDefinition (xabbuh)

This PR was merged into the 3.3-dev branch.

Discussion
----------

[DependencyInjection] replace DefinitionDecorator by ChildDefinition

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

The DefinitionDecorator class does not deal with decorated services. It reflects a parent-child-relationship between definitions instead. To avoid confusion, this commit deprecates the existing DefinitionDecorator class and introduces a new DefinitionExtension class as replacement.

Commits
-------

184f7ff replace DefinitionDecorator with ChildDefinition
@xabbuh xabbuh deleted the definition-extension branch December 13, 2016 14:13
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.

8 participants