diff options
Diffstat (limited to 'vendor/doctrine/orm/src/Cache/Exception')
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 | |||
3 | declare(strict_types=1); | ||
4 | |||
5 | namespace Doctrine\ORM\Cache\Exception; | ||
6 | |||
7 | use Doctrine\ORM\Cache\CacheException as BaseCacheException; | ||
8 | |||
9 | /** | ||
10 | * Exception for cache. | ||
11 | */ | ||
12 | class 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 | |||
3 | declare(strict_types=1); | ||
4 | |||
5 | namespace Doctrine\ORM\Cache\Exception; | ||
6 | |||
7 | use function sprintf; | ||
8 | |||
9 | class 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 | |||
3 | declare(strict_types=1); | ||
4 | |||
5 | namespace Doctrine\ORM\Cache\Exception; | ||
6 | |||
7 | use function sprintf; | ||
8 | |||
9 | class 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 | |||
3 | declare(strict_types=1); | ||
4 | |||
5 | namespace Doctrine\ORM\Cache\Exception; | ||
6 | |||
7 | class 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 | |||
3 | declare(strict_types=1); | ||
4 | |||
5 | namespace Doctrine\ORM\Cache\Exception; | ||
6 | |||
7 | use function sprintf; | ||
8 | |||
9 | class 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 | |||
3 | declare(strict_types=1); | ||
4 | |||
5 | namespace Doctrine\ORM\Cache\Exception; | ||
6 | |||
7 | use function sprintf; | ||
8 | |||
9 | class 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 | } | ||