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

BasicEntityPersister::count() return type fix #6818

Merged
merged 1 commit into from
Nov 27, 2017
Merged

BasicEntityPersister::count() return type fix #6818

merged 1 commit into from
Nov 27, 2017

Conversation

vkurdin
Copy link

@vkurdin vkurdin commented Nov 8, 2017

Resolve #6810 by casting return value to integer (2.5.x branch)

@lcobucci
Copy link
Member

@vkurdin thanks for helping us to backport this fix but we do need to have the tests as well. Maybe cherry-picking the original commit(s) and addressing the the conflicts would be a better solution?

@vkurdin
Copy link
Author

vkurdin commented Nov 27, 2017

@lcobucci no conflicts introduced after cherry-picking the original commit to 2.5 branch. On the other side new functionality was added: EntityRepository::count method. Is that ok to introduce new feature to 2.5 branch?

@lcobucci
Copy link
Member

@vkurdin we shouldn't introduce new features on 2.5 but don't we have any test that ensures that we're returning the correct type on that method (not even an assertSame())?

@lcobucci
Copy link
Member

I've meant tests for BasicEntityPersister#count(). If we don't we should probably do something about that on 2.6 as well

@lcobucci lcobucci added this to the 2.5.13 milestone Nov 27, 2017
@lcobucci lcobucci self-requested a review November 27, 2017 16:24
@lcobucci
Copy link
Member

lcobucci commented Nov 27, 2017

@vkurdin I've found (on v2.6) the test that covers this method and, unfortunately, we are using assertEquals() and not assertSame(). So it's fine to merge this on 2.5 but we should fix BasicEntityPersisterTypeValueSqlTest#testCountEntities() on master (eventually).

https://github.com/doctrine/doctrine2/blob/be18256a93352831ec72ee7ef03337d463de0354/tests/Doctrine/Tests/ORM/Persisters/BasicEntityPersisterTypeValueSqlTest.php#L160-L163

Resolve #6810 by casting return value to integer
@lcobucci lcobucci merged commit ffdb769 into doctrine:2.5 Nov 27, 2017
@lcobucci
Copy link
Member

@vkurdin 🚢 thanks for your contribution!

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.

2 participants