summaryrefslogtreecommitdiff
path: root/vendor/doctrine/orm/src/Cache/Exception/CannotUpdateReadOnlyCollection.php
blob: 7ecb4fe7b76fbf0716d38522f2d802f15ef28ac1 (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 CannotUpdateReadOnlyCollection extends CacheException
{
    public static function fromEntityAndField(string $sourceEntity, string $fieldName): self
    {
        return new self(sprintf(
            'Cannot update a readonly collection "%s#%s"',
            $sourceEntity,
            $fieldName,
        ));
    }
}