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

[Validator] return empty metadata collection if none do exist #11615

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

Merged
merged 1 commit into from
Aug 19, 2014

Conversation

xabbuh
Copy link
Member

@xabbuh xabbuh commented Aug 8, 2014

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

Backport of #11614 for Symfony 2.3 and 2.4.

The PropertyMetadataContainerInterface defines that the method
getPropertyMetadata() has to return an empty collection if no
metadata have been configured for the given property. Though, its
implementation in the ClassMetadata class didn't check for
existence of such metadata. This behavior led to unexpected PHP
notices when validating a property or a property value of a property
without any configured constraints (only affects the new 2.5 API).
Additionally, the getMemberMetadatas() didn't check for existing
array keys as well which has also been fixed.
@stof
Copy link
Member

stof commented Aug 19, 2014

👍

1 similar comment
@Tobion
Copy link
Contributor

Tobion commented Aug 19, 2014

👍

@webmozart
Copy link
Contributor

Thank you Christian.

@webmozart webmozart merged commit f5bc18d into symfony:2.3 Aug 19, 2014
webmozart added a commit that referenced this pull request Aug 19, 2014
…exist (xabbuh)

This PR was merged into the 2.3 branch.

Discussion
----------

[Validator] return empty metadata collection if none do exist

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets |
| License       | MIT
| Doc PR        | [The reference to the documentation PR if any]

Backport of #11614 for Symfony 2.3 and 2.4.

Commits
-------

f5bc18d return empty metadata collection if none do exist
@xabbuh xabbuh deleted the issue-11604-2.3 branch August 19, 2014 08:49
xabbuh added a commit to xabbuh/symfony that referenced this pull request Aug 19, 2014
Adds a test case for symfony#11604 to avoid regressions. The actual issue
has been fixed in Symfony 2.3 with the merge of symfony#11615.
fabpot added a commit that referenced this pull request Aug 31, 2014
…straint is defined (xabbuh)

This PR was merged into the 2.5 branch.

Discussion
----------

[Validator] Test that validateProperty() works if no constraint is defined

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes (2.3 has to be merged into 2.5 first)
| Fixed tickets | #11604, #11614
| License       | MIT
| Doc PR        |

Adds a test case for #11604 to avoid regressions. The actual issue has been fixed in Symfony 2.3 with the merge of #11615.

Commits
-------

a47a884 add test for #11604
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.

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