Skip to content

make method supportsClass() in custom voter compatible with the interface's documentation #3707

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
Mar 24, 2014

Conversation

xabbuh
Copy link
Member

@xabbuh xabbuh commented Mar 21, 2014

Q A
Doc fix? yes
New docs? no
Applies to all
Fixed tickets #3702

@bicpi
Copy link
Contributor

bicpi commented Mar 22, 2014

👍

{
return $obj instanceof Post;
return 'Acme\DemoBundle\Entity\Post' === $class;
Copy link
Contributor

Choose a reason for hiding this comment

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

Possibly change that to the following to be more like instanceof?

$supportedClass = 'Acme\DemoBundle\Entity\Post';
return $supportedClass === $class || is_subclass_of($class, $supportedClass);

@weaverryan
Copy link
Member

I should have known the #3702 issue would already have a fix ;). Thanks Christian!

weaverryan added a commit that referenced this pull request Mar 24, 2014
… the interface's documentation (xabbuh)

This PR was merged into the 2.3 branch.

Discussion
----------

make method supportsClass() in custom voter compatible with the interface's documentation

| Q             | A
| ------------- | ---
| Doc fix?      | yes
| New docs?     | no
| Applies to    | all
| Fixed tickets | #3702

Commits
-------

36384db make method supportsClass() in custom voter compatible with the interface's documentation
@weaverryan weaverryan merged commit 36384db into symfony:2.3 Mar 24, 2014
@xabbuh xabbuh deleted the issue-3702 branch March 24, 2014 20:00
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.

4 participants