Skip to content

runtothefather/doctrine-psalm-plugin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 

Repository files navigation

doctrine-psalm-plugin

By default psalm doesn't recognize return type for cases like this

$object->getRepository(Entity::class)

where $object can be instance of

Doctrine\Common\Persistence\ObjectManager
Symfony\Bridge\Doctrine\RegistryInterface
Doctrine\Common\Persistence\AbstractManagerRegistry
Doctrine\Common\Persistence\ManagerRegistry

repository class from @ORM\Entity(repositoryClass="Doctrine\Common\Persistence\ObjectRepository") will be returned

Usage

Add into your psalm.xml file into <plugins> section line

<plugin filename="vendor/runtothefather/doctrine-psalm-plugin/src/ReturnTypeProvider/GetRepositoryReturnTypeProvider.php"></plugin>

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages