Skip to content

Symfony\Config\FrameworkConfig not found (phpstan error) #42342

Closed
@ThomasLandauer

Description

@ThomasLandauer

Symfony version(s) affected: 5.3.6

Description
With this being my config/packages/mailer.php:

<?php declare(strict_types=1);

use Symfony\Config\FrameworkConfig;

return static function (FrameworkConfig $framework): void
{
    $framework->mailer()
        ->transport(...)
    ;
};

... phpstan is reporting:

Parameter $framework of anonymous function has invalid typehint type Symfony\Config\FrameworkConfig.

Possible Solution
There's a similar issue over at phpstan, with a proposed solution:
phpstan/phpstan#5189 (comment)

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