Skip to content
Snippets Groups Projects
Unverified Commit e64e2d66 authored by Christoph Wurst's avatar Christoph Wurst Committed by GitHub
Browse files

Merge pull request #21456 from nextcloud/fix/bootstrap-appphp-order

Load the app.php before running apps' boot method
parents 38cbd17e 5bc8510b
No related branches found
No related tags found
No related merge requests found
...@@ -149,9 +149,6 @@ class OC_App { ...@@ -149,9 +149,6 @@ class OC_App {
// in case someone calls loadApp() directly // in case someone calls loadApp() directly
self::registerAutoloading($app, $appPath); self::registerAutoloading($app, $appPath);
/** @var \OC\AppFramework\Bootstrap\Coordinator $coordinator */
$coordinator = \OC::$server->query(\OC\AppFramework\Bootstrap\Coordinator::class);
$coordinator->bootApp($app);
if (is_file($appPath . '/appinfo/app.php')) { if (is_file($appPath . '/appinfo/app.php')) {
\OC::$server->getEventLogger()->start('load_app_' . $app, 'Load app: ' . $app); \OC::$server->getEventLogger()->start('load_app_' . $app, 'Load app: ' . $app);
try { try {
...@@ -176,6 +173,10 @@ class OC_App { ...@@ -176,6 +173,10 @@ class OC_App {
\OC::$server->getEventLogger()->end('load_app_' . $app); \OC::$server->getEventLogger()->end('load_app_' . $app);
} }
/** @var \OC\AppFramework\Bootstrap\Coordinator $coordinator */
$coordinator = \OC::$server->query(\OC\AppFramework\Bootstrap\Coordinator::class);
$coordinator->bootApp($app);
$info = self::getAppInfo($app); $info = self::getAppInfo($app);
if (!empty($info['activity']['filters'])) { if (!empty($info['activity']['filters'])) {
foreach ($info['activity']['filters'] as $filter) { foreach ($info['activity']['filters'] as $filter) {
......
...@@ -38,6 +38,13 @@ interface IBootstrap { ...@@ -38,6 +38,13 @@ interface IBootstrap {
public function register(IRegistrationContext $context): void; public function register(IRegistrationContext $context): void;
/** /**
* Boot the application
*
* At this stage you can assume that all services are registered and the DI
* container(s) are ready to be queried.
*
* This is also the state where an optional `appinfo/app.php` was loaded.
*
* @param IBootContext $context * @param IBootContext $context
* *
* @since 20.0.0 * @since 20.0.0
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment