Skip to content

Final annotation forces now excludes_analyse #3427

@dereuromark

Description

@dereuromark

Bug report

We have now several classes we extend that are now failing in PHPStan
And apparently, one cannot ignoreErrors that one, but must use excludes_analyse here.

Code snippet that reproduces the problem

/**
 * Represents a template filter.
 *
 * @final
 *
 * @author Fabien Potencier <fabien@symfony.com>
 */
class TwigFilter

and

use Twig\TwigFilter as BaseTwigFilter;

class TwigFilter extends BaseTwigFilter

Resulting in

  12     Class Spryker\Shared\Twig\TwigFilter extends final class  
         Twig\TwigFilter.   

Expected output

We would like to ignore this annotation for the time being until we can upgrade away from it.
At the same time we don't want to excludes_analyse the whole class as everything else in there still would be nice to have analyzed.

Is there a way we can add a softer way to exclude this without throwing out the whole file?
Like some config flag?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions