summaryrefslogtreecommitdiff
path: root/vendor/doctrine/orm/src/Cache/Exception
diff options
context:
space:
mode:
authorpolo <ordipolo@gmx.fr>2024-08-13 23:45:21 +0200
committerpolo <ordipolo@gmx.fr>2024-08-13 23:45:21 +0200
commitbf6655a534a6775d30cafa67bd801276bda1d98d (patch)
treec6381e3f6c81c33eab72508f410b165ba05f7e9c /vendor/doctrine/orm/src/Cache/Exception
parent94d67a4b51f8e62e7d518cce26a526ae1ec48278 (diff)
downloadAppliGestionPHP-bf6655a534a6775d30cafa67bd801276bda1d98d.zip
VERSION 0.2 doctrine ORM et entités
Diffstat (limited to 'vendor/doctrine/orm/src/Cache/Exception')
-rw-r--r--vendor/doctrine/orm/src/Cache/Exception/CacheException.php14
-rw-r--r--vendor/doctrine/orm/src/Cache/Exception/CannotUpdateReadOnlyCollection.php19
-rw-r--r--vendor/doctrine/orm/src/Cache/Exception/CannotUpdateReadOnlyEntity.php15
-rw-r--r--vendor/doctrine/orm/src/Cache/Exception/FeatureNotImplemented.php23
-rw-r--r--vendor/doctrine/orm/src/Cache/Exception/NonCacheableEntity.php18
-rw-r--r--vendor/doctrine/orm/src/Cache/Exception/NonCacheableEntityAssociation.php19
6 files changed, 108 insertions, 0 deletions
diff --git a/vendor/doctrine/orm/src/Cache/Exception/CacheException.php b/vendor/doctrine/orm/src/Cache/Exception/CacheException.php
new file mode 100644
index 0000000..cae1bde
--- /dev/null
+++ b/vendor/doctrine/orm/src/Cache/Exception/CacheException.php
@@ -0,0 +1,14 @@
1<?php
2
3declare(strict_types=1);
4
5namespace Doctrine\ORM\Cache\Exception;
6
7use Doctrine\ORM\Cache\CacheException as BaseCacheException;
8
9/**
10 * Exception for cache.
11 */
12class CacheException extends BaseCacheException
13{
14}
diff --git a/vendor/doctrine/orm/src/Cache/Exception/CannotUpdateReadOnlyCollection.php b/vendor/doctrine/orm/src/Cache/Exception/CannotUpdateReadOnlyCollection.php
new file mode 100644
index 0000000..7ecb4fe
--- /dev/null
+++ b/vendor/doctrine/orm/src/Cache/Exception/CannotUpdateReadOnlyCollection.php
@@ -0,0 +1,19 @@
1<?php
2
3declare(strict_types=1);
4
5namespace Doctrine\ORM\Cache\Exception;
6
7use function sprintf;
8
9class CannotUpdateReadOnlyCollection extends CacheException
10{
11 public static function fromEntityAndField(string $sourceEntity, string $fieldName): self
12 {
13 return new self(sprintf(
14 'Cannot update a readonly collection "%s#%s"',
15 $sourceEntity,
16 $fieldName,
17 ));
18 }
19}
diff --git a/vendor/doctrine/orm/src/Cache/Exception/CannotUpdateReadOnlyEntity.php b/vendor/doctrine/orm/src/Cache/Exception/CannotUpdateReadOnlyEntity.php
new file mode 100644
index 0000000..b945514
--- /dev/null
+++ b/vendor/doctrine/orm/src/Cache/Exception/CannotUpdateReadOnlyEntity.php
@@ -0,0 +1,15 @@
1<?php
2
3declare(strict_types=1);
4
5namespace Doctrine\ORM\Cache\Exception;
6
7use function sprintf;
8
9class CannotUpdateReadOnlyEntity extends CacheException
10{
11 public static function fromEntity(string $entityName): self
12 {
13 return new self(sprintf('Cannot update a readonly entity "%s"', $entityName));
14 }
15}
diff --git a/vendor/doctrine/orm/src/Cache/Exception/FeatureNotImplemented.php b/vendor/doctrine/orm/src/Cache/Exception/FeatureNotImplemented.php
new file mode 100644
index 0000000..8767d57
--- /dev/null
+++ b/vendor/doctrine/orm/src/Cache/Exception/FeatureNotImplemented.php
@@ -0,0 +1,23 @@
1<?php
2
3declare(strict_types=1);
4
5namespace Doctrine\ORM\Cache\Exception;
6
7class FeatureNotImplemented extends CacheException
8{
9 public static function scalarResults(): self
10 {
11 return new self('Second level cache does not support scalar results.');
12 }
13
14 public static function multipleRootEntities(): self
15 {
16 return new self('Second level cache does not support multiple root entities.');
17 }
18
19 public static function nonSelectStatements(): self
20 {
21 return new self('Second-level cache query supports only select statements.');
22 }
23}
diff --git a/vendor/doctrine/orm/src/Cache/Exception/NonCacheableEntity.php b/vendor/doctrine/orm/src/Cache/Exception/NonCacheableEntity.php
new file mode 100644
index 0000000..4f5da85
--- /dev/null
+++ b/vendor/doctrine/orm/src/Cache/Exception/NonCacheableEntity.php
@@ -0,0 +1,18 @@
1<?php
2
3declare(strict_types=1);
4
5namespace Doctrine\ORM\Cache\Exception;
6
7use function sprintf;
8
9class NonCacheableEntity extends CacheException
10{
11 public static function fromEntity(string $entityName): self
12 {
13 return new self(sprintf(
14 'Entity "%s" not configured as part of the second-level cache.',
15 $entityName,
16 ));
17 }
18}
diff --git a/vendor/doctrine/orm/src/Cache/Exception/NonCacheableEntityAssociation.php b/vendor/doctrine/orm/src/Cache/Exception/NonCacheableEntityAssociation.php
new file mode 100644
index 0000000..984286f
--- /dev/null
+++ b/vendor/doctrine/orm/src/Cache/Exception/NonCacheableEntityAssociation.php
@@ -0,0 +1,19 @@
1<?php
2
3declare(strict_types=1);
4
5namespace Doctrine\ORM\Cache\Exception;
6
7use function sprintf;
8
9class NonCacheableEntityAssociation extends CacheException
10{
11 public static function fromEntityAndField(string $entityName, string $field): self
12 {
13 return new self(sprintf(
14 'Entity association field "%s#%s" not configured as part of the second-level cache.',
15 $entityName,
16 $field,
17 ));
18 }
19}