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
Improving support for anonymous classes #2613
Open
mamazu
wants to merge
37
commits into
phpactor:master
Choose a base branch
from
mamazu:anonymous_classes
base: master
Could not load branches
Branch not found: {{ refName }}
Could not load tags
Nothing to show
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 12 commits
Commits
Show all changes
37 commits
Select commit
Hold shift + click to select a range
c597a53
First try at implementing it
mamazu 5cc2e4d
Fixups
mamazu 71bf377
Skip real classes in `ObjectCreationExpression`s
mamazu f76d62f
Improvements
mamazu d98a9f8
Removing unused properties
mamazu 5e5389a
Making assertions assert the correct type
mamazu 4889c1c
Merge branch 'master' into anonymous_classes
mamazu 836d962
Using the reflected class resolver
mamazu 8e24b48
Using a softer exception
mamazu f32ad1b
More fixup
mamazu 7a53a6b
Adding support for extending anonymous classes
mamazu 701944a
Improving the typing
mamazu 8b69ecb
Adding an `isAnonymous` method to the class
mamazu 168f3e2
Improving it some more
mamazu cbeb726
More sensible default
mamazu 07dd87c
Adding tests back
mamazu c79260d
First try at implementing it
mamazu f91f1b4
Fixups
mamazu ae72ace
Skip real classes in `ObjectCreationExpression`s
mamazu 046ff0c
Improvements
mamazu f8044f4
Removing unused properties
mamazu 10d4180
Making assertions assert the correct type
mamazu 202087e
Using the reflected class resolver
mamazu 175266d
Using a softer exception
mamazu bc3b1b4
More fixup
mamazu 0ea9d3e
Adding support for extending anonymous classes
mamazu 14802b4
Improving the typing
mamazu 0ea17a9
Adding an `isAnonymous` method to the class
mamazu f197e6f
Improving it some more
mamazu e5ff010
More sensible default
mamazu c30b479
Adding tests back
mamazu 4f76488
Merge remote-tracking branch 'origin/anonymous_classes' into anonymou…
mamazu 9249c6a
Fixing type errors
mamazu 6640629
Reverting changes
mamazu caa112a
Fix
mamazu da577f9
Moving the ReflectionClassLikeCollection creation to the reflector
mamazu 011b095
Merge branch 'master' into anonymous_classes
mamazu File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is it expected that this is NOT a ClassMembersNode? pm am ObjectCreationExpression it can be NULL, and for ClassDeclaration tolerant parser often lies about nullability. this will cause a runtime exception, which is probably not what we want.
if it should never happen then this should be an exception and I'd prefer not to use Assertion libraries.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, the problem in this case is that it could also be a "normal" Object creation with a class name which would then crash here. But in this case I'm not sure what the best way to go about this is.