8000 Deprecate calling setters without arguments by derrabus · Pull Request #9791 · doctrine/orm · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Deprecate calling setters without arguments #9791

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

Conversation

derrabus
Copy link
Member

Calling a setter without anything to set does not really make sense semantically. However, declaring null as the default value for a parameter used to be a common workaround to get a nullable typed parameter. This workaround is obsolete since PHP 7.1 introduced actual nullable types.

This is why I'd like to get rid of those default values on setters.

@derrabus derrabus added this to the 2.13.0 milestone May 25, 2022
@derrabus derrabus requested a review from greg0ire May 25, 2022 14:52
@derrabus derrabus force-pushed the deprecate/setters-without-arguments branch from 21c2baa to 1c8e9b9 Compare May 30, 2022 18:31
@derrabus derrabus requested a review from greg0ire May 30, 2022 18:31
@derrabus derrabus merged commit a559563 into doctrine:2.13.x May 30, 2022
@derrabus derrabus deleted the deprecate/setters-without-arguments branch May 30, 2022 18:39
derrabus added a commit to derrabus/orm that referenced this pull request May 30, 2022
* 2.13.x:
  Add missing import (doctrine#9796)
  Deprecate calling setters without arguments (doctrine#9791)
  Move duplicate fixture into dedicated file (doctrine#9789)
  MockTreeWalker should be an SqlWalker (doctrine#9790)
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.

2 participants
0