Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deprecate not-enabling lazy-ghosts and decouple from doctrine/common's proxies #10837

Merged
merged 1 commit into from
Aug 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions lib/Doctrine/ORM/ORMInvalidArgumentException.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
use function get_debug_type;
use function gettype;
use function implode;
use function is_scalar;
use function method_exists;
use function reset;
use function spl_object_id;
Expand Down Expand Up @@ -261,6 +262,32 @@
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 266 in lib/Doctrine/ORM/ORMInvalidArgumentException.php

View check run for this annotation

Codecov / codecov/patch

lib/Doctrine/ORM/ORMInvalidArgumentException.php#L266

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

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

View check run for this annotation

Codecov / codecov/patch

lib/Doctrine/ORM/ORMInvalidArgumentException.php#L268

Added line #L268 was not covered by tests
}

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

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

View check run for this annotation

Codecov / codecov/patch

lib/Doctrine/ORM/ORMInvalidArgumentException.php#L271

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

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

View check run for this annotation

Codecov / codecov/patch

lib/Doctrine/ORM/ORMInvalidArgumentException.php#L273

Added line #L273 was not covered by tests
}

public static function proxyDirectoryRequired(): self

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

View check run for this annotation

Codecov / codecov/patch

lib/Doctrine/ORM/ORMInvalidArgumentException.php#L276

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

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

View check run for this annotation

Codecov / codecov/patch

lib/Doctrine/ORM/ORMInvalidArgumentException.php#L278

Added line #L278 was not covered by tests
}

public static function proxyNamespaceRequired(): self

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

View check run for this annotation

Codecov / codecov/patch

lib/Doctrine/ORM/ORMInvalidArgumentException.php#L281

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

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

View check run for this annotation

Codecov / codecov/patch

lib/Doctrine/ORM/ORMInvalidArgumentException.php#L283

Added line #L283 was not covered by tests
}

public static function proxyDirectoryNotWritable(string $proxyDirectory): self

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

View check run for this annotation

Codecov / codecov/patch

lib/Doctrine/ORM/ORMInvalidArgumentException.php#L286

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

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

View check run for this annotation

Codecov / codecov/patch

lib/Doctrine/ORM/ORMInvalidArgumentException.php#L288

Added line #L288 was not covered by tests
}

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