-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
This should fix Criteria startsWith and endsWith #6397
This should fix Criteria startsWith and endsWith #6397
Conversation
not sure why tests failing. Maybe travis caching issue? |
@svycka that's just weird but I restarted the job, let's wait and see 😉 |
@svycka I just cloned you branch and ran the tests after running |
@lcobucci found the reason its because startsWith and endsWwith were introduced in doctrine/collection:1.4.0 doctrine/collections#78 hmm not sure what to do :) require ^1.4 :D |
@svycka feel free to bump up the dependency |
@svycka I labelled it as Thanks for you collaboration 😉 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Status: Needs work.
$repository = $this->_em->getRepository(CmsUser::class); | ||
|
||
$users = $repository->matching(new Criteria(Criteria::expr()->startsWith('name', 'Foo'))); | ||
$this->assertEquals(0, count($users)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please, use assertCount()
instead.
using like this:
and exception if more than one expression: