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

Relax type of identifiers #506

Merged
merged 1 commit into from
Dec 10, 2024
Merged

Conversation

greg0ire
Copy link
Member

@greg0ire greg0ire commented Dec 2, 2024

ORM and ODM and other things having an implementation of ReferenceRepository do not necessarily agree on what an identifier should be.
data-fixtures should not really care either so long as the identifier can be used with serialize().
Let us relax the type of identifers to mixed.

ORM and ODM and other things having an implementation of
ReferenceRepository do not necessarily agree on what an identifier
should be.
data-fixtures should not really care either so long as the identifier can
be used with serialize().
Let us relax the type of identifers to mixed.
@SenseException
Copy link
Member

But doesn't mixed include non-serializable values too? Or do I confuse something with the types?

@greg0ire
Copy link
Member Author

greg0ire commented Dec 3, 2024

It does, but I don't think there is a serializable type in PHP, is there? There is a Serializable interface, but here, we can deal with an array for instance.

Since serialize() accepts mixed, I guess mixed is the best we can do here.

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.

Since serialize() accepts mixed, I guess mixed is the best we can do here.

This is probably the same relict as php functions returning false in case of an error and was transferred to newer PHP versions for compatibility.

@greg0ire greg0ire added this to the 1.8.1 milestone Dec 10, 2024
@greg0ire greg0ire merged commit a367a09 into doctrine:1.8.x Dec 10, 2024
12 checks passed
@greg0ire greg0ire deleted the relax-identity-type branch December 10, 2024 07:00
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