I made config/Consts/MyConst.php
<?php
namespace App\Consts;
class MyConst
{
// some code
}
and put config/app.php
'MyConst' => App\Consts\MyConst::class,
I think this is typical const file. When I do php artisan test, I get :
PHP Fatal error: Cannot declare class App\Consts\MyConst, because the name is already in use in /Users/~~~~/config/Consts/MyConst.php on line 5
I know this error shown when I made mistake writing namespace but I can not find it.
When I use MyConst from other files such as controller or view, it works well.
Only (for now) in test, this error shows. Do you have any advice ?

'MyConst' => \App\Consts\MyConst::classandphp artisan config:cacheshould work