PHP 8.3 | :sparkles: New `PHPCompatibility.Generators.NewYieldFromComment` sniff by jrfnl · Pull Request #1792 · PHPCompatibility/PHPCompatibility
> . In addition to whitespace characters, now comments are allowed between > `yield` and `from`. The whole "construct" (e.g. `yield /* comment */ from`) > is reported as a single `T_YIELD_FROM` token by the tokenizer. This commit adds a new sniff which detects this in a PHPCS cross-version compatible manner. Once support for PHPCS < 3.11.0 has been dropped, this sniff can be simplified, but IMO, this sniff alone is not enough reason to raise the minimum supported PHPCS version, especially as working around the different tokenizations isn't that complicated. Includes tests. Includes documentation. Refs: * php/php-src 14926 * https://github.com/php/php-src/blob/e4010fcf957c62ddb70f8d3296d52c5486a84d4d/UPGRADING#L48-L50 * php/php-src 10125 * php/php-src@f291d37 Related to 1589 Fixes 1720
jrfnl
marked this pull request as ready for review
wimg approved these changes Nov 29, 2024
wimg
deleted the
feature/new-newyieldfromcomment-sniff
branch
jrfnl
mentioned this pull request
jrfnl
mentioned this pull request
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters