8000 Make proxyDir and proxyNs nullable and optional by greg0ire · Pull Request #12002 · doctrine/orm · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Make proxyDir and proxyNs nullable and optional #12002

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

Merged
merged 1 commit into from
Jun 19, 2025

Conversation

greg0ire
Copy link
Member

When using native lazy objects, it should be possible to omit these arguments, hence the default value.
Also, when using native lazy objects, one should not have to configure the corresponding Configuration attributes, which means EntityManager__construct() should be able to pass null to this class, hence the nullability.

Fixes #11997

@greg0ire greg0ire force-pushed the relax-type-declarations branch from c3a8500 to b584784 Compare June 17, 2025 19:54

#[RequiresPhp('8.4')]
#[DoesNotPerformAssertions]
public function testProxyFactoryAcceptsNullProxyArgsWhenNativeLazyObjectsAreEnabled(): void
Copy link
Member

Choose a reason for hiding this comment

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

I'd rather see a proxy created by the ProxyFactory than having this test without assertions.

When using native lazy objects, it should be possible to omit these
arguments, hence the default value.
Also, when using native lazy objects, one should not have to configure
the corresponding Configuration attributes, which means
EntityManager__construct() should be able to pass null to this class,
hence the nullability.

Fixes doctrine#11997
@greg0ire greg0ire force-pushed the relax-type-declarations branch from b584784 to 06a9ef1 Compare June 18, 2025 21:24
@greg0ire greg0ire requested a review from SenseException June 18, 2025 21:36
@greg0ire greg0ire added the Bug label Jun 18, 2025
@greg0ire greg0ire added this to the 3.4.1 milestone Jun 19, 2025
@greg0ire greg0ire merged commit 06109f3 into doctrine:3.4.x Jun 19, 2025
85 checks passed
@greg0ire greg0ire deleted the relax-type-declarations branch June 19, 2025 06:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[3.4.0] TypeError from ProxyFactory::__construct() when using native lazy objects
2 participants
0