Fixed the DebugClassLoader compatibility with eval()'d code on Darwin#30363
Merged
nicolas-grekas merged 1 commit intosymfony:3.4from Feb 24, 2019
Merged
Fixed the DebugClassLoader compatibility with eval()'d code on Darwin#30363nicolas-grekas merged 1 commit intosymfony:3.4from
nicolas-grekas merged 1 commit intosymfony:3.4from
Conversation
| $kFile = strtolower($file); | ||
|
|
||
| if (!isset($dirFiles[$kFile])) { | ||
| if (') : eval()\'d code' === substr($kFile, -17)) { |
Member
There was a problem hiding this comment.
to allow the result to be cached, this should be before the previous "if", using
if (!isset($dirFiles[$kFile]) && ') : eval()\'d code' === substr($kFile, -17)) { for example
Contributor
Author
There was a problem hiding this comment.
Done. I moved it before the first isset() as it might even save the strtolower() call.
Contributor
Author
|
The AppVeyor build fail is unrelated (problem with the console |
nicolas-grekas
approved these changes
Feb 24, 2019
88d9846 to
6c2aa24
Compare
Member
|
Thank you @skalpa. |
nicolas-grekas
added a commit
that referenced
this pull request
Feb 24, 2019
…e on Darwin (skalpa) This PR was squashed before being merged into the 3.4 branch (closes #30363). Discussion ---------- Fixed the DebugClassLoader compatibility with eval()'d code on Darwin | Q | A | ------------- | --- | Branch? | 3.4 | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | #30362 | License | MIT When a class is defined in an `eval()` block, the reported file name is `file_name.php(123) : eval()'d code`, which prevents `DebugClassLoader::darwinRealpath()` from locating/normalizing the file name, and triggers a notice. Commits ------- 6c2aa24 Fixed the DebugClassLoader compatibility with eval()'d code on Darwin
nicolas-grekas
added a commit
that referenced
this pull request
Oct 15, 2020
…aknin) This PR was merged into the 3.4 branch. Discussion ---------- [DI] Fix Reflection file name with eval()\'d code | Q | A | ------------- | --- | Branch? | 3.4 | Bug fix? | yes | New feature? | no | Deprecations? | no | Tickets | - | License | MIT | Doc PR | - remove eval()\'d code from lineage similar to #30363 Commits ------- 394a694 Fix Reflection file name with eval()\'d code
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When a class is defined in an
eval()block, the reported file name isfile_name.php(123) : eval()'d code, which preventsDebugClassLoader::darwinRealpath()from locating/normalizing the file name, and triggers a notice.