Lokasi ngalangkungan proxy:   [ UP ]  
[Ngawartoskeun bug]   [Panyetelan cookie]                
Skip to content

Allow options to be provided to Doctrine - #40449

Closed
summersab wants to merge 1 commit into
nextcloud:masterfrom
summersab:enh/doctrine/middleware
Closed

summersab wants to merge 1 commit into
nextcloud:masterfrom
summersab:enh/doctrine/middleware

Conversation

@summersab

Copy link
Copy Markdown
Contributor

Summary

This allows additional options, configurations, and middlewares to be provided to Doctrine when the DB connection is established.

NOTES

  • Two new optional settings were created in config.php: dbconnectionparams and dbconfigurationparams. I had considered appending these to the existing dbdriveroptions, but these settings are distinctly different. So, I created new settings.
  • In OC\AppFramework\App:
    • The method getAppIdForClass() was incomplete. The function isn't used by anything else, at present
    • The method registerAppClass was 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 way
    • A modified version of OC\App\AppManager::getAppInfo was added instead of using the existing class and method. This is because the DB connection must exist in order to load the AppManager, leading to a race condition.
    • Code was added to OC\DB\ConnectionFactory in order to load the options from config.php, ensure that any custom classes are loaded (using the previously-mentioned methods), and apply the options provided.

TODO

  • ...

Checklist

Comment thread lib/private/AppFramework/App.php Fixed
Comment thread lib/private/AppFramework/App.php Fixed
break;
case "schemaassetsfilter":
$configuration->setSchemaAssetsFilter($value);
break;

Check failure

Code scanning / Psalm

TaintedCallable

Detected tainted text
break;
case "schemaassetsfilter":
$configuration->setSchemaAssetsFilter($value);
break;

Check failure

Code scanning / Psalm

TaintedCallable

Detected tainted text
case "autocommit":
$configuration->setAutoCommit($value);
break;
case "middlewares":

Check failure

Code scanning / Psalm

TaintedCallable

Detected tainted text
case "autocommit":
$configuration->setAutoCommit($value);
break;
case "middlewares":

Check failure

Code scanning / Psalm

TaintedCallable

Detected tainted text
}
}

$connection = DriverManager::getConnection(

Check failure

Code scanning / Psalm

TaintedCallable

Detected tainted text
Signed-off-by: Andrew Summers <18727110+summersab@users.noreply.github.com>

Fix issues with return type for `OC_App::findAppInDirectories`
@summersab
summersab force-pushed the enh/doctrine/middleware branch from c5f5f4e to afa42fd Compare September 18, 2023 15:14
@solracsf solracsf added this to the Nextcloud 28 milestone Nov 21, 2023
@blizzz blizzz mentioned this pull request Nov 22, 2023
1 of 5 tasks
@blizzz blizzz modified the milestones: Nextcloud 28, Nextcloud 29 Nov 23, 2023
This was referenced Mar 12, 2024
@Altahrim Altahrim mentioned this pull request Mar 20, 2024
@skjnldsv skjnldsv modified the milestones: Nextcloud 29, Nextcloud 30 Mar 28, 2024
@skjnldsv skjnldsv modified the milestones: Nextcloud 30, Nextcloud 31 Aug 6, 2024
@blizzz blizzz modified the milestones: Nextcloud 31, Nextcloud 32 Jan 29, 2025
@skjnldsv skjnldsv modified the milestones: Nextcloud 32, Nextcloud 33 Sep 28, 2025
@blizzz blizzz modified the milestones: Nextcloud 33, Nextcloud 34 Feb 16, 2026
@susnux susnux added the community pull requests from community label Jun 9, 2026
@susnux susnux removed this from the Nextcloud 34.0.1 milestone Jun 9, 2026
@susnux

susnux commented Dec 1, 2026

Copy link
Copy Markdown
Contributor

Closing this pull request as it has been in draft state without any activity for more than six months.
If you are still interested in this change, feel free to revive it and reopen it (or ask us to reopen it if you cannot).
Thank you for your contribution!

@susnux susnux closed this Dec 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

2. developing Work in progress community pull requests from community enhancement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Allow additional config parameters for Doctrine

8 participants