Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.7k
[Uid] Use Interfaces for Factories#61842
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
Hanmac commentedSep 25, 2025
| Q | A |
|---|---|
| Branch? | 7.4 |
| Bug fix? | no |
| New feature? | yes |
| Deprecations? | no |
| Issues | Fix#61807 (comment) |
| License | MIT |
Introducing such interfaces without updating the id generators of the doctrine-bridge to accept them will not allow using the mock factories |
@stof updated the Generator in Doctrine |
| $ulid =newUlid('00000000000000000000000000'); | ||
| $em = (new \ReflectionClass(EntityManager::class))->newInstanceWithoutConstructor(); | ||
| $factory =$this->createMock(UlidFactory::class); | ||
| $factory =$this->createMock(UlidFactoryInterface::class); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Can't we use the mockfactory here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Maybe? Can you link me an example?
I'm rather 👎 : that's introducing yet more abstractions for not real benefits. |
I agree with@nicolas-grekas. Thank you for proposing. |