Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Does it work with PHP8.1 ? #185

Open
smknstd opened this issue Feb 6, 2022 · 4 comments
Open

Does it work with PHP8.1 ? #185

smknstd opened this issue Feb 6, 2022 · 4 comments

Comments

@smknstd
Copy link

smknstd commented Feb 6, 2022

Hello ! I'm trying this package with PHP8.1 and everything seems to work so far even if it doesn't look updated since PHP7.4 https://github.com/grimzy/laravel-mysql-spatial/blob/master/.travis.yml#L5

It seems there are some deprecations notices though. Ex:

PHP Deprecated: Return type of Grimzy\LaravelMysqlSpatial\Types\Point::jsonSerialize() should either be compatible with JsonSerializable::jsonSerialize(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /vendor/grimzy/laravel-mysql-spatial/src/Types/Point.php on line 95

@vesper8
Copy link

vesper8 commented Feb 15, 2022

@grimzy It would be great if you tagged a small update taking care of these deprecations before jumping on to the Laravel 9 release, which you already have a PR for. This is because a lot of users will be using Laravel 8 with PHP 8.1 for a long time still before upgrading to Laravel 9.

@smknstd
Copy link
Author

smknstd commented Feb 15, 2022

https://github.com/grimzy/laravel-mysql-spatial/blob/master/composer.json#L18

I think it would be good practice to change for bound php version ; something like :

"require": {
   "php": "^7.4|^8.0",
}

https://getcomposer.org/doc/faqs/why-are-unbound-version-constraints-a-bad-idea.md

@macbookandrew
Copy link

There’s a PR open for this: #189

@jangaraev
Copy link

Have the same issue after switching to PHP8.1.

Return type of Grimzy\LaravelMysqlSpatial\Types\Point::jsonSerialize() should either be compatible with 
JsonSerializable::jsonSerialize(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to
temporarily suppress the notice in vendor/grimzy/laravel-mysql-spatial/src/Types/Point.php on line 95

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants