Skip to content

Larave11 makes parsing large Enum files considerably slower. #10979

@Sado4

Description

@Sado4

Bug report

  • Laravel Version: 11.7
  • phpstan1.10.67

Description

This was not a problem in Laravel 10, but when updating to Larave 11, stan becomes extremely slow. Specifically, what used to take around 30 seconds takes 9 minutes, etc.

Laravel code where the issue was found

Thus, it stops at 94%.

Result cache not used because the metadata do not match: projectConfig, analysedPaths
 703/743 [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓░░]  94% 19 secs/20 secs

I was testing with different versions and it seems that phpstan 1.10.58 does not slow down. At the time of updating from Laravel 10 to Laravel 11, phpstan is upgraded to 1.10.67, which causes the problem.

Specifically, an enum file that has over 100 cases and several methods that reference them. If necessary, I will send you the file information so you can investigate.

LibraryMasterEnum.php.zip

Code snippet that reproduces the problem

No response

Expected output

It is hoped that large Enum files will not be delayed in the latest version.

Did PHPStan help you today? Did it make you happy in any way?

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions