Upgrade to Nextcloud 30
General
Front-end changes
Font sizes
Nextcloud now provides meaningful default styles for heading elements. This can cause visual regressions if your code does not explicitly set font size and weight. If you need to use heading elements outside of text content, you might need to adjust their styles.
Added APIs
Changed APIs
Removed APIs
Removed globals
Deprecated APIs
OC.dialogs.fileexists
was already deprecated in Nextcloud 29, but is now also marked as such. UseopenConflictPicker
from @nextcloud/upload instead.Most
OC.dialogs
API is now deprecated and will be removed in the future. For generic dialogs use theDialogBuilder
from the @nextcloud/dialogs. A list of the now deprecated methods:OC.dialogs.alert
OC.dialogs.info
OC.dialogs.confirm
OC.dialogs.confirmDestructive
OC.dialogs.confirmHtml
OC.dialogs.prompt
OC.dialogs.message
Back-end changes
Support for PHP 8.0 removed
In this release support for PHP 8.0 was removed. Follow the steps below to make your app compatible.
If
appinfo/info.xml
has a dependency specification for PHP, increase themin-version
to 8.1.
<dependencies>
<php min-version="8.1" max-version="8.3" />
<nextcloud min-version="27" max-version="30" />
</dependencies>
If your app has a
composer.json
and the file contains the PHP restrictions frominfo.xml
, adjust it as well.
{
"require": {
"php": ">=8.1 <=8.3"
}
}
If you have continuous integration set up, remove PHP 8.0 from the matrices of tests and linters.
Added APIs
OCP\Notification\IncompleteNotificationException
is thrown byOCP\Notification\IManager::notify()
when not all required fields have been set on theOCP\Notification\INotification
objectOCP\Notification\IncompleteParsedNotificationException
is thrown byOCP\Notification\IManager::prepare()
when noOCP\Notification\INotifier
handled theOCP\Notification\INotification
objectOCP\Notification\InvalidValueException
is thrown byOCP\Notification\IAction::set*()
andOCP\Notification\INotification::set*()
when the value did not match the required criteriaOCP\Notification\UnknownNotificationException
should be thrown byOCP\Notification\INotifier::prepare()
when they didn’t handle the notification
Changed APIs
OCP\Notification\IAction::set*()
(all setters) throwOCP\Notification\InvalidValueException
instead of\InvalidArgumentException
when the value does not match the required criteria.Calling
OCP\Notification\IAction::setLink()
with a relative URL is deprecated and will throwOCP\Notification\InvalidValueException
in a future version.OCP\Notification\IApp::notify()
throwsOCP\Notification\IncompleteNotificationException
instead of\InvalidArgumentException
when a required field is not set before notifying.OCP\Notification\IManager::prepare()
throwsOCP\Notification\IncompleteParsedNotificationException
instead of\InvalidArgumentException
when a required field is not set after preparing a notification.OCP\Notification\INotification::set*()
(all setters) throwOCP\Notification\InvalidValueException
instead of\InvalidArgumentException
when the value does not match the required criteria.Calling
OCP\Notification\INotification::setLink()
with a relative URL is deprecated and will throwOCP\Notification\InvalidValueException
in a future version.Calling
OCP\Notification\INotification::setIcon()
with a relative URL is deprecated and will throwOCP\Notification\InvalidValueException
in a future version.OCP\Notification\INotifier::prepare()
should no longer throw\InvalidArgumentException
.OCP\Notification\UnknownNotificationException
should be thrown when the notifier does not want to handle the notification.\InvalidArgumentException
are logged as debug for now and will be logged as error in the future to help developers find issues from code that unintentionally threw\InvalidArgumentException