Closed mrself closed 3 years ago
The error says that DataType::$table must be a string, which it is: https://github.com/the-control-group/voyager/blob/v1.4.2/src/Models/DataType.php#L18
My only guess is you changed something (likely inadvertently).
Sorry, maybe I do not understand something. Here it is what I see:
As you can see, there is no type hint for the $table
. And this causes an error. Because the parent class (Illuminate\Database\Eloquent\Model
) has a type hint for this property:
I am not sure, but looks like my version of php does not allow such a case. Any class should follow property declaration of the parent one. However, I found on the docs, that php 7.4 is supported:
https://voyager-docs.devdojo.com/getting-started/prerequisites
Additionally Voyager requires you to use PHP 7.3 or newer.
That's strange, I don't see any type hint in source code https://github.com/illuminate/database/blob/v8.17.2/Eloquent/Model.php#L46
Are you using PhpStorm as IDE?
Yes, you are right. This was caused by PhpStorm. I just removed the vendor
folder and reinstalled all packages. And it worked. Thank you.
This issue has been automatically locked since there has not been any recent activity after it was closed. If you have further questions please ask in our Slack group.
Version information
Description
Can not install the latest version (1.4) on Laravel 8.17.2
Steps To Reproduce
Steps to reproduce the behavior:
composer require tcg/voyager:1.4.*
Expected behavior
Expect no errors