I'm working on a fresh Laravel 12.12.0 project and facing a strange issue that I can't resolve. Whenever I try to run any Artisan command (like php artisan serve, php artisan route:list, or php artisan config:clear), I receive the following error:
Illuminate\Contracts\Container\BindingResolutionException
Target class [files] does not exist.
The exception traces back to:
vendor\laravel\framework\src\Illuminate\Container\Container.php:1019
What I've Tried
- Verified that I'm not using
app('files')or similar in my own code. - Searched for
filesacross the whole project, and didn't find any
custom binding. - Ran
composer dump-autoload,config:clear,cache:clear, etc. - Checked
config/app.php: I only have the default providers:App\Providers\AppServiceProvider::class,App\Providers\RouteServiceProvider::class. - My
AppServiceProvider.phpandRouteServiceProvider.phpare untouched or standard. - No custom bindings for
files.
Question
Where might this files binding be coming from, and what could be triggering Laravel to try to resolve it?
Is it possible a dependency or misconfigured script in composer.json (which was modified) is causing this?
Any direction on debugging this would be hugely appreciated!

filestype (object) or a$filesparameter name, and it is being loaded by the service container, so the service container will try to fulfill that missing param (dependency injection by the service container), but there is nothing calledfilesthat will resolve to it. Try checking the Laravel logs, and you will find the full stacktrace, check which file was the last one run that is not insidevendorand you have control over, that one is having the issue