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

Fix DBAL 4 compatibility #9950

Merged
merged 1 commit into from
Aug 3, 2022
Merged

Conversation

derrabus
Copy link
Member

@derrabus derrabus commented Aug 2, 2022

DBAL 4's switch to enums made some changes necessary. Maybe it would be wise at this point to introduce our own enums for LockMode and ParameterType, to be more resilient to this kind of changes?

@derrabus derrabus added the Bug label Aug 2, 2022
@derrabus derrabus added this to the 4.0.0 milestone Aug 2, 2022
@derrabus derrabus requested review from morozov and greg0ire August 2, 2022 22:44
@derrabus derrabus marked this pull request as ready for review August 2, 2022 22:57
@morozov
Copy link
Member

morozov commented Aug 3, 2022

Maybe it would be wise at this point to introduce our own enums for LockMode and ParameterType, to be more resilient to this kind of changes?

Eventually, similar to the replacement of the DBAL's FetchMode with a set of fetch*() methods (doctrine/dbal#4019), I'd like to make the parameter type enum internal and replace it with the methods like bindInteger(), bindString(), etc in the userland.

On the one hand, it will improve the type safety of the code, on the other, there will be no longer the need to keep the ParameterType::STRING binding type as the default.

morozov
morozov previously approved these changes Aug 3, 2022
@derrabus derrabus force-pushed the bugfix/dbal-4-compat branch 2 times, most recently from 3b71b62 to 7222831 Compare August 3, 2022 08:51
@derrabus derrabus force-pushed the bugfix/dbal-4-compat branch from 7222831 to 4a7264b Compare August 3, 2022 10:38
@derrabus derrabus requested review from greg0ire and morozov August 3, 2022 10:49
@derrabus derrabus modified the milestones: 4.0.0, 3.0.0 Aug 3, 2022
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.

3 participants