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

Bigint are casted to int (if possible) for DBAL 4 #484

Closed
VincentLanglet opened this issue Nov 8, 2023 · 4 comments
Closed

Bigint are casted to int (if possible) for DBAL 4 #484

VincentLanglet opened this issue Nov 8, 2023 · 4 comments

Comments

@VincentLanglet
Copy link
Contributor

VincentLanglet commented Nov 8, 2023

With doctrine/dbal#6177, the bigint will now be casted to int by doctrine.
So I assume the BigIntType will need to be updated for Doctrine 4.

I assume

return TypeCombinator::intersect(new StringType(), new AccessoryNumericStringType());

need to be changed at least from numeric-string to numeric "if DBAL version is 4".

Or should it be BenevolentUnion(int, numeric) because most of users use them for small enough values (?).

@ondrejmirtes
Copy link
Member

Relevant discussion: doctrine/dbal#6177 (comment)

@VincentLanglet
Copy link
Contributor Author

Relevant discussion: doctrine/dbal#6177 (comment)

If I understand correctly the discussion, the bigint is

  • An int on PHP 64 bit
  • An int on PHP 32 bit if not UNSIGNED.
  • An int|numeric-string on PHP 32 bit if UNSIGNED.

@ondrejmirtes
Copy link
Member

Implemented: 719a8f4

Copy link

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 13, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants