Skip to content

Contents of installed.php should be more deterministic #12197

Closed
@ondrejmirtes

Description

PHPStan's result cache relies on installed.php contents to stay the same if the installed packages are the same.

If the contents of installed.php change to convey the same information, PHPStan's result cache is invalidated. Which isn't a big issue, but I guess the fix should be easy enough.

The specific thing that changed between installations with the same lock file is:

*** 1145,1156 ****
          'psr/log-implementation' => 
          array (
            'dev_requirement' => false,
            'provided' => 
            array (
!             0 => '1.0.0',
!             1 => '1.0|2.0',
            ),
          ),
          'psr/simple-cache' => 
          array (
            'pretty_version' => '1.0.1',
--- 1145,1156 ----
          'psr/log-implementation' => 
          array (
            'dev_requirement' => false,
            'provided' => 
            array (
!             0 => '1.0|2.0',
!             1 => '1.0.0',
            ),
          ),
          'psr/simple-cache' => 
          array (
            'pretty_version' => '1.0.1',

So the order of versions in provided key. I guess they should be ordered before exporting.

Original issue: phpstan/phpstan#12027

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions