Skip to content

Document methods Type::closureToMongo() and closureToPHP()#2855

Merged
GromNaN merged 1 commit intodoctrine:2.13.xfrom
GromNaN:doc-type-closure
Oct 15, 2025
Merged

Document methods Type::closureToMongo() and closureToPHP()#2855
GromNaN merged 1 commit intodoctrine:2.13.xfrom
GromNaN:doc-type-closure

Conversation

@GromNaN
Copy link
Member

@GromNaN GromNaN commented Oct 14, 2025

Q A
Type improvement
BC Break no
Fixed issues #2854 (comment)

@GromNaN GromNaN added this to the 2.13.0 milestone Oct 14, 2025
@GromNaN GromNaN requested a review from paulinevos October 14, 2025 13:00
* Get the PHP code equivalent to {@see convertToDatabaseValue()}, used in code generator.
* Use variables $value for input and $return for output.
*/
public function closureToMongo(): string
Copy link
Member Author

Choose a reason for hiding this comment

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

This method is not actually used, it could be deprecated but we could decide to use it later in the persistence layer.

* Get the PHP code equivalent to {@see convertToPHPValue()}, used in code generator.
* Use variables $value for input and $return for output.
*/
public function closureToPHP(): string
Copy link
Member Author

Choose a reason for hiding this comment

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

This method is used in HydratorFactory. I don't specify it here, as that can change. The IDE/SA can easily find usages of this methods.

@GromNaN GromNaN merged commit 2b61983 into doctrine:2.13.x Oct 15, 2025
23 checks passed
@GromNaN GromNaN deleted the doc-type-closure branch October 15, 2025 09:21
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