Upgrade to Nextcloud 19
Critical changes were collected on GitHub. See the original ticket for links to the pull requests and tickets.
As of Nextcloud 19, the global jquery and $ are deprecated for apps. While the library won’t be removed immediately to give developers time to adapt, we encourage you to either replace it with another library or simply use a bundling tool like webpack to scope it to your own. The library will be upgraded in Nextcloud in future versions of Nextcloud and there are breaking changes in the newer versions of jQuery.
Deprecated global variables
OC.get: use https://lodash.com/docs#get
OC.set: use https://lodash.com/docs#set
OCP.Toast.*: use https://www.npmjs.com/package/@nextcloud/dialogs
Symfony was updated to v4.4. The most important change for apps is to return an int value from CLI commands. Returning null (explicitly or implicitly) won’t be allowed in future versions of Symfony.
Deprecation of injection of named services
Apps had been able to query core services like the implementation of the interface
TagManager. To unify the service resolution with type hints for the constructor injection, the named resolution is deprecated, logs warnings and will be removed in the future. Use the fully-qualifier class name (with the ::class constant) instead:
If you had
$tagManager = \OC::$server->query('TagManager');
change your code to
$tagManager = \OC::$server->query(\OCP\ITagManager::class);
On constructor arguments you should always type-hint the service by its interface. If you do so already, nothing changes for you.
\OCP\User\Events\BeforeUserLoggedInEvent::getUsernamenow correctly returns a string and not an