summaryrefslogtreecommitdiff
path: root/vendor/doctrine/orm/src/Persisters/PersisterException.php
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/doctrine/orm/src/Persisters/PersisterException.php')
-rw-r--r--vendor/doctrine/orm/src/Persisters/PersisterException.php23
1 files changed, 23 insertions, 0 deletions
diff --git a/vendor/doctrine/orm/src/Persisters/PersisterException.php b/vendor/doctrine/orm/src/Persisters/PersisterException.php
new file mode 100644
index 0000000..0016472
--- /dev/null
+++ b/vendor/doctrine/orm/src/Persisters/PersisterException.php
@@ -0,0 +1,23 @@
1<?php
2
3declare(strict_types=1);
4
5namespace Doctrine\ORM\Persisters;
6
7use Doctrine\ORM\Exception\ORMException;
8use Exception;
9
10use function sprintf;
11
12class PersisterException extends Exception implements ORMException
13{
14 public static function matchingAssocationFieldRequiresObject(string $class, string $associationName): PersisterException
15 {
16 return new self(sprintf(
17 'Cannot match on %s::%s with a non-object value. Matching objects by id is ' .
18 'not compatible with matching on an in-memory collection, which compares objects by reference.',
19 $class,
20 $associationName,
21 ));
22 }
23}