Hi everyone
A coworker reported a problem with our Workspace application.
In fact, when we execute a controller method (page#index, group#create and so on.), no middleware is triggered.
I read the documentation and I saw in an example we need to implement the IBootstrap interface in the Application class from Nextcloud 25 : Middlewares β Nextcloud latest Developer Manual latest documentation .
I wrote this code :
<?php
namespace OCA\Workspace\AppInfo;
use OCP\AppFramework\App;
use OCP\AppFramework\Bootstrap\IBootContext;
use OCP\AppFramework\Bootstrap\IBootstrap;
class Application extends App implements IBootstrap {
// code
public function boot(IBootContext $contexte): void {
}
}
Then, my middleware work!
Iβm sure my problem comes from IBootstrap.
Furthermore, the Nextcloud 24 documentation doesnβt mention IBootstrap in Application : Middlewares β Nextcloud latest Developer Manual latest documentation .
If that 's where my problem comes from the implementation of IBootstrap, why is not mention in the upgrade guideline : https://docs.nextcloud.com/server/latest/developer_manual/app_publishing_maintenance/app_upgrade_guide/upgrade_to_25.html ?
Is it an omission? If yes, I could create a PR to fill the documentation ?