Skip to content

Fix #233 inline defined const #234

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

Merged
merged 1 commit into from
Jan 4, 2022
Merged

Conversation

jaapio
Copy link
Member

@jaapio jaapio commented Jan 4, 2022

Defines in a method or function are allowed in PHP. However, they are added
to the global scope. As this library now processes the full method body to be
able to add more information into the reflected code, this caused issues.

As the defines are added to the global scope of the execution they are basically
defined at a file-level when a define was executed. This is the best we can get right now to
reflect what the application would do at runtime.

Fixes #233

Defines in a method or function are allowed in php. However they are added
to the global scope. As this library now processes the full method body to be
able to add more information into the reflected code, this caused issues.

As the defines are added to the global scope of the execution they are basically
defined at a file level when a define was executed. This is the best we can get right now to
reflect what the application would do at runtime.
@jaapio jaapio merged commit d0fcff5 into 5.x Jan 4, 2022
@jaapio jaapio deleted the fix/233-in_function_defined_const branch January 4, 2022 20:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Define in function or method failed to parse
1 participant