vendredi 24 novembre 2017

ReflectionException (-1) Class TableSeeder does not exist error in Laravel 5.4

I added a new migration and seed and when I run php atisan migrate:refresh --seed I get a [ReflectionException] Class WhateverTableSeeder does not exist on a previous (already working) Seeder. But the class does exist, it was working fine.

It throws an error on a previous Seeder that has been working fine and unchanged.

I have tried the following: composer dump-autoload, php artisan config:cache, php artisan config:clear, php artisan cache:clear and php artisan optimize.

I've even deleted the codebase, re-cloned, etc and still getting the problem.

I deleted all the seeds and manually added them in. Then after 10 or so, the error will return on a class that was OK (3-4 back up the list) when I haven't changed anything in that file.

Here is a stack trace on php artisan migrate:refresh --seed -v.

[ReflectionException (-1)]                   
Class ReleaseLinkTableSeeder does not exist  


Exception trace:
 () at /home/vagrant/Code/vibecast-api/vendor/laravel/framework/src/Illuminate/Container/Container.php:729
 ReflectionClass->__construct() at /home/vagrant/Code/vibecast-api/vendor/laravel/framework/src/Illuminate/Container/Container.php:729
 Illuminate\Container\Container->build() at /home/vagrant/Code/vibecast-api/vendor/laravel/framework/src/Illuminate/Container/Container.php:608
 Illuminate\Container\Container->resolve() at /home/vagrant/Code/vibecast-api/vendor/laravel/framework/src/Illuminate/Container/Container.php:575
 Illuminate\Container\Container->make() at /home/vagrant/Code/vibecast-api/vendor/laravel/framework/src/Illuminate/Foundation/Application.php:728
 Illuminate\Foundation\Application->make() at /home/vagrant/Code/vibecast-api/vendor/laravel/framework/src/Illuminate/Database/Seeder.php:60
 Illuminate\Database\Seeder->resolve() at /home/vagrant/Code/vibecast-api/vendor/laravel/framework/src/Illuminate/Database/Seeder.php:37
 Illuminate\Database\Seeder->call() at /home/vagrant/Code/vibecast-api/database/seeds/DatabaseSeeder.php:25
 DatabaseSeeder->run() at n/a:n/a
 call_user_func_array() at /home/vagrant/Code/vibecast-api/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php:29
 Illuminate\Container\BoundMethod::Illuminate\Container\{closure}() at /home/vagrant/Code/vibecast-api/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php:87
 Illuminate\Container\BoundMethod::callBoundMethod() at /home/vagrant/Code/vibecast-api/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php:31
 Illuminate\Container\BoundMethod::call() at /home/vagrant/Code/vibecast-api/vendor/laravel/framework/src/Illuminate/Container/Container.php:539
 Illuminate\Container\Container->call() at /home/vagrant/Code/vibecast-api/vendor/laravel/framework/src/Illuminate/Database/Seeder.php:114
 Illuminate\Database\Seeder->__invoke() at /home/vagrant/Code/vibecast-api/vendor/laravel/framework/src/Illuminate/Database/Console/Seeds/SeedCommand.php:63
 Illuminate\Database\Console\Seeds\SeedCommand->Illuminate\Database\Console\Seeds\{closure}() at /home/vagrant/Code/vibecast-api/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Concerns/GuardsAttributes.php:122
 Illuminate\Database\Eloquent\Model::unguarded() at /home/vagrant/Code/vibecast-api/vendor/laravel/framework/src/Illuminate/Database/Console/Seeds/SeedCommand.php:64
 Illuminate\Database\Console\Seeds\SeedCommand->fire() at n/a:n/a
 call_user_func_array() at /home/vagrant/Code/vibecast-api/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php:29
 Illuminate\Container\BoundMethod::Illuminate\Container\{closure}() at /home/vagrant/Code/vibecast-api/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php:87
 Illuminate\Container\BoundMethod::callBoundMethod() at /home/vagrant/Code/vibecast-api/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php:31
 Illuminate\Container\BoundMethod::call() at /home/vagrant/Code/vibecast-api/vendor/laravel/framework/src/Illuminate/Container/Container.php:539
 Illuminate\Container\Container->call() at /home/vagrant/Code/vibecast-api/vendor/laravel/framework/src/Illuminate/Console/Command.php:182
 Illuminate\Console\Command->execute() at /home/vagrant/Code/vibecast-api/vendor/symfony/console/Command/Command.php:240
 Symfony\Component\Console\Command\Command->run() at /home/vagrant/Code/vibecast-api/vendor/laravel/framework/src/Illuminate/Console/Command.php:167
 Illuminate\Console\Command->run() at /home/vagrant/Code/vibecast-api/vendor/laravel/framework/src/Illuminate/Console/Command.php:197
 Illuminate\Console\Command->call() at /home/vagrant/Code/vibecast-api/vendor/laravel/framework/src/Illuminate/Database/Console/Migrations/RefreshCommand.php:129
 Illuminate\Database\Console\Migrations\RefreshCommand->runSeeder() at /home/vagrant/Code/vibecast-api/vendor/laravel/framework/src/Illuminate/Database/Console/Migrations/RefreshCommand.php:68
 Illuminate\Database\Console\Migrations\RefreshCommand->fire() at n/a:n/a
 call_user_func_array() at /home/vagrant/Code/vibecast-api/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php:29
 Illuminate\Container\BoundMethod::Illuminate\Container\{closure}() at /home/vagrant/Code/vibecast-api/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php:87
 Illuminate\Container\BoundMethod::callBoundMethod() at /home/vagrant/Code/vibecast-api/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php:31
 Illuminate\Container\BoundMethod::call() at /home/vagrant/Code/vibecast-api/vendor/laravel/framework/src/Illuminate/Container/Container.php:539
 Illuminate\Container\Container->call() at /home/vagrant/Code/vibecast-api/vendor/laravel/framework/src/Illuminate/Console/Command.php:182
 Illuminate\Console\Command->execute() at /home/vagrant/Code/vibecast-api/vendor/symfony/console/Command/Command.php:240
 Symfony\Component\Console\Command\Command->run() at /home/vagrant/Code/vibecast-api/vendor/laravel/framework/src/Illuminate/Console/Command.php:167
 Illuminate\Console\Command->run() at /home/vagrant/Code/vibecast-api/vendor/symfony/console/Application.php:858
 Symfony\Component\Console\Application->doRunCommand() at /home/vagrant/Code/vibecast-api/vendor/symfony/console/Application.php:216
 Symfony\Component\Console\Application->doRun() at /home/vagrant/Code/vibecast-api/vendor/symfony/console/Application.php:122
 Symfony\Component\Console\Application->run() at /home/vagrant/Code/vibecast-api/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php:122
 Illuminate\Foundation\Console\Kernel->handle() at /home/vagrant/Code/vibecast-api/artisan:35



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire