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

upgraded from PHP7.3 to 7.4 warnings arise #100

Closed mattimatti closed 10 months ago

mattimatti commented 1 year ago

Please provide the following details.

Steps required to reproduce the problem.

  1. Just updated to PHP 7.4 from 7.3
PHP Warning
vendor/krowinski/php-mysql-replication/src/MySQLReplication/Event/RowEvent/RowEvent.php:665
bcmul(): bcmath function argument is not well-formed
Jul 18th 2023, 18:06:22 UTC

STACKTRACE

PHP Warning bcmul(): bcmath function argument is not well-formed 
    [internal] bcmul
    vendor/krowinski/php-mysql-replication/src/MySQLReplication/Event/RowEvent/RowEvent.php:665 MySQLReplication\Event\RowEvent\RowEvent::getDecimal
    vendor/krowinski/php-mysql-replication/src/MySQLReplication/Event/RowEvent/RowEvent.php:532 MySQLReplication\Event\RowEvent\RowEvent::getColumnData
    vendor/krowinski/php-mysql-replication/src/MySQLReplication/Event/RowEvent/RowEvent.php:451 MySQLReplication\Event\RowEvent\RowEvent::getValues
    vendor/krowinski/php-mysql-replication/src/MySQLReplication/Event/RowEvent/RowEvent.php:392 MySQLReplication\Event\RowEvent\RowEvent::makeWriteRowsDTO
    vendor/krowinski/php-mysql-replication/src/MySQLReplication/Event/Event.php:92 MySQLReplication\Event\Event::consume
    vendor/krowinski/php-mysql-replication/src/MySQLReplication/MySQLReplicationFactory.php:130 MySQLReplication\MySQLReplicationFactory::consume
    vendor/krowinski/php-mysql-replication/src/MySQLReplication/MySQLReplicationFactory.php:116 MySQLReplication\MySQLReplicationFactory::run
    bin/binlog_listener.php:93 [main]

Expected Result.

Actual Result.

Screenshot 2023-08-11 at 12 16 06
mattimatti commented 1 year ago

Any clue about this warnings? not a big deal.

krowinski commented 10 months ago

Hi, do you provide insert/update and table structure (just column definition) ? or var_dump($res) in \MySQLReplication\Event\RowEvent\RowEvent::getDecimal ?

krowinski commented 10 months ago

reopen if you can provide example data and try new version !