File tree 5 files changed +28
-1
lines changed
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:
73
73
- the ` mb_trim ` , ` mb_ltrim ` and ` mb_rtrim ` functions introduced in PHP 8.4;
74
74
- the ` CURL_HTTP_VERSION_3 ` and ` CURL_HTTP_VERSION_3ONLY ` constants introduced in PHP 8.4;
75
75
- the ` get_error_handler ` and ` get_exception_handler ` functions introduced in PHP 8.5;
76
+ - the ` NoDiscard ` attribute introduced in PHP 8.5;
76
77
77
78
It is strongly recommended to upgrade your PHP version and/or install the missing
78
79
extensions whenever possible. This polyfill should be used only when there is no
Original file line number Diff line number Diff line change 63
63
" src/Intl/Icu/Resources/stubs" ,
64
64
" src/Intl/MessageFormatter/Resources/stubs" ,
65
65
" src/Intl/Normalizer/Resources/stubs" ,
66
+ " src/Php85/Resources/stubs" ,
66
67
" src/Php84/Resources/stubs" ,
67
68
" src/Php83/Resources/stubs" ,
68
69
" src/Php82/Resources/stubs" ,
Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ Symfony Polyfill / Php85
4
4
This component provides features added to PHP 8.5 core:
5
5
6
6
- [ ` 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 )
7
8
8
9
More information can be found in the
9
10
[ 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 <[email protected] >
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 20
20
},
21
21
"autoload" : {
22
22
"psr-4" : { "Symfony\\ Polyfill\\ Php85\\ " : " " },
23
- "files" : [ " bootstrap.php" ]
23
+ "files" : [ " bootstrap.php" ],
24
+ "classmap" : [ " Resources/stubs" ]
24
25
},
25
26
"minimum-stability" : " dev" ,
26
27
"extra" : {
You can’t perform that action at this time.
0 commit comments