Problem/Motivation

PHPStan 2.2.6 includes a native PHP extension that makes PHPStan 10-30% faster: https://github.com/phpstan/phpstan/releases/tag/2.2.6

As our codebase is large this should have an effect both for local development and CI runtimes.

Steps to reproduce

Proposed resolution

Update PHPStan.

Remaining tasks

User interface changes

Introduced terminology

API changes

Data model changes

Release notes snippet

Issue fork drupal-3614113

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

longwave created an issue. See original summary.

longwave’s picture

Status: Active » Needs review
mondrake’s picture

Shouldn’t the constraint in root composer.json be bumped too?

smustgrave’s picture

Status: Needs review » Needs work

Seems 2.2.8 came out the other day might as well right? There's a number of update tickets in RTBC too so wonder if there will be conflict?

longwave-bot made their first commit to this issue’s fork.

longwave’s picture

Status: Needs work » Needs review

Bumped to 2.2.8 and raised the constraint in composer.json.

smustgrave’s picture

Status: Needs review » Reviewed & tested by the community

Lets do it, sure there will be conflicts once the other updates land though.

longwave’s picture

Status: Reviewed & tested by the community » Needs work

Baseline needs updating.

longwave’s picture

Status: Needs work » Reviewed & tested by the community
mondrake’s picture

Title: Update to PHPStan 2.2.7 » Update to PHPStan 2.2.8

  • catch committed 69a85705 on main
    task: #3614113 Update to PHPStan 2.2.8
    
    By: longwave
    By: mondrake
    By:...
catch’s picture

Version: main » 11.x-dev
Status: Reviewed & tested by the community » Patch (to be ported)

For performance I'd be most interested in whether the phpstan cache restoration is faster (it's regularly 15-25s on CI runs just to restore the cache), and whether my laptop stops trying to levitate when I need to do a full phpstan run locally when committing. But this isn't something we can usefully test and feed back on without using it regularly, and for CI it needs to be in main for the caching to work at all, so let's find out.

Committed/pushed to main, thanks! Noticeably my laptop did not try to levitate when committing the patch, if that holds, it would be nice.

Will need an 11.x backport.

longwave’s picture

Status: Patch (to be ported) » Needs review
catch’s picture

Status: Needs review » Fixed

Committed/pushed to 11.x, thanks!

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

  • catch committed d63d1580 on 11.x
    task: #3614113 Update to PHPStan 2.2.8
    
    By: longwave
    By: mondrake
    By:...