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

Enforce native type declarations #11013

Merged
merged 2 commits into from
Oct 22, 2023
Merged

Conversation

greg0ire
Copy link
Member

@greg0ire greg0ire commented Oct 15, 2023

I tried to avoid changes in tests, so as to not unnecessarily widen the
gap between 2.x and 3.x.

@greg0ire greg0ire force-pushed the native-type-decl branch 2 times, most recently from ae8af1a to b13462e Compare October 21, 2023 19:55
@greg0ire greg0ire changed the title Add native type declarations Enforce native type declarations Oct 21, 2023
@greg0ire greg0ire marked this pull request as ready for review October 21, 2023 19:57
phpcs.xml.dist Outdated Show resolved Hide resolved
This requires heavily adapting tests, because the proxy instance must:
- be an instance of InternalProxy (easy)
- be a valid entity (hard, especially for PHPUnit)
I tried to avoid changes in tests, so as to not unnecessarily widen the
gap between 2.x and 3.x.

return parent::getProxy($className, $identifier);
}
};
Copy link
Member Author

Choose a reason for hiding this comment

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

@derrabus I pushed a new commit, it reworks this test and the one below, allowing to use a native return type declaration for ProxyFactory::getProxy()

Copy link
Member

@SenseException SenseException left a comment

Choose a reason for hiding this comment

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

I flew over the changes and they seem to fit. 👍

@greg0ire greg0ire merged commit 73288bc into doctrine:3.0.x Oct 22, 2023
64 checks passed
@greg0ire greg0ire deleted the native-type-decl branch October 22, 2023 21:19
@greg0ire greg0ire added this to the 3.0.0 milestone Oct 22, 2023
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 participants