DDC-3328: [GH-1150] Improve Comparison::CONTAINS: allow to use custom position for % and _ wildcard characters #4112

Closed
opened 2026-01-22 14:35:24 +01:00 by admin · 2 comments
Owner

Originally created by @doctrinebot on GitHub (Sep 28, 2014).

Originally assigned to: @beberlei on GitHub.

Jira issue originally created by user @doctrinebot:

This issue is created automatically through a Github pull request on behalf of Fedik:

Url: https://github.com/doctrine/doctrine2/pull/1150

Message:

This pull prevent forced wrapping of the value in to %
and allow to use the custom position for % and _ wildcard characters in case Comparison::CONTAINS

Allow to build the contains expressions like:

Criteria::expr()->contains('myField', 'some string%');
Criteria::expr()->contains('myField', '%some string');
Criteria::expr()->contains('myField', '10\%');
Criteria::expr()->contains('myField', 's*m* string');
Originally created by @doctrinebot on GitHub (Sep 28, 2014). Originally assigned to: @beberlei on GitHub. Jira issue originally created by user @doctrinebot: This issue is created automatically through a Github pull request on behalf of Fedik: Url: https://github.com/doctrine/doctrine2/pull/1150 Message: This pull prevent forced wrapping of the value in to `%` and allow to use the custom position for `%` and `_` wildcard characters in case `Comparison::CONTAINS` Allow to build the `contains` expressions like: ``` php Criteria::expr()->contains('myField', 'some string%'); Criteria::expr()->contains('myField', '%some string'); Criteria::expr()->contains('myField', '10\%'); Criteria::expr()->contains('myField', 's*m* string'); ```
admin added the Bug label 2026-01-22 14:35:24 +01:00
admin closed this issue 2026-01-22 14:35:24 +01:00
Author
Owner

@doctrinebot commented on GitHub (Oct 19, 2014):

Comment created by @doctrinebot:

A related Github Pull-Request [GH-1150] was assigned:
https://github.com/doctrine/doctrine2/pull/1150

@doctrinebot commented on GitHub (Oct 19, 2014): Comment created by @doctrinebot: A related Github Pull-Request [GH-1150] was assigned: https://github.com/doctrine/doctrine2/pull/1150
Author
Owner

@doctrinebot commented on GitHub (Jan 24, 2015):

Comment created by @doctrinebot:

A related Github Pull-Request [GH-1150] was labeled:
https://github.com/doctrine/doctrine2/pull/1150

@doctrinebot commented on GitHub (Jan 24, 2015): Comment created by @doctrinebot: A related Github Pull-Request [GH-1150] was labeled: https://github.com/doctrine/doctrine2/pull/1150
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: doctrine/archived-orm#4112