Skip to content

[DI] Allow defining bindings on ChildDefinition #27271

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
May 17, 2018

Conversation

nicolas-grekas
Copy link
Member

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

Spotted by @stof while trying to put symfony/monolog-bundle#254 into practice.
Binding log channels doesn't work because we put this artificial restriction in place.
Let's allow ChildDefinition to have bindings (but only at the DI extension level, loaders still forbid defining them at their level because of the parent vs _defaults ambiguity.)

@stof
Copy link
Member

stof commented May 15, 2018

The reason why we need to be able to put bindings there is because of autoconfiguration using ChildDefinition too (and doing this transformation early)

@fabpot
Copy link
Member

fabpot commented May 17, 2018

Thank you @nicolas-grekas.

@fabpot fabpot merged commit 1c3b105 into symfony:3.4 May 17, 2018
fabpot added a commit that referenced this pull request May 17, 2018
…rekas)

This PR was merged into the 3.4 branch.

Discussion
----------

[DI] Allow defining bindings on ChildDefinition

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

Spotted by @stof while trying to put symfony/monolog-bundle#254 into practice.
Binding log channels doesn't work because we put this artificial restriction in place.
Let's allow ChildDefinition to have bindings (but only at the DI extension level, loaders still forbid defining them at their level because of the parent vs _defaults ambiguity.)

Commits
-------

1c3b105 [DI] Allow defining bindings on ChildDefinition
This was referenced May 21, 2018
@nicolas-grekas nicolas-grekas deleted the di-allow-bind-child branch May 21, 2018 15:44
fabpot added a commit to symfony/monolog-bundle that referenced this pull request May 29, 2018
…ervices (stof)

This PR was merged into the 3.x-dev branch.

Discussion
----------

Fix the autowiring of the channel logger in autoconfigured services

This depends on symfony/symfony#27271, hence the new min version of the DI component

Commits
-------

b39e571 Fix the autowiring of the channel logger in autoconfigured services
dani-danigm pushed a commit to dani-danigm/monolog-bundle that referenced this pull request Jun 15, 2022
…ervices (stof)

This PR was merged into the 3.x-dev branch.

Discussion
----------

Fix the autowiring of the channel logger in autoconfigured services

This depends on symfony/symfony#27271, hence the new min version of the DI component

Commits
-------

adcc0c2 Fix the autowiring of the channel logger in autoconfigured services
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.

6 participants