Closed dualklip closed 3 years ago
Released under v3.0.0
Thank you for your approval!
@dualklip Hi! Which version of Nova are you running?
We are now getting the opposite problem after this commit :-) On PHP 7.4 and PHP 8.0
Symfony\Component\ErrorHandler\Error\FatalError: Type of Vyuldashev\NovaPermission\Role::$title must not be defined (as in class Laravel\Nova\Resource) in file /vendor/vyuldashev/nova-permission/src/Role.php on line 0
For example: Checking the nova source for Resource.php:
/**
* The single value that should be used to represent the resource when being displayed.
*
* @var string
*/
public static $title = 'id';
and Role.php after this PR:
/**
* The single value that should be used to represent the resource when being displayed.
*
* @var string
*/
public static string $title = 'name';
Are your version of Nova Resource.php typehinted? Or am I missing something here?
Hi @argia-andreas
You are right! In the issue #160 we are discussing about how revert the fix, because after the Nova 3.25.0 the type hinting is not needed any more.
I'm waiting an answer from @vyuldashev to know how to proceed, in the meantime you can block the composer to the v2.11.1 tag which is working on the Nova 3.25.0
composer require vyuldashev/nova-permission:v2.11.1
Ok, great! Thanks for the quick answer! :-) I'm not crazy then :-) I was looking through different versions on Nova expecting to find it typehinted in one of them. But couldn't find it. Missed the one version where it was typehinted 🙄
Didn't see #160.
Then we'll just wait for a fix to be decided upon.
If the project is running on PHP 7.4 appears errors related with variables not types
This PR fix the issue in PHP 7.4