-
-
Notifications
You must be signed in to change notification settings - Fork 5.2k
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
add informations how to create a custom doctrine mapping #4700
Conversation
@@ -485,4 +485,68 @@ can be placed directly under ``doctrine.orm`` config level. | |||
This shortened version is commonly used in other documentation sections. | |||
Keep in mind that you can't use both syntaxes at the same time. | |||
|
|||
|
|||
Custom Mapping | |||
--------------- |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the above 2 lines should have exact the same length
The config references surely needs some love, thanks for starting this! |
@wouterj thanks for reviewing this, hopefully i fixed everything :) |
), | ||
)); | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove one blank line here
@timglabisch You should nest the different code blocks into a |
Detecting a Mapping A MetadataDriver (type) | ||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
|
||
If the ``type`` on the bundle configuration isn't set, the DoctrineBundle will try to detect the correct metadata driver |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you please wrap lines after the first word that crosses the 72nd character?
please rereview. |
on your own. | ||
|
||
For example, you can overwrite the configuration directory for a given | ||
bundle. Keep in mind that the bundle you want to overwrite has to exist. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would combine these 2 paragraphs into one
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@xabbuh asks me to wrap this at the 72nd char. should i move the bundle one line up?
auto_mapping: true | ||
mappings: | ||
# ... | ||
TgDoctrineMappingBundle: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
AppBundle
@xabbuh i changed the namespace, please review |
Hi Tim! Thanks for this! I just left a lot of comments, but it's more because this configuration is confusing, with all the Cheers! |
@weaverryan the doctrine configuration here is a bit weird, can you please rereview this? i did some additional changes to make this more clear. |
Custom Mapping Entities in a Bundle | ||
----------------------------------- | ||
|
||
Doctrine's ```auto_mapping`` feature loads annotation configuration from the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
extra tick here
Hey Tim! Thanks for the awesome-fast turn-around. I just added some more notes. Ultimately, we may need to re-make this PR against Thanks! |
f53431f
to
3dd01ac
Compare
thanks @weaverryan please rereview this PR. |
), | ||
)); | ||
|
||
Mapping Entities outside of a Bundle |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
minor: "outside" should be capitialized
@wouterj fixed |
This looks great to me. Now, we really need this to go into the DoctrineBundle itself: https://github.com/doctrine/DoctrineBundle/blob/master/Resources/doc/configuration.rst. @timglabisch can you duplicate this PR over there? We also need finish "moving" the configuration section to that repository. It looks like our reference section may still have some stuff that their's doesn't. We need to make sure everything we have is in their configuration section, then replace our reference section with a link to their docs. Thanks! |
@weaverryan shouldn't we just merge this one? |
Yep - I've merged this in - the moving to Doctrine should be a separate issue. Sorry about the delay and thanks for the re-ping Wouter! |
…g (timglabisch) This PR was submitted for the master branch but it was merged into the 2.3 branch instead (closes #4700). Discussion ---------- add informations how to create a custom doctrine mapping i tryed to explain a bit how doctrine tries to find the correct mapping, the driver and how you can configure your own mapping. Commits ------- 8a98fc1 Update doctrine.rst bec3c98 Doctrine Custom Mapping
i tryed to explain a bit how doctrine tries to find the correct mapping, the driver and how you can configure your own mapping.