-
Notifications
You must be signed in to change notification settings - Fork 103
Fix MySQL 8.4.0 and DBAL 4.x compatibility issues #137
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
Merged
+44
−50
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…deprecated, the explicit nullable type must be used instead
…Int64 - Changed readInt64() to always return string instead of string|int - Changed unpackUInt64() to always return string instead of string|int - Changed readUInt64() return type to string for consistency - Applied code style fixes with composer cs:fix - Fixes failing tests: testShouldReadInt64 and testShouldPack64bit Addresses maintainer feedback from PR krowinski#116 regarding MySQL 8.4.0 compatibility.
In DBAL 4.x, Doctrine\DBAL\Exception became an interface instead of a concrete class. The test was trying to instantiate 'new Exception('')' which fails with 'Cannot instantiate interface Doctrine\DBAL\Exception'. Fixed by using ConnectionException mock which implements the Exception interface, preserving the exact same test logic and coverage as the original DBAL 3.x version.
Remove manual connection reconnection logic since DBAL 4.x handles reconnection automatically. The connect() method became protected in DBAL 4.x, causing 'Call to protected method' errors. Changes: - Removed manual ping/close/connect logic from getConnection() - DBAL 4.x automatically handles lost connections and reconnection - Kept ping() method as required by PingableConnection interface This fixes the repository to work with DBAL 4.x while maintaining the same functionality.
@krowinski please try to run tests and see if it passes. |
tx |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR addresses the maintainer feedback from #116 and fixes additional compatibility issues:
Maintainer Feedback Addressed:
readInt64()
andunpackUInt64()
to always return strings as requestedcomposer cs:fix
DBAL 4.x Compatibility Issues Fixed:
Cannot instantiate interface Doctrine\DBAL\Exception
test errorCall to protected method connect()
repository errorRelated: