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] Include found files instead of requiring them #32500

Merged

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 #32499
License MIT
Doc PR no

It fixes #32499 + it makes the DebugClassLoader behaves like composer ClassLoader that is very likely the wrapped class loader.

@fabpot
Copy link
Member

fabpot commented Jul 12, 2019

Thank you @fancyweb.

@fabpot fabpot merged commit c7141c8 into symfony:3.4 Jul 12, 2019
fabpot added a commit that referenced this pull request Jul 12, 2019
…equiring them (fancyweb)

This PR was merged into the 3.4 branch.

Discussion
----------

[Debug][DebugClassLoader] Include found files instead of requiring them

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

It fixes #32499 + it makes the `DebugClassLoader` behaves like composer `ClassLoader` that is very likely the wrapped class loader.

Commits
-------

c7141c8 [Debug][DebugClassLoader] Include found files instead of requiring them
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
yceruto added a commit to yceruto/symfony that referenced this pull request Jul 15, 2019
This was referenced Jul 27, 2019
@fancyweb fancyweb deleted the debug-class-loader-include-instead-of-require branch August 9, 2019 07:13
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

5 participants