-
-
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
fix: fix share reminder job for oracle #48182
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
This sounds like a serious bug in doctrine which we should report and get addressed upstream?
The binding type should be
ParameterType::
https://github.com/nextcloud/3rdparty/blob/9ca60e9d2b12f711a756c35d37fd19c178db685b/doctrine/dbal/src/Types/BooleanType.php#L56-L59
Doc block of ParameterType also states that it is for statement parameters:
https://github.com/nextcloud/3rdparty/blob/a9be8d0755e6d786c34e44ef29e88d8f9b90c65b/doctrine/dbal/src/ParameterType.php#L6
The
Types
are the dbal typesThere 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.
Let me try if bumping doctrine to 3.9.1 fixes it #48306
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.
Okay, still fails with 3.9.1
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.
Thanks!
I've debugged the weirdness with OCI and booleans a while ago: #45630
The type constants from doctrine/dbal allows us to use doctrine type conversion logic. I was unsure back then about changing it because apps, especially on OCI, may depend on the broken behavior.
Should we also update the other constants to use the doctrine types?
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.
As said I think the switch that was done here is actually wrong. It uses the DBAL architectural type now and not the PDO parameter type anymore.
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.
Depends ;)
Using the DBAL type leads to doctrine taking care of the type juggeling for us. That's probably good, but also a risky change. We don't know if the results are still the same.
We are not using the pdo driver for OCI. I think that's the reason for the weird behavior with OCI, especially with booleans. The OCI driver just didn't know what to do with type "5" (because that's the pdo constant) and fallbacks to string as default. If we use the dbal type doctrine will convert the boolean to 0/1 and set type int.
I've discussed #45630 with Christoph a while ago, and we didn't know how to move forward 🤷
We updated doctrine since then, not sure if my observations are still correct
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.
Note that we already use the DBAL types for datetime and json