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

[BUGFIX] Make class name visitors ignore ::class tokens #6

Merged
merged 1 commit into from
Jan 16, 2017
Merged

[BUGFIX] Make class name visitors ignore ::class tokens #6

merged 1 commit into from
Jan 16, 2017

Conversation

fabschurt
Copy link
Contributor

Hi,

Currently, the class name visitors support the T_CLASS token type, but this token type can refer to a regular class declaration AND to a class magic constant (::class). So, if there are calls to ::class in the class body, an error will likely be thrown because the next tokens will surely not be a whitespace and a string/class name.

This PR fixes this by making sure we’re dealing with a class declaration keyword and not a class magic constant.

@fabschurt
Copy link
Contributor Author

[bump] @gnugat

@gnugat
Copy link
Owner

gnugat commented Jan 16, 2017

Hi @fabschurt, thank you for your contribution.
Sorry I didn't reply earlier, I checked your PR, then got distracted... I'll release v0.4.2 for it.

@gnugat gnugat merged commit 7bc4951 into gnugat:master Jan 16, 2017
@fabschurt
Copy link
Contributor Author

Perfect, thanks! 👍

@fabschurt
Copy link
Contributor Author

@gnugat, just as a side note: it seems that the new release (0.4.2) has not been parsed by Packagist, an issue with the webhook maybe?

@gnugat
Copy link
Owner

gnugat commented Jan 18, 2017

Thanks for pointing it out, I've updated manually packagist and reset the webhook for the next times.

@fabschurt
Copy link
Contributor Author

Nice, thanks 👍

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.

None yet

2 participants