Skip to content
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

[DI] fix related to preloading #33539

Merged
merged 1 commit into from Sep 10, 2019

Conversation

@nicolas-grekas
Copy link
Member

commented Sep 10, 2019

Q A
Branch? 4.4
Bug fix? yes
New feature? no
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets -
License MIT
Doc PR -
@@ -14,6 +14,10 @@
use Psr\Cache\CacheItemPoolInterface;
use Symfony\Component\ExpressionLanguage\ExpressionLanguage as BaseExpressionLanguage;
if (!class_exists(BaseExpressionLanguage::class)) {
throw new \ReflectionException(BaseExpressionLanguage::class.' not found.');

This comment has been minimized.

Copy link
@nicolas-grekas

nicolas-grekas Sep 10, 2019

Author Member

related to #32995

This comment has been minimized.

Copy link
@derrabus

derrabus Sep 10, 2019

Contributor

How does that solve #32995 ? It‘s still going to be an exception thrown during autoload. Thus we should get a fatal here, if someone tries to autoload the ExpressionLanguage class defined in this file.

This comment has been minimized.

Copy link
@stof

stof Sep 10, 2019

Member

#32995 is about the fact that PHP 7.4 does not properly allows us to turn a missing parent class into a catcheable exception.
This is throwing an exception before PHP encounters the missing parent class.

This comment has been minimized.

Copy link
@nicolas-grekas

nicolas-grekas Sep 10, 2019

Author Member

The issue described in #32995 happens when the parent class fails to be loaded while the engine already registered the child as "now loading". This throw happens before the child is flagged as such, thus the exception can be properly caught.

This comment has been minimized.

Copy link
@nicolas-grekas

nicolas-grekas Sep 10, 2019

Author Member

Note that a return; would do it too. I'm going to update.

nicolas-grekas added a commit that referenced this pull request Sep 10, 2019
bug #33539 [DI] fix related to preloading (nicolas-grekas)
This PR was merged into the 4.4 branch.

Discussion
----------

[DI] fix related to preloading

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

Commits
-------

e25c595 [DI] fix related to preloading

@nicolas-grekas nicolas-grekas merged commit e25c595 into symfony:4.4 Sep 10, 2019

1 of 3 checks passed

continuous-integration/appveyor/pr Waiting for AppVeyor build to complete
Details
continuous-integration/travis-ci/pr The Travis CI build is in progress
Details
fabbot.io Your code looks good.
Details

@nicolas-grekas nicolas-grekas deleted the nicolas-grekas:di-fix branch Sep 10, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.