Conversation
While this language construct is already tokenized correctly in PHPCS, PHP itself has not yet implemented it. The RFC has been approved a while back and it was slated to go into PHP 7.2, but as of PHP 7.2 RC4 no implementation has been merged and it is not expected to go into PHP 7.2 anymore.
|
In general, we should avoid adding features from RFCs until they're actually released... |
|
I agree that as long as the code has not been merged in any branch of the PHP source code, having this sniff might not be ideal. Then again, in this specific case it will not cause any issues, so we could leave it in there ? |
@MarkMaldaba @wimg I totally agree. However, this is a bit of a special case. History: The idea was that the upstream ticket would remain open until the RFC was merged into PHP and that the token could then be implemented into PHPCS quickly.
To my surprise, the token back-fill was then implemented into PHPCS straight away, even though the token was not in PHP yet. As PHPCS already added the token, I figured it made sense to add it here as well, which is why I pulled it in #340.
So, yes, as the token already exists in PHPCS, I think leaving it in, makes the most sense. |
While this language construct is already tokenized correctly in PHPCS, PHP itself has not yet implemented it.
The RFC has been approved a while back and it was slated to go into PHP 7.2, but as of PHP 7.2 RC4 no implementation has been merged and it is not expected to go into PHP 7.2 anymore.
As PHPCS already recognized the token, it was already added to the
NewLanguageConstructssniff a while back.All this PR does is up the PHP version number used for the compares.