Team-Tea-Time / laravel-forum

A slim, lean forum package designed for quick and easy integration in Laravel projects
https://laravel-forum.teamteatime.net/
MIT License
601 stars 165 forks source link

Php7.3 does not support type hinting class properties #243

Closed jaymal closed 3 years ago

jaymal commented 3 years ago

Looks like php 7.3 does not support type hinting class properties so whenever we try create a category on freshly installed forum version ~5 we get a ParseError syntax error, unexpected 'string'...

Is there any fix for this or would you rather just remove Php 7.3 from the compose requirements?Any likely solutions?

Riari commented 3 years ago

Good point, I hadn't considered that. Since PHP 7.3 doesn't have active support, I'm inclined to just bump the minimum to 7.4, but I'll re-assess this when it's time to do the first RC or stable release for v5.0. Will keep this issue open until then. Thanks!

jaymal commented 3 years ago

You'd also want to probably update the additional steps of the readme.md to let Laravel 8 users know they have to update the config/forum.integration file value for 'user_model' => App\User::class to 'user_model' => App\Models\User::class. I could open a pull request for that if you'd prefer that though.

Riari commented 3 years ago

Bumped the minimum PHP version to 7.4 and changed the default user_model value to App\Models\User::class in 29a8ec4acf0c145d16e75246ca3726c51ebc0c1f because I think it makes sense to follow the latest Laravel convention by default. Closing this now, but let me know if you have any other feedback! Thanks!