-
Notifications
You must be signed in to change notification settings - Fork 120
fix ltrim with left parts match #352
base: master
Are you sure you want to change the base?
Conversation
I open this PR in favor of the #314 We use a substr instead, I think we are good to merge Thx for your feedback! it's really a silent bug that I had never encountered in 5 years: p |
thanks, I appreciate your quick action, |
I can 't maintain old release, because the code in the master branch has a big BC break with doctrine/dbal... Maybe I could fix the v6., but v5. is too old |
imho this change can be cherrypicked safely, this file exists and is almost the same (just different import for Doctrine's Type(s) - https://github.com/lexik/LexikFormFilterBundle/blob/v5.0.10/Event/Subscriber/DoctrineORMSubscriber.php) I'm soon gonna have anther fix (I hope) for you in that file, so I would love to have it in v5.0.11 presumably. |
We don't have branches for each version, so I can't create a new tag from the master branch. There is two solutions:
|
Sorry if I'm too pushy, maybe my understanding is wrong here. Thanks for you patience with me and explanation. |
@@ -78,7 +78,7 @@ public function filterEntity(GetFilterConditionEvent $event) | |||
|
|||
if ($dqlFrom = $event->getQueryBuilder()->getDQLPart('from')) { | |||
$rootPart = reset($dqlFrom); | |||
$fieldName = ltrim($event->getField(), $rootPart->getAlias() . '.'); | |||
$fieldName = substr($event->getField(), strlen($rootPart->getAlias.'.')); |
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.
$fieldName = substr($event->getField(), strlen($rootPart->getAlias.'.')); | |
$fieldName = substr($event->getField(), strlen($rootPart->getAlias().'.')); |
No description provided.