We are noticing a weird issue in Laravel 8 with PHP 7.4 version.
When we save data to the Mysql db, it is storing garbage value.
An example data:
$product = Product::create([
'product_id' => 6791044858042,
'inventory_id' => 42309695242426
]);
The same is happening using $product = new Product();
The value in the DB is
"product_id":"701563066","inventory_id":"-27590470"
When we log the $product in the file just after saving, it has the correct value. The data is not re-saved and the data modified is notified either.
Inspected the max integer value for the column in db schema. It has bigint(20), I did change it to biging(100) and even varchar(255), yet it is the same result.
Further the garbage value is random and not a fixed value.
I had changed it back to 7.3 in the server and it seems fine.
Any one has faced the issue before?