Barracuda's avatar

Error on first test after upgrade to Laravel 5.7

I am working on updating my website up to Laravel 5.7 (and will keep on to 5.8 after this...), but after all is done I keep having an error on the first test that is run when the command phpunit is used, no matter which test is run first.

1) Tests\Unit\Models\VemTest::testSeenIndicators
ErrorException: include(/home/vagrant/code/vendor/composer/../symfony/contracts/Service/ResetInterface.php): failed to open stream: No such file or directory

/home/vagrant/code/vendor/symfony/console/Formatter/OutputFormatterStyleStack.php:20
/home/vagrant/code/vendor/symfony/console/Formatter/OutputFormatter.php:82
/home/vagrant/code/vendor/symfony/console/Output/Output.php:43
/home/vagrant/code/vendor/laravel/framework/src/Illuminate/Console/Application.php:184
/home/vagrant/code/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php:250
/home/vagrant/code/vendor/laravel/framework/src/Illuminate/Foundation/Testing/Concerns/InteractsWithConsole.php:18
/home/vagrant/code/vendor/laravel/framework/src/Illuminate/Foundation/Testing/RefreshDatabase.php:55
/home/vagrant/code/vendor/laravel/framework/src/Illuminate/Foundation/Testing/RefreshDatabase.php:18
/home/vagrant/code/vendor/laravel/framework/src/Illuminate/Foundation/Testing/TestCase.php:104
/home/vagrant/code/vendor/laravel/framework/src/Illuminate/Foundation/Testing/TestCase.php:71
/home/vagrant/code/tests/Unit/Models/VemTest.php:26

For reference, VemTest.php:26 is

    public function setUp()
    {
        parent::setUp();  <--- Line 26

The error seems to be coming from Laravel's side of things. Is there a solution to this beside just reinstalling the whole project?

0 likes
3 replies
tykus's avatar
tykus
Best Answer
Level 104

Did you run composer update?

Barracuda's avatar

Update: updating to Laravel 5.8, running composer update and composer install fixed the problem.

Please or to participate in this conversation.