Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot declare class after laravel-settings install #55

Closed
nyrik8989 opened this issue Mar 29, 2021 · 4 comments
Closed

Cannot declare class after laravel-settings install #55

nyrik8989 opened this issue Mar 29, 2021 · 4 comments

Comments

@nyrik8989
Copy link

@php artisan package:discover --ansi
PHP Fatal error: Cannot declare class App\Modules\Partner\Providers\PartnerAuthServiceProvider, because the name is already in use in /home/user/www/lkozlaravel/app/Modules/Partner/app/Providers/PartnerAuthServiceProvider.php on line 15
[2021-03-29 19:05:03] local.ERROR: Cannot declare class App\Modules\Partner\Providers\PartnerAuthServiceProvider, because the name is already in use {"exception":"[object] (Symfony\Component\ErrorHandler\Error\FatalError(code: 0): Cannot declare class App\Modules\Partner\Providers\PartnerAuthServiceProvider, because the name is already in use at /home/user/www/lkozlaravel/app/Modules/Partner/app/Providers/PartnerAuthServiceProvider.php:15)
[stacktrace]
#0 {main}
"}

@nyrik8989
Copy link
Author

"dont-discover": [
"spatie/laravel-settings"
]

ok

@nyrik8989
Copy link
Author

"repositories": [
{
"type": "path",
"url": "app/Modules/User",
"options": {
"symlink": true
},
"canonical": false
}, {

@rubenvanassche
Copy link
Member

Hi @nyrik8989,

The settings package does not have a PartnerAuthServiceProvider, could you please try disabling the auto_discover_settings functionality of the package and see what that does?

@nyrik8989
Copy link
Author

composer.json

"dont-discover": [
"spatie/laravel-settings"
]

shell

php artisan vendor:publish --provider="Spatie\LaravelSettings\LaravelSettingsServiceProvider" --tag="settings"

config/settigs.php

'auto_discover_settings' => [
//todo вызывает ошибку
//app()->path(),
],

solved

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants