You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
since I have use-cases in my code-base for the PHP 8.5+ #[\NoDiscard] attribute, I want to suggest implementing support for it in PHPStan (even for PHP7/8), so we can use it already today, even before 8.5 is released
Please do not open issues for not-yet released and not-yet supported PHP versions.
Usually after feature-freeze I go through the PHP UPGRADING document and dutifully create all the required todos for myself so the already-opened issues just complicate my workflow :)
Activity
[-]Implement support for PHP 8.4 `#[\NoDiscard]`[/-][+]Implement support for `#[\NoDiscard]`[/+]ondrejmirtes commentedon May 14, 2025
Please do not open issues for not-yet released and not-yet supported PHP versions.
Usually after feature-freeze I go through the PHP UPGRADING document and dutifully create all the required todos for myself so the already-opened issues just complicate my workflow :)
ondrejmirtes commentedon May 14, 2025
I understand your motivation but the
#[\NoDiscard]has meaning and exists only on PHP 8.5+ so PHPStan will not report any error before that.If you have a use for such attribute you can check out
#[MustUseResult]in https://github.com/DaveLiddament/php-language-extensions.github-actions commentedon Jun 15, 2025
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.