laravel-doctrine icon indicating copy to clipboard operation
laravel-doctrine copied to clipboard

Lazy Load Doctrine's SchemaTool

Open baileylo opened this issue 10 years ago • 3 comments

When running php aritsan or any artisan command all commands are initialized. The modified schema related commands all require an instance of SchemaTool. Since SchemaTool requires a correctly configured database connection, if you have an incorrectly configured instance php artisan will crash. This effects all artisan commands and in turn effects composer commands. The below change will lazy load the SchemaTool preventing php artisan from crashing until the commands themselves are actually executed.

baileylo avatar Aug 19 '14 23:08 baileylo

This is an issue for environments where you may not have a database, maybe a testing environment. You're build script would run composer install and that would end in an error state because of the post install commands to php artisan.

baileylo avatar Aug 20 '14 16:08 baileylo

+1

neon64 avatar Dec 06 '14 21:12 neon64

If you could - please update this as per the recent updates as this is no longer mergeable.

kirkbushell avatar Jan 28 '15 11:01 kirkbushell