krowinski / php-mysql-replication

Pure PHP Implementation of MySQL replication protocol. This allow you to receive event like insert, update, delete with their data and raw SQL queries.
MIT License
323 stars 98 forks source link

PHP 8.1: spammed with warnings #89

Closed quakemmo closed 10 months ago

quakemmo commented 2 years ago

Great job, this is a very useful piece of code. Small issue here with PHP 8.1:

Steps required to reproduce the problem.

1. Run the dump_events.php
2. Get spammed by deprecated warnings

Expected Result. Not get spammed by warnings

Actual Result.

Return type of MySQLReplication\Event\EventInfo::jsonSerialize() should either be compatible with JsonSerializable::jsonSerialize(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /<path>/vendor/krowinski/php-mysql-replication/src/MySQLReplication/Event/EventInfo.php on line 100
Moln commented 1 year ago

You can try this fork https://github.com/Moln/php-mysql-replication .

Resolve these issues:

krowinski commented 10 months ago

8.1 no more supported move to 8.2 with version #104