File tree Expand file tree Collapse file tree 3 files changed +26
-1
lines changed
Expand file tree Collapse file tree 3 files changed +26
-1
lines changed 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