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

[Embeddables] Improved exception message #1133

Closed
wants to merge 1 commit into from

Conversation

phansys
Copy link
Contributor

@phansys phansys commented Sep 12, 2014

Improved exception message when embeddable definition is missing 'class' attribute.
Instead of:

The class '' was not found in the chain configured namespaces ...

It shows:

The embed mapping 'embeddedname' misses the 'class' attribute.

@doctrinebot
Copy link

Hello,

thank you for creating this pull request. I have automatically opened an issue
on our Jira Bug Tracker for you. See the issue link:

http://www.doctrine-project.org/jira/browse/DDC-3305

We use Jira to track the state of pull requests and the versions they got
included in.

@Ocramius
Copy link
Member

@phansys looking good to me, but is it possible to add a unit test to it?

@phansys
Copy link
Contributor Author

phansys commented Sep 12, 2014

Of course @Ocramius. I'll update this PR with new tests.
Thank you!

@@ -153,6 +153,10 @@ protected function doLoadMetadata($class, $parent, $rootEntityFound, array $nonS
continue;
}

if (!isset($embeddableClass['class'])) {
Copy link
Member

Choose a reason for hiding this comment

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

Please put spaces around !.

@Ocramius
Copy link
Member

@phansys ping?

@Ocramius Ocramius self-assigned this Nov 11, 2014
@phansys
Copy link
Contributor Author

phansys commented Nov 11, 2014

Hi @Ocramius.
Sorry for the timeout, I was very busy these weeks.
I was trying to figure out how to get working tests for this validation honoring the already existing tests, but I found some troubles because the schema in these tests are based on annotations and it is marked as invalid earlier than this check.
If you can, any clue is welcome.
Thank you!

Ocramius added a commit that referenced this pull request Jan 16, 2015
Ocramius added a commit that referenced this pull request Jan 16, 2015
@Ocramius Ocramius closed this in f28654d Jan 16, 2015
@Ocramius
Copy link
Member

I rebased, applied tests and merged this into master at f28654d

Thanks @phansys!

@phansys
Copy link
Contributor Author

phansys commented Jan 16, 2015

Thank you @Ocramius.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants