-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
Throw our own exception in \OCP\DB\QueryBuilder\IQueryBuilder::execute #26182
Conversation
/backport to stable21 |
This change actually has a lot of potential to break things 😬 |
CI says "no" :/ |
execute is depratecated anyway. I vote to not break stuff. And just leave it as it. Then when we move stuff over it will just get cleaner over time |
The exception is documented to be thrown in our upgrade docs and in the method docblock. This is confusing for devs and static analysis. Shall we fix the docblock instead? Both are breaking fixes. |
Ah ok I missed that part. |
I vote for doing it with our Exception. We promoted it in the upgrade docs and people released all their apps with it I guess? |
It will depend on whether people adjusted their code to what the method docs say or what exceptions they found during debugging. Both changing the thrown exception and changing the documented exception has potential for an ugly breaking change, but I'd rather break towards a consistent API. |
In any case for master we should definitely do this. Only the backport to 21 is up for debate :) |
That hasn't changed yet 😢 |
ping |
Just as documented. This seems to be a leftover form the dbal changes in 21. We noticed that `execute` still throws the raw dbal exception and catches for the documented execption never trigger. Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
afffc0c
to
57f9011
Compare
All code using |
So, 🤡 idea: |
I like your thinking. |
That is actually our current situation. |
Yeah but the methods are newer than this PR? So adjust the docs of execute() instead? |
Then I need this for all the ~15 subtypes of doctrine's exception. This isn't practical at all. |
So lets adjust the docs on the deprecated method to the reality and the new code is good going forward? |
Let's leave this deprecated method as is. |
Just as documented. This seems to be a leftover form the dbal changes in
21. We noticed that
execute
still throws the raw dbal exception andcatches for the documented execption never trigger.
Follow-up to #24948