Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[DI] Fix AutowirePass fatal error with classes that have non-existing parents#18600

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
dunglas merged 2 commits intosymfony:2.8fromnicolas-grekas:no-parent
Apr 21, 2016

Conversation

@nicolas-grekas
Copy link
Member

@nicolas-grekasnicolas-grekas commentedApr 20, 2016
edited
Loading

QA
Branch?2.8
Bug fix?yes
New feature?no
BC breaks?no
Deprecations?no
Tests pass?yes
Fixed tickets#18188
LicenseMIT
Doc PR-

hason, lisachenko, and HeahDude reacted with thumbs up emojidunglas reacted with hooray emoji
@hason
Copy link
Contributor

@nicolas-grekas You are a PHP hacker. Great!

$reflector =false;

try {
spl_autoload_register($throwingAutoloader);
Copy link
Member

Choose a reason for hiding this comment

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

this could even be outside the try/catch

Choose a reason for hiding this comment

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

@nicolas-grekas Very clever trick!

@stof
Copy link
Member

$typeHint = $parameter->getClass() on line 79 could also trigger the loading of a class without a parent class. Could we apply a similar trick there (we will need to set a meaningful exception message though, saying that the class does not exist) ?

@nicolas-grekas
Copy link
MemberAuthor

@stof I wondered the same, but someone needs to give me a test case that would trigger the fatal error first :)

@stof
Copy link
Member

stof commentedApr 20, 2016
edited
Loading

@nicolas-grekas register an autowired service for a class which has a constructor argument typehinted with a class which extend a missing class

@nicolas-grekas
Copy link
MemberAuthor

@nicolas-grekasnicolas-grekas mentioned this pull requestApr 20, 2016
@stof
Copy link
Member

👍

1 similar comment
@dunglas
Copy link
Member

👍

@dunglas
Copy link
Member

... and one more bug fixed, thank you@nicolas-grekas.

@dunglasdunglas merged commit202cc77 intosymfony:2.8Apr 21, 2016
dunglas added a commit that referenced this pull requestApr 21, 2016
…on-existing parents (hason, nicolas-grekas)This PR was merged into the 2.8 branch.Discussion----------[DI] Fix AutowirePass fatal error with classes that have non-existing parents| Q             | A| ------------- | ---| Branch?       | 2.8| Bug fix?      | yes| New feature?  | no| BC breaks?    | no| Deprecations? | no| Tests pass?   | yes| Fixed tickets |#18188| License       | MIT| Doc PR        | -Commits-------202cc77 [DI] Fix AutowirePass fatal error with classes that have non-existing parents1735b85 [DependencyInjection] Tests for AutowirePass with missing parent class
@nicolas-grekasnicolas-grekas deleted the no-parent branchApril 21, 2016 12:17
This was referencedApr 29, 2016
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

6 participants

@nicolas-grekas@hason@stof@dunglas@lisachenko@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp