grimzy/laravel-mysql-spatial

Composer dependency problem with Laravel 8

connysvensson opened this issue · 6 comments

Please update the composer dependencies to allow it to work with Laravel 8 and illuminate/database 8.

Problem 1
- Conclusion: remove grimzy/laravel-mysql-spatial 3.0.0
- Conclusion: don't install grimzy/laravel-mysql-spatial 3.0.0
- Conclusion: don't install laravel/framework v8.0.3
- Conclusion: don't install laravel/framework v8.0.2
- Conclusion: don't install laravel/framework v8.0.1
- Installation request for grimzy/laravel-mysql-spatial ^3.0 -> satisfiable by grimzy/laravel-mysql-spatial[3.0.0, 3.0.x-dev].
- Conclusion: don't install laravel/framework v8.0.0
- grimzy/laravel-mysql-spatial 3.0.x-dev requires illuminate/database ^5.2|^6.0|^7.0 -> satisfiable by laravel/framework[v7.28.1, 5.8.x-dev, 6.x-dev, 7.x-dev], illuminate/database[5.2.x-dev, 5.3.x-dev, 5....

It looks like #145 will address this.

Just release v4.0.0 with Laravel 8 support.

Unfortunately, this version only works with MySQL 8. There's some work to be done to make it work with older MySQL versions.

@grimzy A great news this has been merged!
I've done the exact same modificaiton on the v2.0 and it's correctly working for now.

For those who can't upgrade the MySQL version and still want to use L8: https://github.com/RomainMazB/spatial

No guarantee it will work on complex queries (not tested deeper than the basics).

Thank you @RomainMazB. I'll try to spend some time this week or the next and hopefully get it working for older versions.

@grimzy I'm using Laravel 8 and grimzy ^4.0. I don't get any dependency problems, but I'm taking a Udemy course where the instructor is using grimzy 2.2 and using Laravel 7 (This was about 8 months ago).
With us both having the same code, he doesn't get any issues but I get the following:

"message": "SQLSTATE[42000]: Syntax error or access violation: 1582 Incorrect parameter count in the call to native function 'ST_GeomFromText' (SQL: select * fromuserswhere exists (select * fromdesignswhereusers.id=designs.user_id) and st_distance_sphere(location, ST_GeomFromText(POINT(-75.7031177 45.4235974), 0, 'axis-order=long-lat')) <= 3000 and st_distance_sphere(location, ST_GeomFromText(POINT(-75.7031177 45.4235974), 0, 'axis-order=long-lat')) != 0 order by created_at asc)"

I'm using XAMPP and 10.4.11-MariaDB.
Let me know if you have ideas of how I can fix this issue.
Thank you.