Skip to content

Namespaces::getType(): compatibility with the PHP 8 identifier name tokenization #209

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

Conversation

jrfnl
Copy link
Member

@jrfnl jrfnl commented Sep 13, 2020

When the PHP 8 identifier name tokenization is used, the Namespace::getType() method basically becomes redundant as the T_NAMESPACE token when used as an operator will no longer exist, except when there is a PHP 8 parse error.

The Namespaces::getType() method has been adjusted to allow for all the situations which were previously already accounted for.

The associated tests have been adjusted to skip the test cases involving namespace keywords used an operator in a non-parse error situation when PHP 8 identifier name tokenization is used, as those tests no longer apply.

…okenization

When the PHP 8 identifier name tokenization is used, the `Namespace::getType()` method basically becomes redundant as the `T_NAMESPACE` token when used as an operator will no longer exist, except when there is a PHP 8 parse error.

The `Namespaces::getType()` method has been adjusted to allow for all the situations which were previously already accounted for.

The associated tests have been adjusted to skip the test cases involving namespace keywords used an operator in a non-parse error situation when PHP 8 identifier name tokenization is used, as those tests no longer apply.
@jrfnl jrfnl added this to the 1.0.0-alpha4 milestone Sep 13, 2020
@jrfnl jrfnl merged commit f4d902b into develop Sep 13, 2020
@jrfnl jrfnl deleted the php-8.0/namespaces-gettype-identifier-name-compatibility branch September 13, 2020 19:17
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.

1 participant