-
-
Notifications
You must be signed in to change notification settings - Fork 76
Open
Description
Bug report
| Question | Answer |
|---|---|
| PHP-Scoper version | 0.18.18 |
| PHP version | 8.5.1 |
| Platform with version | Ubuntu (WSL) |
| Github Repo | - |
Functions newly added in PHP 8.5, such as array_first and array_last, are not recognized as internal functions.
So they are prefixed unlike other internal functions.
Related to #1105
test.php
<?php
use function array_keys;
use function array_first;
use function array_last;
array_keys([]);
array_first([]);
array_last([]);Result
<?php
namespace _PhpScopere94132a29af9;
use function array_keys;
use function _PhpScopere94132a29af9\array_first;
use function _PhpScopere94132a29af9\array_last;
array_keys([]);
array_first([]);
array_last([]);work around
You can add this line to the require section of composer.json:
"jetbrains/phpstorm-stubs": "dev-master as v2024.x-dev"
Metadata
Metadata
Assignees
Labels
No labels