File: |
src/MySQLReplication/Event/RotateEvent.php |
Role: |
Class source |
Content type: |
text/plain |
Description: |
Class source |
Class: |
PHP MySQL Replication
Client to get MySQL replication events in pure PHP |
Author: |
By Kacper Rowinski |
Last change: |
Fix MySQL 8.4.0 and DBAL 4.x compatibility issues (#137)
* fix #115 for mysql 8.0.0
* fix #115 for mysql 8.4.0
* fix #115 for mysql 8.4.0 phpunit test
* fix issue #125
* change to hetao29
* Fix PHP 8.4 deprecation: Implicitly marking parameter as nullable is deprecated, the explicit nullable type must be used instead
* change to krowinski
* Fix maintainer feedback: always return strings from readInt64/unpackUInt64
- 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 #116 regarding MySQL 8.4.0 compatibility.
* Fix DBAL 4.x compatibility issue in testShouldReconnect
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.
* Fix MySQLRepository for DBAL 4.x compatibility
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.
---------
Co-authored-by: hetao <hetao@hetao.name>
Co-authored-by: HeTao <8010298+hetao29@users.noreply.github.com> |
Date: |
21 hours ago |
Size: |
1,050 bytes |
|
|
|