Skip to content

Conversation

@Hanmac
Copy link
Contributor

@Hanmac Hanmac commented Sep 25, 2025

Q A
Branch? 7.4
Bug fix? no
New feature? yes
Deprecations? no
Issues Fix #61807 (comment)
License MIT

@stof
Copy link
Member

stof commented Sep 25, 2025

Introducing such interfaces without updating the id generators of the doctrine-bridge to accept them will not allow using the mock factories

@Hanmac
Copy link
Contributor Author

Hanmac commented Sep 25, 2025

@stof updated the Generator in Doctrine

$ulid = new Ulid('00000000000000000000000000');
$em = (new \ReflectionClass(EntityManager::class))->newInstanceWithoutConstructor();
$factory = $this->createMock(UlidFactory::class);
$factory = $this->createMock(UlidFactoryInterface::class);
Copy link
Contributor

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?

Copy link
Contributor Author

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?

@nicolas-grekas
Copy link
Member

I'm rather 👎 : that's introducing yet more abstractions for not real benefits.

@fabpot
Copy link
Member

fabpot commented Sep 26, 2025

I agree with @nicolas-grekas. Thank you for proposing.

@fabpot fabpot closed this Sep 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants