@ekn did you add this line in your code?
// config/app.php
'providers' => [
...
Barryvdh\Cors\ServiceProvider::class,
],
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
After upgrading from 6.x to 7.x following the official upgrade doc I could make everything work except the php artisan test command.
$ php artisan test
In Application.php line 690:
Class 'Barryvdh\Cors\ServiceProvider' not found
Does anybody have a clue how to fix this?
I searched for 'Barryvdh\Cors\ServiceProvider' everywhere in my code, added ' Fruitcake\Cors\CorsServiceProvider::class' to App config, etc. Also composer update did not help.
Maybe I need to republish something related to the test suite???
Edit: running ./vendor/bin/phpunit delivers same output.
Turns out my Search function did not check into /bootstrap/cache/ where still the old Barryvdh\\Cors\\ServiceProvider was referenced several times. Deleting also them solved the problem!
Please or to participate in this conversation.