8000 [DI] Fix initialization of legacy containers by delaying include_once by nicolas-grekas · Pull Request #25858 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

Conversation

@nicolas-grekas
Copy link
Member
@nicolas-grekas nicolas-grekas commented Jan 20, 2018
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 -

Best reviewed ignoring whitespaces:
https://github.com/symfony/symfony/pull/25858/files?w=1

Noticed while removing a package: silencing the failing include_once as introduced in #25255 is not working for the $oldContainer in Kernel, and fails with a fatal error when an include succeeds but the class inside misses a parent.

Delaying the calls to include_once to the moment where the fresh container is actually used first, when setting the "kernel" service, works around the situation.

@fabpot
Copy link
Member
fabpot commented Jan 23, 2018

Thank you @nicolas-grekas.

@fabpot fabpot merged commit 5e750ec into symfony:3.4 Jan 23, 2018
fabpot added a commit that referenced this pull request Jan 23, 2018
…nclude_once (nicolas-grekas)

This PR was merged into the 3.4 branch.

Discussion
----------

[DI] Fix initialization of legacy containers by delaying include_once

| 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        | -

Best reviewed ignoring whitespaces:
https://github.com/symfony/symfony/pull/25858/files?w=1

Noticed while removing a package: silencing the failing `include_once` as introduced in #25255 is not working for the `$oldContainer` in `Kernel`, and fails with a fatal error when an include succeeds but the class inside misses a parent.

Delaying the calls to `include_once` to the moment where the fresh container is actually used first,  when setting the "kernel" service, works around the situation.

Commits
-------

5e750ec [DI] Fix initialization of legacy containers by delaying include_once
@nicolas-grekas nicolas-grekas deleted the di-init branch January 23, 2018 07:00
This was referenced Jan 29, 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

0