Skip to content

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

Merged
jrfnl merged 1 commit into
developfrom
php-8.0/namespaces-gettype-identifier-name-compatibility
Sep 13, 2020
Merged

Namespaces::getType(): compatibility with the PHP 8 identifier name tokenization#209
jrfnl merged 1 commit into
developfrom
php-8.0/namespaces-gettype-identifier-name-compatibility

Conversation

@jrfnl

@jrfnl jrfnl commented Sep 13, 2020

Copy link
Copy Markdown
Member

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

Development

Successfully merging this pull request may close these issues.

1 participant