Skip to content

The added model and collection classes contain duplicate names of the imported classes #437

@DmitryFurs

Description

@DmitryFurs

Describe the bug

Add the model via the context menu on the module folder. After generating model classes, the generated code contains highlighted code sections.

image

image

To Reproduce

Steps to reproduce the behavior:

  1. Right clink on model dir
  2. Add new model
  3. Fill form with values image
  4. Click Ok
  5. Open generated file and see highlighted errors

Expected behavior

The generated code does not contain highlighted code sections. You can import classes using aliases.
For example:

use Vendor\Module\Model\ResourceModel\Test as ResourceModel;
use Vendor\Module\Model\Test as DataModel;

Please complete the following information:

  • OS: MacOS
  • PhpStorm: PhpStorm 2020.3 Build #PS-203.5981.175, built on December 2, 2020
  • Plugin Version: 3.0.2

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions