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

declare(strict_types=1);

namespace Doctrine\ORM\Cache\Exception;

use function sprintf;

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