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

Make nullable parameters explicit in generated entities #11625

Merged

Conversation

derrabus
Copy link
Member

@derrabus derrabus commented Oct 8, 2024

Currently, EntityGenerator might generate methods with implicitly nullable parameters like this:

public function setOtherEntity(OtherEntity $other = null) {

However, this is deprecated in PHP 8.4 and we need to generate the code like this:

public function setOtherEntity(?OtherEntity $other = null) {

@derrabus derrabus added the Bug label Oct 8, 2024
@derrabus derrabus added this to the 2.19.8 milestone Oct 8, 2024
@derrabus
Copy link
Member Author

derrabus commented Oct 8, 2024

ref #11624

@derrabus derrabus merged commit b13564c into doctrine:2.19.x Oct 8, 2024
58 checks passed
@derrabus derrabus deleted the bugfix/entity-generator-nullability branch October 8, 2024 10:25
derrabus added a commit that referenced this pull request Oct 8, 2024
* 2.19.x:
  Make nullable parameters explicit in generated entities (#11625)
  Update attributes-reference.rst
  Bump doctrine/.github from 5.0.1 to 5.1.0 (#11616)
  Move orphan metadata to where it belongs
  PHPStan 1.12 (#11585)
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.

2 participants