Skip to content

phpstan-error regarding array_combine with latest safe and phpstan-safe-rule #31

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
temp opened this issue Apr 19, 2022 · 2 comments
Closed

Comments

@temp
Copy link

temp commented Apr 19, 2022

safe was just updated to 2.2, phpstan-safe-rule is 1.2.0

$ vendor/bin/phpstan
Note: Using configuration file /Users/swentz/git/brainbits/functional-test-helpers/phpstan.neon.dist.
 47/47 [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓] 100%

 -- ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
     Error
 -- ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
     Internal error: Internal error: Call to undefined function Safe\array_combine() in file /Users/swentz/git/brainbits/functional-test-helpers/src/ZipContents/ZipInfo.php
     Run PHPStan with -v option and post the stack trace to:
     https://github.com/phpstan/phpstan/issues/new?template=Bug_report.md
     Internal error: Internal error: Call to undefined function Safe\array_combine() in file /Users/swentz/git/brainbits/functional-test-helpers/src/ZipContents/FileInfo.php
     Run PHPStan with -v option and post the stack trace to:
     https://github.com/phpstan/phpstan/issues/new?template=Bug_report.md
     Internal error: Internal error: Call to undefined function Safe\array_combine() in file /Users/swentz/git/brainbits/functional-test-helpers/src/ZipContents/InvalidArchive.php
...

src/Utils/FunctionListLoader.php uses \Safe\array_combine, but this does not exist in safe:2.2

$ cd vendor/thecodingmachine/phpstan-safe-rule
$ ack array_combine
src/Utils/FunctionListLoader.php
31:            self::$functions = \Safe\array_combine($functions, $functions);
@temp temp changed the title phpstan-errors with latest safe and phpstan-safe-rule phpstan-error regarding array_combine with latest safe and phpstan-safe-rule Apr 19, 2022
@snapshotpl
Copy link

Confirmed

@temp
Copy link
Author

temp commented Apr 19, 2022

Closing issue, see issue in the safe library.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants