Skip to content

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

@temp

Description

@temp

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);

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions