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

Allow params of function substring to also support an expression function #9018

Open
wants to merge 1 commit into
base: 3.2.x
Choose a base branch
from

Conversation

karstennilsen
Copy link

This is something which should work:

 $qb->expr()->substring(
                    $qb->expr()->literal($var),
                    1,
                    $qb->expr()->length($qb->expr()->concat('cc', 'ndc'))
                )

@greg0ire
Copy link
Member

Allow params of function substring to also an expression function

I think a word is missing 😛

@karstennilsen karstennilsen changed the title Allow params of function substring to also an expression function Allow params of function substring to also support an expression function Sep 17, 2021
@gmta
Copy link

gmta commented Sep 4, 2023

👍 According to the DQL EBNF, the 2nd and 3rd arguments to ::substring() are indeed SimpleArithmeticExpressions and as such a subexpression should be possible.

@gmta
Copy link

gmta commented Mar 8, 2024

@greg0ire Can I help unblock this PR? It seems a simple enough change :-)

@greg0ire greg0ire changed the base branch from 2.9.x to 2.19.x March 9, 2024 10:25
@greg0ire
Copy link
Member

greg0ire commented Mar 9, 2024

Retargeted to 2.19.x. There is a conflict now, which needs to be fixed by @karstennilsen or by you in another PR.

@karstennilsen
Copy link
Author

Retargeted to 2.19.x. There is a conflict now, which needs to be fixed by @karstennilsen or by you in another PR.

Should be fixed now. If there is anythin else needed, please let me know.

@greg0ire
Copy link
Member

It seems there are CI jobs failing. Please take a look at this guide for more on how to handle those.

@greg0ire greg0ire changed the base branch from 2.19.x to 3.2.x March 11, 2024 10:00
@greg0ire
Copy link
Member

greg0ire commented Mar 11, 2024

Also, I retargeted to 3.2.x since this MR does not improve compatibility with ORM 3. Sorry for not thinking of that sooner. This leads to conflicts.

@karstennilsen
Copy link
Author

@greg0ire New version targets 3.2.x and should pass CI (tried it locally). Please approve 😊

Copy link
Contributor

github-actions bot commented Dec 2, 2024

There hasn't been any activity on this pull request in the past 90 days, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 7 days.
If you want to continue working on it, please leave a comment.

@github-actions github-actions bot added the Stale label Dec 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants