Moving from grimzy / laravel-mysql-spatial on laravel 8
localgituser opened this issue · comments
localgituser commented
Hi,
Apologies if this doesn't belong in issues. I am trying to move to this library with this composer command:
composer require matanyadaev/laravel-eloquent-spatial "^2.0"
But I get the following error:
composer/package-versions-deprecated: Generating version class...
composer/package-versions-deprecated: ...done generating version class
> Illuminate\Foundation\ComposerScripts::postAutoloadDump
> @php artisan package:discover --ansi
PHP Fatal error: Declaration of MatanYadaev\EloquentSpatial\EloquentSpatialServiceProvider::registerDoctrineTypes(Illuminate\Database\Connection $connection): void must be compatible with Illuminate\Database\DatabaseServiceProvider::registerDoctrineTypes() in /Users/kunal/code/opensports/vendor/matanyadaev/laravel-eloquent-spatial/src/EloquentSpatialServiceProvider.php on line 30
In EloquentSpatialServiceProvider.php line 30:
Declaration of MatanYadaev\EloquentSpatial\EloquentSpatialServiceProvider::registerDoctrineTypes(Illuminate\Database\Connection $connection): void must be compatible
with Illuminate\Database\DatabaseServiceProvider::registerDoctrineTypes()
Script @php artisan package:discover --ansi handling the post-autoload-dump event returned with error code 255
Installation failed, reverting ./composer.json and ./composer.lock to their original content.
Any ideas on how to resolve this? Do I need to remove the grimzy / laravel-mysql-spatial
library first and what is the best way to do this in composer?
Thanks heaps.
localgituser commented
Apologies. A simple composer update before installation seems to have resolved this.