Skip to content

PHPStan 2.1.12 compatibility #323

@ruudk

Description

@ruudk

PHPStan just released 2.1.12 and I checked out the Dependabot bump going from 2.1.11 to 2.1.12 and noticed that all my rules that disallow classes except when allowInMethodsWithAttributes now report issues.

<?php

declare(strict_types=1);

return [
    'parameters' => [
        'disallowedClasses' => [
            [
                'allowInUse' => true,
                'class' => EventRecorder::class,
                'allowInMethodsWithAttributes' => [
                    AsCommandHandler::class,
                ],
                'allowIn' => [
                    '**/tests/*',
                ],
            ],
        ],
    ],
];

I'll debug it further, but just wanted to hint it here already.

@spaze Maybe you can kick off a new CI builds that pulls in the latest PHPStan version to confirm?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions