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

Section for custom types in configuration chapter #638

Merged
merged 1 commit into from
Jun 4, 2020

Conversation

malarzm
Copy link
Member

@malarzm malarzm commented Jun 3, 2020

Closes #632

@malarzm malarzm added this to the 4.2.0 milestone Jun 3, 2020
@@ -214,6 +214,39 @@ The following configuration shows a bunch of mapping examples:
</doctrine_mongodb:config>
</container>

Custom types
Copy link
Member

Choose a reason for hiding this comment

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

Capitalize "Types" since this is a title


doctrine_mongodb:
types:
# following two definitions are equivalent
Copy link
Member

Choose a reason for hiding this comment

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

If I understand correctly, you're saying that the value can either be a FQCN string directly or an object with the FQCN string under a class property. I think it may be simpler to just present one style in the documentation example, though, unless there is a legitimate reason users would need to use the more verbose syntax (perhaps if other options beyond class were expected).

Copy link
Member Author

Choose a reason for hiding this comment

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

Not right now, indeed it'll be better to just show simpler syntax 👍

types:

# Prototype
name: Fully\Qualified\Class\Name
Copy link
Member

Choose a reason for hiding this comment

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

I'd suggest using "custom_type" instead of "name" here, for consistency with the previous example. Likewise in the XML below.

@malarzm malarzm merged commit f3b93a7 into doctrine:master Jun 4, 2020
@malarzm malarzm deleted the docs-types branch June 4, 2020 07:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add documentation for custom types
2 participants