runtothefather/doctrine-psalm-plugin
Composer 安装命令:
composer require --dev runtothefather/doctrine-psalm-plugin
包简介
Repository resolver to show psalm how to resolve getRepository method
关键字:
README 文档
README
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>
统计信息
- 总下载量: 6.31k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 7
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2020-01-10