Skip to content
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

Contents of installed.php should be more deterministic #12197

Closed
ondrejmirtes opened this issue Nov 13, 2024 · 3 comments
Closed

Contents of installed.php should be more deterministic #12197

ondrejmirtes opened this issue Nov 13, 2024 · 3 comments
Labels
Milestone

Comments

@ondrejmirtes
Copy link
Contributor

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

@sp-alberto-lopez
Copy link

@Seldaek Seldaek added the Bug label Nov 25, 2024
@Seldaek Seldaek added this to the 2.8 milestone Nov 25, 2024
@ondrejmirtes
Copy link
Contributor Author

Thank you!

@sp-alberto-lopez
Copy link

Super fast! Thanks!

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

No branches or pull requests

3 participants