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

Account for inversedBy being a non-falsy-string or null #11275

Merged
merged 1 commit into from Feb 20, 2024

Conversation

greg0ire
Copy link
Member

It is supposed to hold the name of a PHP property, and those cannot be falsy strings.

@@ -11,6 +11,8 @@ abstract class OwningSideMapping extends AssociationMapping
* The name of the field that completes the bidirectional association on
* the inverse side. This key must be specified on the owning side of a
* bidirectional association.
*
* @var non-falsy-string|null
Copy link
Member

Choose a reason for hiding this comment

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

The point of this PR was to eliminate the implicit casts of this property to a boolean, right? in that case, I don't understand why we would still need to point out that this string is not falsy.

Copy link
Member Author

Choose a reason for hiding this comment

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

We don't need to, it's more something that is derived from the comment above it, and that makes the rest of the PR OK. Because it's a non falsy string, we don't need to replace the implicit cast with strict comparisons with '' or '0'.

Copy link
Member Author

Choose a reason for hiding this comment

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

Removed it since it serves now purpose besides making this PR slightly easier to understand.

SenseException
SenseException previously approved these changes Feb 19, 2024
It is supposed to hold the name of a PHP property, and those cannot be
falsy strings.
@greg0ire greg0ire merged commit 0c4aac5 into doctrine:3.1.x Feb 20, 2024
64 checks passed
@greg0ire greg0ire deleted the sa-inversed-by branch February 20, 2024 07:13
@greg0ire greg0ire added this to the 3.1.0 milestone Feb 20, 2024
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.

None yet

3 participants