diff --git a/apps/accessibility/appinfo/app.php b/apps/accessibility/appinfo/app.php
index 96621a1682909c9c45447254b954f3bc6d30cddb..4421c732bd89d3fed5ebde15548b49459b44419d 100644
--- a/apps/accessibility/appinfo/app.php
+++ b/apps/accessibility/appinfo/app.php
@@ -22,10 +22,12 @@ declare (strict_types = 1);
  *
  */
 
-$app = new \OCA\Accessibility\AppInfo\Application();
+use OCA\Accessibility\AppInfo\Application;
+
+$app = \OC::$server->query(Application::class);
 
 // Separate from the constructor since the route are not initialized before that
 // 1. create the app
 // 2. generate css route and inject
 $app->injectCss();
-$app->injectJavascript();
\ No newline at end of file
+$app->injectJavascript();
diff --git a/apps/cloud_federation_api/appinfo/app.php b/apps/cloud_federation_api/appinfo/app.php
index 9b79832d8177ca5edfb3595d20f21efcdeb10ba7..eaba54bb2db0e73d395a07733c3b9358a4e77193 100644
--- a/apps/cloud_federation_api/appinfo/app.php
+++ b/apps/cloud_federation_api/appinfo/app.php
@@ -19,4 +19,6 @@
  *
  */
 
-$app = new \OCA\CloudFederationAPI\AppInfo\Application();
+use OCA\CloudFederationAPI\AppInfo\Application;
+
+\OC::$server->query(Application::class);
diff --git a/apps/federatedfilesharing/appinfo/app.php b/apps/federatedfilesharing/appinfo/app.php
index 6b273faca80419b64998a48aca184161940d36eb..025bc86b776863b8368c3b3e8b8aac23df00b572 100644
--- a/apps/federatedfilesharing/appinfo/app.php
+++ b/apps/federatedfilesharing/appinfo/app.php
@@ -24,8 +24,9 @@
  */
 
 use OCA\FederatedFileSharing\Notifier;
+use OCA\FederatedFileSharing\AppInfo\Application;
 
-$app = new \OCA\FederatedFileSharing\AppInfo\Application();
+$app = \OC::$server->query(Application::class);
 $eventDispatcher = \OC::$server->getEventDispatcher();
 
 $manager = \OC::$server->getNotificationManager();
diff --git a/apps/files_sharing/appinfo/app.php b/apps/files_sharing/appinfo/app.php
index 32159f7b97331d3b30eedcd0db37ff1323ec245a..c4f44095dcd618409b0e48822a23bddb41b07579 100644
--- a/apps/files_sharing/appinfo/app.php
+++ b/apps/files_sharing/appinfo/app.php
@@ -29,13 +29,14 @@
 
 use OCA\Files_Sharing\ShareBackend\File;
 use OCA\Files_Sharing\ShareBackend\Folder;
+use OCA\Files_Sharing\AppInfo\Application;
 
 \OCA\Files_Sharing\Helper::registerHooks();
 
 \OC\Share\Share::registerBackend('file', File::class);
 \OC\Share\Share::registerBackend('folder', Folder::class, 'file');
 
-$application = new \OCA\Files_Sharing\AppInfo\Application();
+$application = \OC::$server->query(Application::class);
 $application->registerMountProviders();
 
 $eventDispatcher = \OC::$server->getEventDispatcher();
diff --git a/apps/lookup_server_connector/appinfo/app.php b/apps/lookup_server_connector/appinfo/app.php
index e1064b144a45256f1ea1ded0493fd4b04f03fe30..4fae295e96a01d55e023defa3488c5cd5c058a76 100644
--- a/apps/lookup_server_connector/appinfo/app.php
+++ b/apps/lookup_server_connector/appinfo/app.php
@@ -19,5 +19,7 @@
  *
  */
 
-$app = new \OCA\LookupServerConnector\AppInfo\Application();
+use OCA\LookupServerConnector\AppInfo\Application;
+
+$app = \OC::$server->query(Application::class);
 $app->register();
diff --git a/apps/sharebymail/appinfo/app.php b/apps/sharebymail/appinfo/app.php
index c1fd39d2a2f7f49957efdbd03c8fd49293825252..e1bc280821d4350d2d82b41ac80b7eec5cae746b 100644
--- a/apps/sharebymail/appinfo/app.php
+++ b/apps/sharebymail/appinfo/app.php
@@ -19,4 +19,6 @@
  *
  */
 
