krlove / eloquent-model-generator

Eloquent Model Generator

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

"src/TypeRegistry.php" will be registered even if other package commands are executed

shangkai opened this issue · comments

When I execute the migrate:generate command of kitloong/laravel-migrations-generator, because the TypeRegistry is registered, the type of migrations generated by other packages is incorrect.

I think the reason for this problem is GenerateCommandEventListener

public function __construct(private TypeRegistry $typeRegistry) {}

This also tries to access the default database which really fails if I setup different way of database resolving elsewhere in the application. Can we merge this?