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

Appearance settings

Make the exception message more clear. #19310

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

Closed
wants to merge 2 commits into from
Closed

Conversation

Nyholm
Copy link
Member

@Nyholm Nyholm commented Jul 7, 2016

Q A
Branch? "master"
Bug fix? yes
New feature? no
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets
License MIT
Doc PR

A small change that makes the error message more clear. If your property is named "type", "value" or something similar it is not obvious that we refer to the property name.

See example: schmittjoh/JMSTranslationBundle#373

@@ -39,7 +39,7 @@ class PropertyMetadata extends MemberMetadata
public function __construct($class, $name)
{
if (!property_exists($class, $name)) {
throw new ValidatorException(sprintf('Property %s does not exist in class %s', $name, $class));
throw new ValidatorException(sprintf('Property "%s" does not exist in class %s', $name, $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 also wrap the class %s into quotes.

@wouterj
Copy link
Member

wouterj commented Jul 7, 2016

big 👍

@stof
Copy link
Member

stof commented Jul 7, 2016

👍
Status: reviewed

@symfony/deciders I suggest including this in patch releases.

@Nyholm
Copy link
Member Author

Nyholm commented Jul 7, 2016

Thank you for the lightning fast review. I've quoted the class as well.

@javiereguiluz
Copy link
Member

👍

@fabpot
Copy link
Member

fabpot commented Jul 8, 2016

Thank you @Nyholm.

fabpot added a commit that referenced this pull request Jul 8, 2016
This PR was submitted for the master branch but it was merged into the 2.7 branch instead (closes #19310).

Discussion
----------

Make the exception message more clear.

| Q             | A
| ------------- | ---
| Branch?       | "master"
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets |
| License       | MIT
| Doc PR        |

A small change that makes the error message more clear. If your property is named "type", "value" or something similar it is not obvious that we refer to the property name.

See example: schmittjoh/JMSTranslationBundle#373

Commits
-------

6344ccd Make the exception message more clear.
@fabpot fabpot closed this Jul 8, 2016
@Nyholm
Copy link
Member Author

Nyholm commented Jul 8, 2016

Thank you for merging.

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.

6 participants
Morty Proxy This is a proxified and sanitized view of the page, visit original site.