Skip to content

Make:migration does not track entities in every folders #60883

Closed as not planned
@Nayte91

Description

@Nayte91

Symfony version(s) affected

7.3.0

Description

Hello,

Playing around with SF 7.3 and its new ability to detect non-service classes anywhere based on the attribute; As Entity is now "folder-free", I tried to create a new entity in another place of my codebase:

  • Classic one: src/Entity/Organization/Member.php (Member class)
  • Tried one: src/Organization/Entity/Member.php

But once my Entity defined, "make:migration" doesn't see any change related on the db scheme; If I move my files back to src/Entity, it works.

So I think it's another step in the same direction, can we ensure that makerbundle / doctrine-bridge / whatever is involved into this process will be able to track a #[ORM\Entity] attribute anywhere in src/?

If I can have a look to fix this, do you know which package is really involved in this process? I guess it's not as easy as a "target folder in config" 😓

How to reproduce

I tried to create a new entity in another place of my codebase:

  • Classic one: src/Entity/Organization/Member.php (Member class)
  • Tried one: src/Organization/Entity/Member.php

Possible Solution

No response

Additional Context

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions