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

Implement isUninitializedObject() in ObjectManagerDecorator #369

Merged
merged 1 commit into from
May 24, 2024

Conversation

greg0ire
Copy link
Member

@greg0ire greg0ire commented May 22, 2024

That method will be part of the ObjectManager interface in 4.0.x.

It was introduced in #334

@greg0ire greg0ire force-pushed the implement-is-uninitialized branch 2 times, most recently from 2fe2930 to d600776 Compare May 22, 2024 19:45
@greg0ire greg0ire force-pushed the implement-is-uninitialized branch 3 times, most recently from 028216b to 4ca86df Compare May 22, 2024 19:58
@greg0ire greg0ire changed the base branch from 3.4.x to 4.0.x May 22, 2024 19:59
@greg0ire greg0ire changed the base branch from 4.0.x to 3.4.x May 22, 2024 19:59
@greg0ire greg0ire force-pushed the implement-is-uninitialized branch from 4ca86df to 9c9c61a Compare May 22, 2024 20:00
@@ -30,7 +30,7 @@
"phpstan/phpstan-strict-rules": "^1.1",
"doctrine/coding-standard": "^12",
"doctrine/common": "^3.0",
"phpunit/phpunit": "^8.5 || ^9.5",
"phpunit/phpunit": "^8.5.38 || ^9.5",
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

old versions of PHPUnit seem to struggle with @requires annotation that are included in a single-line comment.

@greg0ire greg0ire added the Enhancement New feature or request label May 22, 2024
@greg0ire greg0ire marked this pull request as draft May 23, 2024 05:52
@greg0ire greg0ire force-pushed the implement-is-uninitialized branch 2 times, most recently from 813353a to 2f0e733 Compare May 23, 2024 06:15
That method will be part of the ObjectManager interface in 4.0.x.
@greg0ire greg0ire force-pushed the implement-is-uninitialized branch from 2f0e733 to 0adca4c Compare May 23, 2024 06:17
@greg0ire greg0ire marked this pull request as ready for review May 23, 2024 06:50
throw new BadMethodCallException(sprintf(
<<<'EXCEPTION'
Context: Trying to call %s
Problem: The wrapped ObjectManager, an instance of %s does not implement this method.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

__METHOD__ does also contain the FQCN. You could shorten the "instance of" Exception text if you like.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not really, since the FQCN at hand is not the same as the one referred to in the "Problem" part. In the context part, I say we are calling the decorator, in the problem part, I talk about the decorated class.

@greg0ire greg0ire added this to the 3.4.0 milestone May 24, 2024
@greg0ire greg0ire merged commit e66e37b into doctrine:3.4.x May 24, 2024
14 checks passed
@greg0ire greg0ire deleted the implement-is-uninitialized branch May 24, 2024 21:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants