File tree Expand file tree Collapse file tree 5 files changed +28
-1
lines changed Expand file tree Collapse file tree 5 files changed +28
-1
lines changed Original file line number Diff line number Diff line change @@ -73,6 +73,7 @@ Polyfills are provided for:
7373- the ` mb_trim ` , ` mb_ltrim ` and ` mb_rtrim ` functions introduced in PHP 8.4;
7474- the ` CURL_HTTP_VERSION_3 ` and ` CURL_HTTP_VERSION_3ONLY ` constants introduced in PHP 8.4;
7575- the ` get_error_handler ` and ` get_exception_handler ` functions introduced in PHP 8.5;
76+ - the ` NoDiscard ` attribute introduced in PHP 8.5;
7677
7778It is strongly recommended to upgrade your PHP version and/or install the missing
7879extensions whenever possible. This polyfill should be used only when there is no
Original file line number Diff line number Diff line change 6363 " src/Intl/Icu/Resources/stubs" ,
6464 " src/Intl/MessageFormatter/Resources/stubs" ,
6565 " src/Intl/Normalizer/Resources/stubs" ,
66+ " src/Php85/Resources/stubs" ,
6667 " src/Php84/Resources/stubs" ,
6768 " src/Php83/Resources/stubs" ,
6869 " src/Php82/Resources/stubs" ,
Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ Symfony Polyfill / Php85
44This component provides features added to PHP 8.5 core:
55
66- [ ` get_error_handler ` and ` get_exception_handler ` ] ( https://wiki.php.net/rfc/get-error-exception-handler )
7+ - [ ` NoDiscard ` ] ( https://wiki.php.net/rfc/marking_return_value_as_important )
78
89More information can be found in the
910[ main Polyfill README] ( https://github.com/symfony/polyfill/blob/main/README.md ) .
Original file line number Diff line number Diff line change 1+ <?php
2+
3+ /*
4+ * This file is part of the Symfony package.
5+ *
6+ * (c) Fabien Potencier <fabien@symfony.com>
7+ *
8+ * For the full copyright and license information, please view the LICENSE
9+ * file that was distributed with this source code.
10+ */
11+
12+ if (\PHP_VERSION_ID < 80500 ) {
13+ #[Attribute(Attribute::TARGET_METHOD | Attribute::TARGET_FUNCTION )]
14+ final class NoDiscard
15+ {
16+ public ?string $ message ;
17+
18+ public function __construct (?string $ message = null )
19+ {
20+ $ this ->message = $ message ;
21+ }
22+ }
23+ }
Original file line number Diff line number Diff line change 2020 },
2121 "autoload" : {
2222 "psr-4" : { "Symfony\\ Polyfill\\ Php85\\ " : " " },
23- "files" : [ " bootstrap.php" ]
23+ "files" : [ " bootstrap.php" ],
24+ "classmap" : [ " Resources/stubs" ]
2425 },
2526 "minimum-stability" : " dev" ,
2627 "extra" : {
You can’t perform that action at this time.
0 commit comments