Closed
Description
Sorry, just found another problem with the generator command when by-resource is false.
When a new adapter is generated for a model, the following is the result (using a Post model as an example):
- namespace use statement is added with
App\Post
- adapter class is named
Post
- model passed to parent constructor is
new Post()
This creates a naming conflict on the namespace where the model and adapter have the same name.
To fix this, I propose either adding an alias to the namespace use statement (and changing name of model used when calling parent constructor) or remove the use statement and use the FQCN of the model.