Thanks to visit codestin.com
Credit goes to github.com

Skip to content

BasicEntityPersister::count() return type fix#6818

Merged
lcobucci merged 1 commit into
doctrine:2.5from
vkurdin:patch-1
Nov 27, 2017
Merged

BasicEntityPersister::count() return type fix#6818
lcobucci merged 1 commit into
doctrine:2.5from
vkurdin:patch-1

Conversation

@vkurdin
Copy link
Copy Markdown

@vkurdin vkurdin commented Nov 8, 2017

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

@lcobucci
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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