grimzy/laravel-mysql-spatial

Type error

pokhiii opened this issue · 1 comments

Return value of Grimzy\LaravelMysqlSpatial\Types\Point::jsonSerialize() must be an instance of Grimzy\LaravelMysqlSpatial\Types\mixed, instance of GeoJson\Geometry\Point returned {"userId":57666,"exception":"[object] (TypeError(code: 0): Return value of Grimzy\LaravelMysqlSpatial\Types\Point::jsonSerialize() must be an instance of Grimzy\LaravelMysqlSpatial\Types\mixed, instance of GeoJson\Geometry\Point returned at /var/www/html/my-app/vendor/grimzy/laravel-mysql-spatial/src/Types/Point.php:95)

PHP 8.0 updated the default for error_reporting: https://php.watch/versions/8.0/error-display-E_ALL
As a short term fix you can update error_reporting=E_ALL to error_reporting = E_ALL & ~E_DEPRECATED & ~E_STRICT in php.ini. Research the implication though.