You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Complete error message:
(occurs when running php artisan generate:model-factory)
PHP Fatal error: Cannot declare class PragmaRX\Tracker\Data\Repositories\Session, because the name is already in use in /app/VendorOverrides/PragmaRX/Tracker/Data/Repositories/Session.php on line 330
Symfony\Component\Debug\Exception\FatalErrorException: Cannot declare class PragmaRX\Tracker\Data\Repositories\Session, because the name is already in use
Workaround: for temporary dev-only use, I just removed those custom things, and the package generated factories normally without error. 👍
But if this were to be run in some automated fashion, then detecting this custom composer situation might be important ... hence my reason for posting this issue. 😊
Complete error message:
(occurs when running
php artisan generate:model-factory
)Background:
The PragmaRX Tracker package hasn't merged an important fix, so I've had to override it in my app with
composer
magic.composer.json
:"autoload": { "classmap": [ "database/seeds", "database/factories" ], + "files": ["app/VendorOverrides/PragmaRX/Tracker/Data/Repositories/Session.php"], "psr-4": { "App\\": "app/" } },
So, yes, my app does actually re-declare that class, but
composer
knows how to handle it.Possible Solutions:
generate:model-factory
command, where we can list the things (ie: directories probably) to ignore.composer.json
'sautoload.files
key.app
)The text was updated successfully, but these errors were encountered: