Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add #[NoDiscard] to the PHP 8.5 polyfill #522

Open
wants to merge 4 commits into
base: 1.x
Choose a base branch
from

Conversation

schodemeiss
Copy link

No description provided.

Andrew Menino-Barlow added 3 commits April 5, 2025 17:19
Introduce the NoDiscard attribute for marking return values as important, aligning with PHP 8.5's new feature. Updated the autoload configuration to include stubs and documented the addition in the README.
Copy link
Member

@GromNaN GromNaN left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@schodemeiss
Copy link
Author

schodemeiss commented Apr 7, 2025

Thanks, the stub is identical to the one provided in php-src: https://github.com/TimWolla/php-src/blob/d80682e753af13a89ad71ee78100ce44045f175d/Zend/zend_attributes.stub.php#L88-L97

Indeed. I presumed that was the correct thing to do.

Do we know when this Polyfill will be published as non-dev. I noticed it's on Packagist, but not as 1.38 (or whatever the other polyfills are).

https://packagist.org/packages/symfony/polyfill-php85

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants