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

To use annotations, files must be removed#6251

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
pbowyer wants to merge2 commits intosymfony:3.0frompbowyer:patch-2
Closed

To use annotations, files must be removed#6251

pbowyer wants to merge2 commits intosymfony:3.0frompbowyer:patch-2

Conversation

@pbowyer
Copy link
Contributor

QA
Doc fix?yes
New docs?no
Applies toTested on 3.0
Fixed ticketsN/A

I'm proposing this change after spending an hour trying to work out why my Repository class wasn't loading.

Thanks toysor123 on IRC, we diagnosed the problem was the XML mapping files generated when reverse engineering my database, which I hadn't deleted.

This is obliquely referred to athttp://symfony.com/doc/current/book/doctrine.html#add-mapping-information:

A bundle can accept only one metadata definition format. For example, it's not possible to mix YAML metadata definitions with annotated PHP entity class definitions.

It'd be great to clarify this for future readers.

I'm proposing this change after spending an hour trying to work out why my Repository class wasn't loading.Thanks to `ysor123` on IRC, we diagnosed the problem was the XML mapping files generated when reverse engineering my database, which I hadn't deleted.This is obliquely referred to athttp://symfony.com/doc/current/book/doctrine.html#add-mapping-information:> A bundle can accept only one metadata definition format. For example, it's not possible to mix YAML metadata definitions with annotated PHP entity class definitions.It'd be great to clarify this for future readers.
If you want to use annotations, you must remove the XML (or YAML) files
after running these two commands. It is `not possible to mix XML/YAML metadata
definitions with annotated PHP entity class definitions
<http://symfony.com/doc/current/book/doctrine.html#add-mapping-information>`_.
Copy link
Member

Choose a reason for hiding this comment

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

The addition is nice, but we should use theref role to link to that section like this (I would also reword this a bit):

If you want to use annotations, you must remove the XML (or YAML) filesafter running these two commands. This is necessary as:ref:`it is not possible to mix mapping configuration formats<book-doctrine-adding-mapping>`.

@OskarStark
Copy link
Contributor

this should be merged to prior branches, too

what do you think@xabbuh ?

@xabbuh
Copy link
Member

Yes, we will do that when merging the PR.

@OskarStark
Copy link
Contributor

👍

@pbowyer
Copy link
ContributorAuthor

Thanks@xabbuh I've updated the PR in line with your comment.

@xabbuh
Copy link
Member

👍

weaverryan added a commit that referenced this pull requestFeb 21, 2016
This PR was submitted for the 3.0 branch but it was merged into the 2.3 branch instead (closes#6251).Discussion----------To use annotations, files must be removed| Q             | A| ------------- | ---| Doc fix?      | yes| New docs?     | no| Applies to    | Tested on 3.0| Fixed tickets | N/AI'm proposing this change after spending an hour trying to work out why my Repository class wasn't loading.Thanks to `ysor123` on IRC, we diagnosed the problem was the XML mapping files generated when reverse engineering my database, which I hadn't deleted.This is obliquely referred to athttp://symfony.com/doc/current/book/doctrine.html#add-mapping-information:> A bundle can accept only one metadata definition format. For example, it's not possible to mix YAML metadata definitions with annotated PHP entity class definitions.It'd be great to clarify this for future readers.Commits-------06de6c0 Updated per xabbuh's comment6a526bf To use annotations, files must be removed
weaverryan added a commit that referenced this pull requestFeb 21, 2016
@weaverryan
Copy link
Member

Thanks Peter! I merged this into the 2.3 branch and changed the block also to be acaution. I have seen this issue several times with people - very difficult to debug indeed!

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

@pbowyer@OskarStark@xabbuh@weaverryan

[8]ページ先頭

©2009-2025 Movatter.jp