Skip to content
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

Load the app.php before running apps' boot method #21456

Merged
merged 1 commit into from
Jun 17, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions lib/private/legacy/OC_App.php
Original file line number Diff line number Diff line change
Expand Up @@ -149,9 +149,6 @@ public static function loadApp(string $app) {
// in case someone calls loadApp() directly
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')) {
\OC::$server->getEventLogger()->start('load_app_' . $app, 'Load app: ' . $app);
try {
Expand All @@ -176,6 +173,10 @@ public static function loadApp(string $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);
if (!empty($info['activity']['filters'])) {
foreach ($info['activity']['filters'] as $filter) {
Expand Down
7 changes: 7 additions & 0 deletions lib/public/AppFramework/Bootstrap/IBootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,13 @@ interface IBootstrap {
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
*
* @since 20.0.0
Expand Down