Skip to content

Commit

Permalink
Deprecate not-enabling lazy-ghosts and decouple from doctrine/common'…
Browse files Browse the repository at this point in the history
…s proxies
  • Loading branch information
nicolas-grekas committed Jul 12, 2023
1 parent 81ddeb4 commit 12cd909
Show file tree
Hide file tree
Showing 4 changed files with 361 additions and 73 deletions.
26 changes: 26 additions & 0 deletions lib/Doctrine/ORM/ORMInvalidArgumentException.php
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,32 @@ public static function invalidEntityName($entityName)
return new self(sprintf('Entity name must be a string, %s given', get_debug_type($entityName)));
}

/** @param mixed $value */
public static function invalidAutoGenerateMode($value): self
{
return new self(sprintf('Invalid auto generate mode "%s" given.', $value));
}

public static function missingPrimaryKeyValue(string $className, string $idField): self
{
return new self(sprintf('Missing value for primary key %s on %s', $idField, $className));
}

public static function proxyDirectoryRequired(): self
{
return new self('You must configure a proxy directory. See docs for details');
}

public static function proxyNamespaceRequired(): self
{
return new self('You must configure a proxy namespace');
}

public static function proxyDirectoryNotWritable(string $proxyDirectory): self
{
return new self(sprintf('Your proxy directory "%s" must be writable', $proxyDirectory));
}

/**
* Helper method to show an object as string.
*
Expand Down
Loading

0 comments on commit 12cd909

Please sign in to comment.