Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[make:entity] helper message with two classes having the same name under different namespaces #1511

Merged
merged 1 commit into from
Apr 17, 2024

Conversation

jeromegxj
Copy link
Contributor

@jeromegxj jeromegxj commented Apr 9, 2024

As discussed in #1292 this is how I see the feature, let me know what you think about it.

New output when using classes with same name:

$ bin/console m:entity Order
 Your entity already exists! So let's add some new fields!

 New property name (press <return> to stop adding fields):
 > orderLogistic

 Field type (enter ? to see all types) [string]:
 > relation

 What class should this entity be related to?:
 > Logistic\Order

What type of relationship is this?
 ------------ ----------------------------------------------------------------------------
  Type         Description
 ------------ ----------------------------------------------------------------------------
  ManyToOne    Each Order relates to (has) one Logistic\Order.
               Each Logistic\Order can relate to (can have) many Order objects.

  OneToMany    Each Order can relate to (can have) many Logistic\Order objects.
               Each Logistic\Order relates to (has) one Order.

  ManyToMany   Each Order can relate to (can have) many Logistic\Order objects.
               Each Logistic\Order can also relate to (can also have) many Order objects.

  OneToOne     Each Order relates to (has) exactly one Logistic\Order.
               Each Logistic\Order also relates to (has) exactly one Order.
 ------------ ----------------------------------------------------------------------------

 Relation type? [ManyToOne, OneToMany, ManyToMany, OneToOne]:
 >

fixes #1292

Copy link
Member

@javiereguiluz javiereguiluz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A nice improvement! Thanks Jérôme

@jrushlow jrushlow changed the title fix #1292 [make:entity] helper message with two classes having the same name under different namespaces [make:entity] helper message with two classes having the same name under different namespaces Apr 17, 2024
Copy link
Collaborator

@jrushlow jrushlow left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @jeromegxj!

@jrushlow jrushlow added the Status: Reviewed Has been reviewed by a maintainer label Apr 17, 2024
@jrushlow jrushlow merged commit be24be4 into symfony:main Apr 17, 2024
7 checks passed
@jrushlow jrushlow mentioned this pull request Apr 24, 2024
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Reviewed Has been reviewed by a maintainer
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[make:entity] helper message with two classes having the same name under different namespaces
4 participants