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 b5e9857
Show file tree
Hide file tree
Showing 4 changed files with 318 additions and 78 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

Check warning on line 265 in lib/Doctrine/ORM/ORMInvalidArgumentException.php

View check run for this annotation

Codecov / codecov/patch

lib/Doctrine/ORM/ORMInvalidArgumentException.php#L265

Added line #L265 was not covered by tests
{
return new self(sprintf('Invalid auto generate mode "%s" given.', $value));

Check warning on line 267 in lib/Doctrine/ORM/ORMInvalidArgumentException.php

View check run for this annotation

Codecov / codecov/patch

lib/Doctrine/ORM/ORMInvalidArgumentException.php#L267

Added line #L267 was not covered by tests
}

public static function missingPrimaryKeyValue(string $className, string $idField): self

Check warning on line 270 in lib/Doctrine/ORM/ORMInvalidArgumentException.php

View check run for this annotation

Codecov / codecov/patch

lib/Doctrine/ORM/ORMInvalidArgumentException.php#L270

Added line #L270 was not covered by tests
{
return new self(sprintf('Missing value for primary key %s on %s', $idField, $className));

Check warning on line 272 in lib/Doctrine/ORM/ORMInvalidArgumentException.php

View check run for this annotation

Codecov / codecov/patch

lib/Doctrine/ORM/ORMInvalidArgumentException.php#L272

Added line #L272 was not covered by tests
}

public static function proxyDirectoryRequired(): self

Check warning on line 275 in lib/Doctrine/ORM/ORMInvalidArgumentException.php

View check run for this annotation

Codecov / codecov/patch

lib/Doctrine/ORM/ORMInvalidArgumentException.php#L275

Added line #L275 was not covered by tests
{
return new self('You must configure a proxy directory. See docs for details');

Check warning on line 277 in lib/Doctrine/ORM/ORMInvalidArgumentException.php

View check run for this annotation

Codecov / codecov/patch

lib/Doctrine/ORM/ORMInvalidArgumentException.php#L277

Added line #L277 was not covered by tests
}

public static function proxyNamespaceRequired(): self

Check warning on line 280 in lib/Doctrine/ORM/ORMInvalidArgumentException.php

View check run for this annotation

Codecov / codecov/patch

lib/Doctrine/ORM/ORMInvalidArgumentException.php#L280

Added line #L280 was not covered by tests
{
return new self('You must configure a proxy namespace');

Check warning on line 282 in lib/Doctrine/ORM/ORMInvalidArgumentException.php

View check run for this annotation

Codecov / codecov/patch

lib/Doctrine/ORM/ORMInvalidArgumentException.php#L282

Added line #L282 was not covered by tests
}

public static function proxyDirectoryNotWritable(string $proxyDirectory): self

Check warning on line 285 in lib/Doctrine/ORM/ORMInvalidArgumentException.php

View check run for this annotation

Codecov / codecov/patch

lib/Doctrine/ORM/ORMInvalidArgumentException.php#L285

Added line #L285 was not covered by tests
{
return new self(sprintf('Your proxy directory "%s" must be writable', $proxyDirectory));

Check warning on line 287 in lib/Doctrine/ORM/ORMInvalidArgumentException.php

View check run for this annotation

Codecov / codecov/patch

lib/Doctrine/ORM/ORMInvalidArgumentException.php#L287

Added line #L287 was not covered by tests
}

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

0 comments on commit b5e9857

Please sign in to comment.