Skip to content

Cannot declare class App\Providers\AppServiceProvider, because the name is already in use #115

@ylynfatt

Description

@ylynfatt

Laravel Package Version

1.0.14

Laravel Version

12.18.0

PHP Version

8.3.19

System Info

macOS 15.6

Description

I was attempting to install Laravel Boost in an existing project and after selecting the code editors and AI guidelines, I got the following error:

PHP Fatal error: Cannot declare class App\Providers\AppServiceProvider, because the name is already in use in /Users/username/Herd/my-project/app/Http/Providers/AppServiceProvider.php on line 7

The AppServiceProvider class was already in my project.

Steps To Reproduce

Installed Boost via composer:

composer require laravel/boost --dev

Ran the boost install command:

php artisan boost:install

Selected editors: Claude Code, PHP Storm, VS Code.
Selected AI Guidelines: Claude Code.

Then I received the error.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions