diff options
Diffstat (limited to 'vendor/doctrine/orm/src/Persisters/PersisterException.php')
-rw-r--r-- | vendor/doctrine/orm/src/Persisters/PersisterException.php | 23 |
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 | |||
3 | declare(strict_types=1); | ||
4 | |||
5 | namespace Doctrine\ORM\Persisters; | ||
6 | |||
7 | use Doctrine\ORM\Exception\ORMException; | ||
8 | use Exception; | ||
9 | |||
10 | use function sprintf; | ||
11 | |||
12 | class 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 | } | ||