Allow options to be provided to Doctrine#40449
Draft
summersab wants to merge 1 commit intonextcloud:masterfrom
Draft
Allow options to be provided to Doctrine#40449summersab wants to merge 1 commit intonextcloud:masterfrom
summersab wants to merge 1 commit intonextcloud:masterfrom
Conversation
8e6dd8f to
c5f5f4e
Compare
| break; | ||
| case "schemaassetsfilter": | ||
| $configuration->setSchemaAssetsFilter($value); | ||
| break; |
Check failure
Code scanning / Psalm
TaintedCallable
| break; | ||
| case "schemaassetsfilter": | ||
| $configuration->setSchemaAssetsFilter($value); | ||
| break; |
Check failure
Code scanning / Psalm
TaintedCallable
| case "autocommit": | ||
| $configuration->setAutoCommit($value); | ||
| break; | ||
| case "middlewares": |
Check failure
Code scanning / Psalm
TaintedCallable
| case "autocommit": | ||
| $configuration->setAutoCommit($value); | ||
| break; | ||
| case "middlewares": |
Check failure
Code scanning / Psalm
TaintedCallable
| } | ||
| } | ||
|
|
||
| $connection = DriverManager::getConnection( |
Check failure
Code scanning / Psalm
TaintedCallable
Signed-off-by: Andrew Summers <[email protected]> Fix issues with return type for `OC_App::findAppInDirectories`
c5f5f4e to
afa42fd
Compare
This was referenced Mar 12, 2024
Merged
Merged
Merged
Merged
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
QueryBuilderclass #36572 by allowing for custom middlewares and driver wrappersSummary
This allows additional options, configurations, and middlewares to be provided to Doctrine when the DB connection is established.
NOTES
config.php:dbconnectionparamsanddbconfigurationparams. I had considered appending these to the existingdbdriveroptions, but these settings are distinctly different. So, I created new settings.OC\AppFramework\App:getAppIdForClass()was incomplete. The function isn't used by anything else, at presentregisterAppClasswas added to allow app classes to be registered prior to actually loading the apps. This is because custom classes must be provided when defining middlewares, custom loggers, etc, but any classes provided by an app aren't available when the DB connection is established. This allows an app's classes to be registered in an out-of-band wayOC\App\AppManager::getAppInfowas added instead of using the existing class and method. This is because the DB connection must exist in order to load theAppManager, leading to a race condition.OC\DB\ConnectionFactoryin order to load the options fromconfig.php, ensure that any custom classes are loaded (using the previously-mentioned methods), and apply the options provided.TODO
Checklist