Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Corrected model folder inside bundle#6375

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Closed
sfdumi wants to merge1 commit intosymfony:3.0fromsfdumi:patch-12

Conversation

@sfdumi
Copy link
Contributor

According to the best practices, I believe that Entity or Document folders should be used.

According to the best practices, I believe that Entity or Document folders should be used.
@xabbuh
Copy link
Member

I would not make this change. The term model here refers to classes that are the model of your domain. That's doesn't tell you anything about whether they are mapped to a database using an object-relational mapper or using something like MongoDB (which would be the case when making this change). As a bundle author I even might not care at all if a concrete project maps model objects to MySQL, MongoDB, or a PHPCR backend (see FOSUserBundle for such an example).

@javiereguiluz
Copy link
Member

I agree with@xabbuh but I understand@sfdumi concerns. We could:

  • LeaveModel/ but improving a bit its description (if possible)
  • AddEntity/ forDoctrine ORM entities
  • AddDocument/ forDoctrine ODM documents
sfdumi and ogizanagi reacted with thumbs up emoji

@sfdumi
Copy link
ContributorAuthor

Sounds reasonable. The fact that model could be used without Doctrine slipped me. Thank you,@xabbuh . :)
I recommend adding Entity and Document, alongside Model, as@javiereguiluz uggested. Suggestion forModels description: Domain models, not mapped by Doctrine. Eg: models used in internal processing and not persisted, passed to external services etc.
How do you feel about this?

@wouterj
Copy link
Member

I'm actually not sure why we would document the specific location of domain models: Place them anywhere you think makes much sense would be the best option here imo.

Can't we simply remove the "Models" row and addEntity/ andDocument/ as proposed by@javiereguiluz?

If you agree, can you maybe update this PR,@sfdumi? I know this PR is stalled for a long time. If you don't have the time to work on it anymore, just leave a comment and we'll finish this.

@xabbuh
Copy link
Member

I think I agree with@wouterj. For your own model classes that are not coupled to a specific backend, there are no rules where to store them. Only the location of Doctrine entities and document is important if you do not want to configure all mapping information explicitly.

@javiereguiluz
Copy link
Member

Closing it in favor of#7156 to make the changes requested by doc maintainers.@sfdumi I'm sorry but I couldn't reuse your original commits because the doc structure changed completely since you created this PR.

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

4 participants

@sfdumi@xabbuh@javiereguiluz@wouterj

[8]ページ先頭

©2009-2025 Movatter.jp