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

[Validator] Fixed StaticMethodLoader does not try to invoke methods of abstract classes anymore #8592

Merged
merged 1 commit into from
Jul 28, 2013

Conversation

fabpot
Copy link
Member

@fabpot fabpot commented Jul 27, 2013

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


$loader->loadClassMetadata($metadata);

$this->assertSame(0, count($metadata->getConstraints()));
Copy link
Contributor

Choose a reason for hiding this comment

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

assertCount() ? =)

Copy link
Contributor

Choose a reason for hiding this comment

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

Tests are failing with:

PHPUnit_Framework_Exception: PHP Strict Standards:  
  Static function Symfony\Component\Validator\Tests\Mapping\Loader\AbstractStaticLoader::loadMetadata() 
  should not be abstract in 
  /home/travis/build/symfony/symfony/src/Symfony/Component/Validator/Tests/Mapping/Loader/StaticMethodLoaderTest.php on line 87

Looks like from this example's perspective the loadMetadata() method doesn't have to be abstract (could be empty for example). It should be sufficient if the class was abstract

fabpot added a commit that referenced this pull request Jul 28, 2013
This PR was merged into the 2.2 branch.

Discussion
----------

[Validator] Fixed StaticMethodLoader does not try to invoke methods of abstract classes anymore

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #8589
| License       | MIT
| Doc PR        |  n/a

Commits
-------

b41cf82 [Validator] fixed StaticMethodLoader trying to invoke methods of abstract classes (closes #8589)
@fabpot fabpot merged commit b41cf82 into symfony:2.2 Jul 28, 2013
fabpot added a commit that referenced this pull request Aug 13, 2013
This PR was merged into the 2.2 branch.

Discussion
----------

[Validator] Fixed the wrong isAbstract() call in PR #8592

| Q             | A
| ------------- | ---
| Bug fix?      | [yes]
| New feature?  | [no]
| BC breaks?    | [no]
| Deprecations? | [no]
| Tests pass?   | [yes]
| Fixed tickets | [#8589]
| License       | MIT
| Doc PR        | [n/a]

Commits
-------

18896d5a [Validator] fixed the wrong isAbstract() check against the class (fixed #8589)
@fabpot fabpot deleted the validator-abstract-fix branch April 27, 2014 09:23
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.

3 participants