-
Notifications
You must be signed in to change notification settings - Fork 11.1k
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
File Cache driver issue introduced in 5.5 when running seeds #21903
Comments
My first thought; does this occur on your own models? Entrust does not, like you've described, support Laravel 5.5 yet. |
I was able to isolate the problem. Entrust is not the problem. If I change the
Since the
However, for some reason, the Exception handling system is catching the BadMethodCallException and and printing the wildly incorrect/misleading message:
As I mentioned, this is seems definitely new to Laravel 5.5, because I've seen the |
Handled in #21929 Thanks |
Description:
When the file cache driver is selected, I sporadically get the following error when running db:seed or migrate:refresh --seed:
I'm quite certain this was introduced in Laravel 5.5. I've been using the same Role Seeder class on several Laravel 5.4 projects, and I first noticed it when I created a Laravel 5.5 project several weeks back.
See my Stack Overflow question for more details on the problem. After several hours, I realized after running cache:clear several times seemed to make the seeder run successfully sometimes. Then I realized switching the cache driver to redis resolved the issue completely.
Steps To Reproduce:
I found the original problem on Linux with the version information specified above, however I created the following Steps using PHP 7.1.10 on Windows 64 bit.
php artisan entrust:migration
, you will get the following error:vendor\zizaco\entrust\src\commands\MigrationCommand.php
and changepublic function fire()
topublic function handle()
php artisan entrust:migration
again.php artisan make:seeder RoleSeeder
database/seeds/RoleSeeder.php
to be the following:php artisan migrate
php artisan db:seed --class=RoleSeeder
CACHE_DRIVER=redis
php artisan db:seed --class=RoleSeeder
. The error will not appear.I put code that demonstrates the problem here: https://github.com/TrieBr/laravel-bug
You should be able to just pull that code and then perform steps 8 through 12 above to demonstrate.
The text was updated successfully, but these errors were encountered: