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

[Debug][DebugClassLoader] Don't check class if the included file doesn't exist #32511

Conversation

fancyweb
Copy link
Contributor

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 -

Follow up to #32500.

If the included file doesn't exist, we need to return or the execution continues (if warnings are not thrown as exceptions) and then an invalid exception is thrown when the class is checked.

For example : "The autoloader expected class "App\Foo\Bar" to be defined in file "/var/www/html/vendor/composer/../../src/Foo/Bar.php". The file was found but the class was not in it, the class name or namespace probably has a typo".

@nicolas-grekas nicolas-grekas added this to the 3.4 milestone Jul 12, 2019
@fancyweb fancyweb force-pushed the debug-class-loader-return-if-included-file-is-not-found branch from 7110ac7 to 0185527 Compare July 12, 2019 08:40
@nicolas-grekas
Copy link
Member

Thank you @fancyweb.

@nicolas-grekas nicolas-grekas merged commit 0185527 into symfony:3.4 Jul 15, 2019
nicolas-grekas added a commit that referenced this pull request Jul 15, 2019
…ded file doesn't exist (fancyweb)

This PR was merged into the 3.4 branch.

Discussion
----------

[Debug][DebugClassLoader] Don't check class if the included file doesn't exist

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

Follow up to #32500.

If the included file doesn't exist, we need to return or the execution continues (if warnings are not thrown as exceptions) and then an invalid exception is thrown when the class is checked.

For example : "The autoloader expected class "App\Foo\Bar" to be defined in file "/var/www/html/vendor/composer/../../src/Foo/Bar.php". The file was found but the class was not in it, the class name or namespace probably has a typo".

Commits
-------

0185527 [Debug][DebugClassLoader] Don't check class if the included file don't exist
@fancyweb fancyweb deleted the debug-class-loader-return-if-included-file-is-not-found branch July 15, 2019 13:20
yceruto added a commit to yceruto/symfony that referenced this pull request Jul 15, 2019
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.

None yet

3 participants