Commit 6b82a86
committed
PHP 8.5 | Tokenizer/PHP: temporarily silence "Using null as an array offset" deprecation
When running the `NullsafeObjectOperatorTest`, the "Using null as an array offset" deprecation gets triggered in the tokenizer layer handling re-tokenization to `T_NULLABLE` and/or `T_INLINE_THEN`.
This should only be possible if the below code at the top of the loop would result in `$tokenType` being `null`, which shouldn't be possible....
https://github.com/PHPCSStandards/PHP_CodeSniffer/blob/f1c9394f1724ed45ca42029da330ff5c702af2a9/src/Tokenizers/PHP.php#L2254-L2258
With this conundrum in mind, I'm electing to (temporarily) silence the deprecation notice for now until there is more time to investigate in more depth.
Ref: https://wiki.php.net/rfc/deprecations_php_8_5#deprecate_using_values_null_as_an_array_offset_and_when_calling_array_key_exists1 parent acf2a54 commit 6b82a86
1 file changed
+4
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2268 | 2268 | | |
2269 | 2269 | | |
2270 | 2270 | | |
2271 | | - | |
| 2271 | + | |
2272 | 2272 | | |
2273 | 2273 | | |
2274 | 2274 | | |
| |||
2287 | 2287 | | |
2288 | 2288 | | |
2289 | 2289 | | |
2290 | | - | |
2291 | | - | |
| 2290 | + | |
| 2291 | + | |
2292 | 2292 | | |
2293 | 2293 | | |
2294 | 2294 | | |
| |||
2311 | 2311 | | |
2312 | 2312 | | |
2313 | 2313 | | |
2314 | | - | |
| 2314 | + | |
2315 | 2315 | | |
2316 | 2316 | | |
2317 | 2317 | | |
| |||
0 commit comments