WordPress-Coding-Standards icon indicating copy to clipboard operation
WordPress-Coding-Standards copied to clipboard

Review sniff handling of PHP 7.3 flexible heredoc newdoc

Open dingo-d opened this issue 2 years ago • 0 comments

PHP 7.3 relaxed requirements for heredoc and nowdoc syntax.

The WPCS native sniffs which test for T_HEREDOC and T_NOWDOC tokens will need to be reviewed to make sure that they handle the changes correctly. We'll need to add additional tests that will handle the marker and text within the heredoc/nowdoc enclosing collisions.

We'd also need to see where and in which situations we can use utilities provided by PHPCSUtils package.

Refs:

  • PHP RFC: https://wiki.php.net/rfc/flexible_heredoc_nowdoc_syntaxes

Related to #764

dingo-d avatar Apr 21 '22 09:04 dingo-d