-$app = new \OCA\ShareByMail\AppInfo\Application();
+use OCA\ShareByMail\AppInfo\Application;
+
+$app = \OC::$server->query(Application::class);
diff --git a/apps/systemtags/appinfo/app.php b/apps/systemtags/appinfo/app.php
index 82eb2a29f4be6b872474c436ac88408ca55ada54..8c0341b589403c6fdfabcfc6ea3ac5cd9361bc3c 100644
--- a/apps/systemtags/appinfo/app.php
+++ b/apps/systemtags/appinfo/app.php
@@ -39,9 +39,8 @@ $eventDispatcher->addListener(
 );
 
 $managerListener = function(ManagerEvent $event) {
-	$application = new \OCP\AppFramework\App('systemtags');
 	/** @var \OCA\SystemTags\Activity\Listener $listener */
-	$listener = $application->getContainer()->query(Listener::class);
+	$listener = \OC::$server->query(Listener::class);
 	$listener->event($event);
 };
 
@@ -52,7 +51,7 @@ $eventDispatcher->addListener(ManagerEvent::EVENT_UPDATE, $managerListener);
 $mapperListener = function(MapperEvent $event) {
 	$application = new \OCP\AppFramework\App('systemtags');
 	/** @var \OCA\SystemTags\Activity\Listener $listener */
-	$listener = $application->getContainer()->query(Listener::class);
+	$listener = \OC::$server->query(Listener::class);
 	$listener->mapperEvent($event);
 };
 
diff --git a/apps/theming/appinfo/app.php b/apps/theming/appinfo/app.php
index dc8e00f4ed5c433a8e5c2829892ba0d197f31901..ba60d44870b5a2ee9519c6c120dc037398b4da6b 100644
--- a/apps/theming/appinfo/app.php
+++ b/apps/theming/appinfo/app.php
@@ -25,7 +25,9 @@
  *
  */
 
-$app = new \OCP\AppFramework\App('theming');
+use OCA\Theming\AppInfo\Application;
+
+$app = \OC::$server->query(Application::class);
 $app->getContainer()->registerCapability(\OCA\Theming\Capabilities::class);
 
 $linkToCSS = \OC::$server->getURLGenerator()->linkToRoute(
diff --git a/apps/theming/lib/AppInfo/Application.php b/apps/theming/lib/AppInfo/Application.php
new file mode 100644
index 0000000000000000000000000000000000000000..519e49077f8488a3d3b2e3999d3bcfb977fe56bc
--- /dev/null
+++ b/apps/theming/lib/AppInfo/Application.php
@@ -0,0 +1,28 @@
+<?php
+/**
+ * @copyright Copyright (c) 2019 Robin Appelman <robin@icewind.nl>
+ *
+ * @license GNU AGPL version 3 or any later version
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+namespace OCA\Theming\AppInfo;
+
+class Application extends \OCP\AppFramework\App {
+	public function __construct() {
+		parent::__construct('theming', []);
+	}
+}
\ No newline at end of file
diff --git a/apps/twofactor_backupcodes/appinfo/app.php b/apps/twofactor_backupcodes/appinfo/app.php
index 34b4866af2dbca70d0bdcbe695f0016da60d3d14..f67e89d23b764f10d6d32917c4af2acac70bc0ba 100644
--- a/apps/twofactor_backupcodes/appinfo/app.php
+++ b/apps/twofactor_backupcodes/appinfo/app.php
@@ -21,5 +21,7 @@
  *
  */
 
-$app = new \OCA\TwoFactorBackupCodes\AppInfo\Application();
+use OCA\TwoFactorBackupCodes\AppInfo\Application;
+
+$app = \OC::$server->query(Application::class);
 $app->register();
diff --git a/apps/updatenotification/appinfo/app.php b/apps/updatenotification/appinfo/app.php
index 5002fd7c8371ec23e422b3e0cff9a56525116a52..6a34aa79d9b0473eedfac79907d91ef9f3762fe2 100644
--- a/apps/updatenotification/appinfo/app.php
+++ b/apps/updatenotification/appinfo/app.php
@@ -21,5 +21,8 @@
  *
  */
 
-$app = new \OCA\UpdateNotification\AppInfo\Application();
+use \OCA\UpdateNotification\AppInfo\Application;
+
+/** @var Application $app */
+$app = \OC::$server->query(Application::class);
 $app->register();
diff --git a/apps/workflowengine/appinfo/app.php b/apps/workflowengine/appinfo/app.php
index d99c589223196e9fe88579a599aec7b1a6d6cab3..552d84326006e9ed54f47a7c7f19e3dcc9a8891e 100644
--- a/apps/workflowengine/appinfo/app.php
+++ b/apps/workflowengine/appinfo/app.php
@@ -19,6 +19,9 @@
  *
  */
 
-$application = new \OCA\WorkflowEngine\AppInfo\Application();
+use \OCA\WorkflowEngine\AppInfo\Application;
+
+/** @var Application $application */
+$application = \OC::$server->query(Application::class);
 $application->registerHooksAndListeners();
 $application->registerRuleListeners();