Skip to content

Commit

Permalink
Mute psalm Undefined Class errors for classes that has been removed i…
Browse files Browse the repository at this point in the history
…n DBAL 3.x.

Partially fixes doctrine#8884
  • Loading branch information
scyzoryck committed Aug 15, 2021
1 parent aee197f commit dac1a69
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
use BadMethodCallException;
use Doctrine\Common\Collections\Criteria;
use Doctrine\DBAL\DBALException;
use Doctrine\DBAL\Exception;
use Doctrine\ORM\Mapping\ClassMetadata;
use Doctrine\ORM\PersistentCollection;
use Doctrine\ORM\Persisters\SqlValueVisitor;
Expand Down Expand Up @@ -756,6 +757,7 @@ private function getOrderingSql(Criteria $criteria, ClassMetadata $targetClass):

/**
* @throws DBALException
* @throws Exception
*/
private function getLimitSql(Criteria $criteria): string
{
Expand Down
3 changes: 3 additions & 0 deletions lib/Doctrine/ORM/Persisters/Collection/OneToManyPersister.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
use BadMethodCallException;
use Doctrine\Common\Collections\Criteria;
use Doctrine\DBAL\DBALException;
use Doctrine\DBAL\Exception;
use Doctrine\DBAL\Types\Type;
use Doctrine\ORM\PersistentCollection;
use Doctrine\ORM\Utility\PersisterHelper;
Expand Down Expand Up @@ -165,6 +166,7 @@ public function loadCriteria(PersistentCollection $collection, Criteria $criteri

/**
* @throws DBALException
* @throws Exception
*/
private function deleteEntityCollection(PersistentCollection $collection): int
{
Expand Down Expand Up @@ -193,6 +195,7 @@ private function deleteEntityCollection(PersistentCollection $collection): int
* Thanks Steve Ebersole (Hibernate) for idea on how to tackle reliably this scenario, we owe him a beer! =)
*
* @throws DBALException
* @throws Exception
*/
private function deleteJoinedEntityCollection(PersistentCollection $collection): int
{
Expand Down
10 changes: 10 additions & 0 deletions psalm.xml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,17 @@
<referencedClass name="Doctrine\Common\Cache\ApcCache"/>
<referencedClass name="Doctrine\Common\Cache\ArrayCache"/>
<referencedClass name="Doctrine\Common\Cache\XcacheCache"/>
<referencedClass name="Doctrine\DBAL\Driver\ResultStatement"/>
<referencedClass name="Doctrine\DBAL\ForwardCompatibility\Result"/>
<referencedClass name="Doctrine\DBAL\Exception"/>
<referencedClass name="Doctrine\DBAL\DBALException"/>
<referencedClass name="Doctrine\DBAL\Platforms\PostgreSqlPlatform"/>
</errorLevel>
</UndefinedClass>
<DeprecatedMethod>
<errorLevel type="suppress">
<referencedMethod name="Doctrine\DBAL\Connection::getSchemaManager"/>
</errorLevel>
</DeprecatedMethod>
</issueHandlers>
</psalm>

0 comments on commit dac1a69

Please sign in to comment.