summaryrefslogtreecommitdiff
path: root/vendor/doctrine/orm/src/Cache/Exception/NonCacheableEntity.php
blob: 4f5da85ac0e985a7c4cacb0a95860b4de93aae50 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
<?php

declare(strict_types=1);

namespace Doctrine\ORM\Cache\Exception;

use function sprintf;

class NonCacheableEntity extends CacheException
{
    public static function fromEntity(string $entityName): self
    {
        return new self(sprintf(
            'Entity "%s" not configured as part of the second-level cache.',
            $entityName,
        ));
    }
}