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

Forbid mapping class by more than one AbstractDocument #1906

Merged
merged 1 commit into from
Nov 30, 2018

Conversation

malarzm
Copy link
Member

@malarzm malarzm commented Nov 28, 2018

Q A
Type improvement
BC Break yes
Fixed issues n/a

public static function classCanOnlyBeMappedByOneAbstractDocument(string $className, AbstractDocument $mappedAs, AbstractDocument $offending) : self
{
return new self(sprintf(
"Can not map class '%s' as %s because it was already mapped as %s.",
Copy link
Member Author

Choose a reason for hiding this comment

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

I omitted "a/an" before "%s" on purpose to not deal with "an EmbeddedDocument"/"a (everything else)" ;)

@malarzm malarzm requested a review from alcaeus November 28, 2018 22:01
@malarzm malarzm added this to the 2.0.0 milestone Nov 28, 2018
@malarzm malarzm force-pushed the forbid-mixing-root-annots branch from 274dfb2 to 9f4f088 Compare November 28, 2018 22:20
@malarzm malarzm force-pushed the forbid-mixing-root-annots branch from 9f4f088 to 10341e1 Compare November 29, 2018 08:01
@alcaeus
Copy link
Member

alcaeus commented Nov 29, 2018

One last thing, can you add a note to the UPGRADE document stating that using multiple document annotations will now throw an exception?

@malarzm malarzm force-pushed the forbid-mixing-root-annots branch from 10341e1 to f08a708 Compare November 29, 2018 19:23
@malarzm
Copy link
Member Author

malarzm commented Nov 29, 2018

Here you go. I'm not sure about the wording though.

@alcaeus
Copy link
Member

alcaeus commented Nov 30, 2018

Thanks @malarzm!

@alcaeus alcaeus merged commit a47e460 into doctrine:master Nov 30, 2018
@malarzm malarzm deleted the forbid-mixing-root-annots branch November 30, 2018 08:07
alcaeus added a commit to alcaeus/mongodb-odm that referenced this pull request Jan 11, 2019
alcaeus added a commit to alcaeus/mongodb-odm that referenced this pull request Jan 11, 2019
alcaeus added a commit to alcaeus/mongodb-odm that referenced this pull request Jan 14, 2019
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.

2 participants