diff --git a/apps/comments/lib/AppInfo/Application.php b/apps/comments/lib/AppInfo/Application.php
index 9168948d7c80837aee1fe13476328ea026f80d11..cc8bf297b91d67a847a6553189e634362b55e6a8 100644
--- a/apps/comments/lib/AppInfo/Application.php
+++ b/apps/comments/lib/AppInfo/Application.php
@@ -42,7 +42,7 @@ use OCP\EventDispatcher\IEventDispatcher;
 use OCP\Util;
 
 class Application extends App {
-	const APP_ID = 'comments';
+	public const APP_ID = 'comments';
 
 	public function __construct(array $urlParams = []) {
 		parent::__construct(self::APP_ID, $urlParams);
diff --git a/apps/dav/lib/AppInfo/Application.php b/apps/dav/lib/AppInfo/Application.php
index 7a80c9b21527c1a0e2ca59383f913adf473c3f02..29c77cad07f624ae9a6d3e474e710973c821566c 100644
--- a/apps/dav/lib/AppInfo/Application.php
+++ b/apps/dav/lib/AppInfo/Application.php
@@ -53,7 +53,7 @@ use OCP\IUser;
 use Symfony\Component\EventDispatcher\GenericEvent;
 
 class Application extends App {
-	const APP_ID = 'dav';
+	public const APP_ID = 'dav';
 
 	/**
 	 * Application constructor.
diff --git a/apps/dav/lib/CalDAV/Activity/Provider/Calendar.php b/apps/dav/lib/CalDAV/Activity/Provider/Calendar.php
index 42b70f0a92830b91f45809e34fe57afd41081ac6..ee0d6144c921126c131b3f850dc0dd82fc48c3f8 100644
--- a/apps/dav/lib/CalDAV/Activity/Provider/Calendar.php
+++ b/apps/dav/lib/CalDAV/Activity/Provider/Calendar.php
@@ -36,15 +36,15 @@ use OCP\IUserManager;
 use OCP\L10N\IFactory;
 
 class Calendar extends Base {
-	const SUBJECT_ADD = 'calendar_add';
-	const SUBJECT_UPDATE = 'calendar_update';
-	const SUBJECT_DELETE = 'calendar_delete';
-	const SUBJECT_PUBLISH = 'calendar_publish';
-	const SUBJECT_UNPUBLISH = 'calendar_unpublish';
-	const SUBJECT_SHARE_USER = 'calendar_user_share';
-	const SUBJECT_SHARE_GROUP = 'calendar_group_share';
-	const SUBJECT_UNSHARE_USER = 'calendar_user_unshare';
-	const SUBJECT_UNSHARE_GROUP = 'calendar_group_unshare';
+	public const SUBJECT_ADD = 'calendar_add';
+	public const SUBJECT_UPDATE = 'calendar_update';
+	public const SUBJECT_DELETE = 'calendar_delete';
+	public const SUBJECT_PUBLISH = 'calendar_publish';
+	public const SUBJECT_UNPUBLISH = 'calendar_unpublish';
+	public const SUBJECT_SHARE_USER = 'calendar_user_share';
+	public const SUBJECT_SHARE_GROUP = 'calendar_group_share';
+	public const SUBJECT_UNSHARE_USER = 'calendar_user_unshare';
+	public const SUBJECT_UNSHARE_GROUP = 'calendar_group_unshare';
 
 	/** @var IFactory */
 	protected $languageFactory;
diff --git a/apps/dav/lib/CalDAV/Activity/Provider/Event.php b/apps/dav/lib/CalDAV/Activity/Provider/Event.php
index f044c2f820832334e3a09d1eb9bb9eed5c63e3b7..9ca0727fab7b21c4fc23a41186145f28f3521d15 100644
--- a/apps/dav/lib/CalDAV/Activity/Provider/Event.php
+++ b/apps/dav/lib/CalDAV/Activity/Provider/Event.php
@@ -34,9 +34,9 @@ use OCP\IUserManager;
 use OCP\L10N\IFactory;
 
 class Event extends Base {
-	const SUBJECT_OBJECT_ADD = 'object_add';
-	const SUBJECT_OBJECT_UPDATE = 'object_update';
-	const SUBJECT_OBJECT_DELETE = 'object_delete';
+	public const SUBJECT_OBJECT_ADD = 'object_add';
+	public const SUBJECT_OBJECT_UPDATE = 'object_update';
+	public const SUBJECT_OBJECT_DELETE = 'object_delete';
 
 	/** @var IFactory */
 	protected $languageFactory;
diff --git a/apps/dav/lib/CalDAV/BirthdayCalendar/EnablePlugin.php b/apps/dav/lib/CalDAV/BirthdayCalendar/EnablePlugin.php
index a1ebd409f0e04bc2308a4ee1d26422c898540667..1c77b8d42721c9fc26bc6abdc993c4842eaf0073 100644
--- a/apps/dav/lib/CalDAV/BirthdayCalendar/EnablePlugin.php
+++ b/apps/dav/lib/CalDAV/BirthdayCalendar/EnablePlugin.php
@@ -39,7 +39,7 @@ use Sabre\HTTP\ResponseInterface;
  * @package OCA\DAV\CalDAV\BirthdayCalendar
  */
 class EnablePlugin extends ServerPlugin {
-	const NS_Nextcloud = 'http://nextcloud.com/ns';
+	public const NS_Nextcloud = 'http://nextcloud.com/ns';
 
 	/**
 	 * @var IConfig
diff --git a/apps/dav/lib/CalDAV/BirthdayService.php b/apps/dav/lib/CalDAV/BirthdayService.php
index 2969e5f3ead8127d26948fd0684113255198fdf1..ab70d6ceb43bdb4c7d0aee6fdf9d98b2ae15c642 100644
--- a/apps/dav/lib/CalDAV/BirthdayService.php
+++ b/apps/dav/lib/CalDAV/BirthdayService.php
@@ -49,7 +49,7 @@ use Sabre\VObject\Reader;
  * @package OCA\DAV\CalDAV
  */
 class BirthdayService {
-	const BIRTHDAY_CALENDAR_URI = 'contact_birthdays';
+	public const BIRTHDAY_CALENDAR_URI = 'contact_birthdays';
 
 	/** @var GroupPrincipalBackend */
 	private $principalBackend;
diff --git a/apps/dav/lib/CalDAV/CalDavBackend.php b/apps/dav/lib/CalDAV/CalDavBackend.php
index b620b20d4d5b08b78a83713b4966aeeebc71b5a9..ddfb0a641e5db9ad2b7e2e454ddab959e9878137 100644
--- a/apps/dav/lib/CalDAV/CalDavBackend.php
+++ b/apps/dav/lib/CalDAV/CalDavBackend.php
@@ -77,14 +77,14 @@ use Symfony\Component\EventDispatcher\GenericEvent;
  * @package OCA\DAV\CalDAV
  */
 class CalDavBackend extends AbstractBackend implements SyncSupport, SubscriptionSupport, SchedulingSupport {
-	const CALENDAR_TYPE_CALENDAR = 0;
-	const CALENDAR_TYPE_SUBSCRIPTION = 1;
+	public const CALENDAR_TYPE_CALENDAR = 0;
+	public const CALENDAR_TYPE_SUBSCRIPTION = 1;
 
-	const PERSONAL_CALENDAR_URI = 'personal';
-	const PERSONAL_CALENDAR_NAME = 'Personal';
+	public const PERSONAL_CALENDAR_URI = 'personal';
+	public const PERSONAL_CALENDAR_NAME = 'Personal';
 
-	const RESOURCE_BOOKING_CALENDAR_URI = 'calendar';
-	const RESOURCE_BOOKING_CALENDAR_NAME = 'Calendar';
+	public const RESOURCE_BOOKING_CALENDAR_URI = 'calendar';
+	public const RESOURCE_BOOKING_CALENDAR_NAME = 'Calendar';
 
 	/**
 	 * We need to specify a max date, because we need to stop *somewhere*
@@ -94,12 +94,12 @@ class CalDavBackend extends AbstractBackend implements SyncSupport, Subscription
 	 * in 2038-01-19 to avoid problems when the date is converted
 	 * to a unix timestamp.
 	 */
-	const MAX_DATE = '2038-01-01';
+	public const MAX_DATE = '2038-01-01';
 
-	const ACCESS_PUBLIC = 4;
-	const CLASSIFICATION_PUBLIC = 0;
-	const CLASSIFICATION_PRIVATE = 1;
-	const CLASSIFICATION_CONFIDENTIAL = 2;
+	public const ACCESS_PUBLIC = 4;
+	public const CLASSIFICATION_PUBLIC = 0;
+	public const CLASSIFICATION_PRIVATE = 1;
+	public const CLASSIFICATION_CONFIDENTIAL = 2;
 
 	/**
 	 * List of CalDAV properties, and how they map to database field names
diff --git a/apps/dav/lib/CalDAV/Plugin.php b/apps/dav/lib/CalDAV/Plugin.php
index c298a3f5ab63ba209d36560fdfb036cc1a1c4df7..4c865ba2ae7070740ed76498115b47bc85d5958d 100644
--- a/apps/dav/lib/CalDAV/Plugin.php
+++ b/apps/dav/lib/CalDAV/Plugin.php
@@ -25,7 +25,7 @@
 namespace OCA\DAV\CalDAV;
 
 class Plugin extends \Sabre\CalDAV\Plugin {
-	const SYSTEM_CALENDAR_ROOT = 'system-calendars';
+	public const SYSTEM_CALENDAR_ROOT = 'system-calendars';
 
 	/**
 	 * Returns the path to a principal's calendar home.
diff --git a/apps/dav/lib/CalDAV/Proxy/ProxyMapper.php b/apps/dav/lib/CalDAV/Proxy/ProxyMapper.php
index bc13efc1e5a4f14741cd04d5475da443014e2d0d..689a6f0efc8f612c7e0b0cf4149f6bb1057445b3 100644
--- a/apps/dav/lib/CalDAV/Proxy/ProxyMapper.php
+++ b/apps/dav/lib/CalDAV/Proxy/ProxyMapper.php
@@ -36,8 +36,8 @@ use OCP\IDBConnection;
  * @package OCA\DAV\CalDAV\Proxy
  */
 class ProxyMapper extends QBMapper {
-	const PERMISSION_READ  = 1;
-	const PERMISSION_WRITE = 2;
+	public const PERMISSION_READ  = 1;
+	public const PERMISSION_WRITE = 2;
 
 	/**
 	 * ProxyMapper constructor.
diff --git a/apps/dav/lib/CalDAV/Publishing/PublishPlugin.php b/apps/dav/lib/CalDAV/Publishing/PublishPlugin.php
index 214fb79464e0784b0993b00132ee03cbf8341473..e3561527ce069ee0269739cdda79743d4d7ac56c 100644
--- a/apps/dav/lib/CalDAV/Publishing/PublishPlugin.php
+++ b/apps/dav/lib/CalDAV/Publishing/PublishPlugin.php
@@ -40,7 +40,7 @@ use Sabre\HTTP\RequestInterface;
 use Sabre\HTTP\ResponseInterface;
 
 class PublishPlugin extends ServerPlugin {
-	const NS_CALENDARSERVER = 'http://calendarserver.org/ns/';
+	public const NS_CALENDARSERVER = 'http://calendarserver.org/ns/';
 
 	/**
 	 * Reference to SabreDAV server object.
diff --git a/apps/dav/lib/CalDAV/Schedule/IMipPlugin.php b/apps/dav/lib/CalDAV/Schedule/IMipPlugin.php
index 15228f9bc3d49969c9757d6db49baedbd7044ce2..2bbc6498dba0a7c6d2156dd4b166b90ddb413a08 100644
--- a/apps/dav/lib/CalDAV/Schedule/IMipPlugin.php
+++ b/apps/dav/lib/CalDAV/Schedule/IMipPlugin.php
@@ -102,11 +102,11 @@ class IMipPlugin extends SabreIMipPlugin {
 	/** @var IUserManager */
 	private $userManager;
 
-	const MAX_DATE = '2038-01-01';
+	public const MAX_DATE = '2038-01-01';
 
-	const METHOD_REQUEST = 'request';
-	const METHOD_REPLY = 'reply';
-	const METHOD_CANCEL = 'cancel';
+	public const METHOD_REQUEST = 'request';
+	public const METHOD_REPLY = 'reply';
+	public const METHOD_CANCEL = 'cancel';
 
 	/**
 	 * @param IConfig $config
diff --git a/apps/dav/lib/CalDAV/Search/SearchPlugin.php b/apps/dav/lib/CalDAV/Search/SearchPlugin.php
index dc3cbdf06ba7905dec01b6bfc658ecc1fcd2f0c5..0776e8838b8f3772e3f8afe72a71b03592223c1d 100644
--- a/apps/dav/lib/CalDAV/Search/SearchPlugin.php
+++ b/apps/dav/lib/CalDAV/Search/SearchPlugin.php
@@ -32,7 +32,7 @@ use Sabre\DAV\Server;
 use Sabre\DAV\ServerPlugin;
 
 class SearchPlugin extends ServerPlugin {
-	const NS_Nextcloud = 'http://nextcloud.com/ns';
+	public const NS_Nextcloud = 'http://nextcloud.com/ns';
 
 	/**
 	 * Reference to SabreDAV server object.
diff --git a/apps/dav/lib/CalDAV/WebcalCaching/Plugin.php b/apps/dav/lib/CalDAV/WebcalCaching/Plugin.php
index 2cfeb1108f1843b1a5081c57961f2d6bca81c9f5..8cfbb38b6e031c33eb44121251669fa1944e8f6c 100644
--- a/apps/dav/lib/CalDAV/WebcalCaching/Plugin.php
+++ b/apps/dav/lib/CalDAV/WebcalCaching/Plugin.php
@@ -43,7 +43,7 @@ class Plugin extends ServerPlugin {
 	 *
 	 * @var string[]
 	 */
-	const ENABLE_FOR_CLIENTS = [];
+	public const ENABLE_FOR_CLIENTS = [];
 
 	/**
 	 * @var bool
diff --git a/apps/dav/lib/CardDAV/CardDavBackend.php b/apps/dav/lib/CardDAV/CardDavBackend.php
index 782bc4c0f58da29bb5b4dc8d2bdaff4dc443f19a..71b7e846f3d3b7966a72fb8ce673fb8e6adca435 100644
--- a/apps/dav/lib/CardDAV/CardDavBackend.php
+++ b/apps/dav/lib/CardDAV/CardDavBackend.php
@@ -55,8 +55,8 @@ use Symfony\Component\EventDispatcher\EventDispatcherInterface;
 use Symfony\Component\EventDispatcher\GenericEvent;
 
 class CardDavBackend implements BackendInterface, SyncSupport {
-	const PERSONAL_ADDRESSBOOK_URI = 'contacts';
-	const PERSONAL_ADDRESSBOOK_NAME = 'Contacts';
+	public const PERSONAL_ADDRESSBOOK_URI = 'contacts';
+	public const PERSONAL_ADDRESSBOOK_NAME = 'Contacts';
 
 	/** @var Principal */
 	private $principalBackend;
diff --git a/apps/dav/lib/CardDAV/Xml/Groups.php b/apps/dav/lib/CardDAV/Xml/Groups.php
index 701aa679b44d1cf3d3b2dc4c3ddd787c4133458c..ea195ca3e216b56318343ef4733eb9da30fd283c 100644
--- a/apps/dav/lib/CardDAV/Xml/Groups.php
+++ b/apps/dav/lib/CardDAV/Xml/Groups.php
@@ -27,7 +27,7 @@ use Sabre\Xml\Writer;
 use Sabre\Xml\XmlSerializable;
 
 class Groups implements XmlSerializable {
-	const NS_OWNCLOUD = 'http://owncloud.org/ns';
+	public const NS_OWNCLOUD = 'http://owncloud.org/ns';
 
 	/** @var string[] of TYPE:CHECKSUM */
 	private $groups;
diff --git a/apps/dav/lib/Command/MoveCalendar.php b/apps/dav/lib/Command/MoveCalendar.php
index 366e51ad1892ae9644d0041071203c7783ab42b2..10fa69b70ca3f1f9b93397162a0a37bcd8765531 100644
--- a/apps/dav/lib/Command/MoveCalendar.php
+++ b/apps/dav/lib/Command/MoveCalendar.php
@@ -62,7 +62,7 @@ class MoveCalendar extends Command {
 	/** @var CalDavBackend */
 	private $calDav;
 
-	const URI_USERS = 'principals/users/';
+	public const URI_USERS = 'principals/users/';
 
 	/**
 	 * @param IUserManager $userManager
diff --git a/apps/dav/lib/Comments/CommentNode.php b/apps/dav/lib/Comments/CommentNode.php
index d21f13ebccd6bff4f520eddcd4e1c13cdc4ec5fe..03bc432ccb9a95e63c3b36d626b9d83947ca76e1 100644
--- a/apps/dav/lib/Comments/CommentNode.php
+++ b/apps/dav/lib/Comments/CommentNode.php
@@ -35,16 +35,16 @@ use Sabre\DAV\Exception\MethodNotAllowed;
 use Sabre\DAV\PropPatch;
 
 class CommentNode implements \Sabre\DAV\INode, \Sabre\DAV\IProperties {
-	const NS_OWNCLOUD = 'http://owncloud.org/ns';
+	public const NS_OWNCLOUD = 'http://owncloud.org/ns';
 
-	const PROPERTY_NAME_UNREAD = '{http://owncloud.org/ns}isUnread';
-	const PROPERTY_NAME_MESSAGE = '{http://owncloud.org/ns}message';
-	const PROPERTY_NAME_ACTOR_DISPLAYNAME = '{http://owncloud.org/ns}actorDisplayName';
-	const PROPERTY_NAME_MENTIONS = '{http://owncloud.org/ns}mentions';
-	const PROPERTY_NAME_MENTION = '{http://owncloud.org/ns}mention';
-	const PROPERTY_NAME_MENTION_TYPE = '{http://owncloud.org/ns}mentionType';
-	const PROPERTY_NAME_MENTION_ID = '{http://owncloud.org/ns}mentionId';
-	const PROPERTY_NAME_MENTION_DISPLAYNAME = '{http://owncloud.org/ns}mentionDisplayName';
+	public const PROPERTY_NAME_UNREAD = '{http://owncloud.org/ns}isUnread';
+	public const PROPERTY_NAME_MESSAGE = '{http://owncloud.org/ns}message';
+	public const PROPERTY_NAME_ACTOR_DISPLAYNAME = '{http://owncloud.org/ns}actorDisplayName';
+	public const PROPERTY_NAME_MENTIONS = '{http://owncloud.org/ns}mentions';
+	public const PROPERTY_NAME_MENTION = '{http://owncloud.org/ns}mention';
+	public const PROPERTY_NAME_MENTION_TYPE = '{http://owncloud.org/ns}mentionType';
+	public const PROPERTY_NAME_MENTION_ID = '{http://owncloud.org/ns}mentionId';
+	public const PROPERTY_NAME_MENTION_DISPLAYNAME = '{http://owncloud.org/ns}mentionDisplayName';
 
 	/** @var  IComment */
 	public $comment;
diff --git a/apps/dav/lib/Comments/CommentsPlugin.php b/apps/dav/lib/Comments/CommentsPlugin.php
index ecfb5e5cfab7ffd534ae339f0f998e6fddb9268a..8c73f6695b9369df7cee0837a805398de1fe0529 100644
--- a/apps/dav/lib/Comments/CommentsPlugin.php
+++ b/apps/dav/lib/Comments/CommentsPlugin.php
@@ -45,12 +45,12 @@ use Sabre\Xml\Writer;
  */
 class CommentsPlugin extends ServerPlugin {
 	// namespace
-	const NS_OWNCLOUD = 'http://owncloud.org/ns';
+	public const NS_OWNCLOUD = 'http://owncloud.org/ns';
 
-	const REPORT_NAME            = '{http://owncloud.org/ns}filter-comments';
-	const REPORT_PARAM_LIMIT     = '{http://owncloud.org/ns}limit';
-	const REPORT_PARAM_OFFSET    = '{http://owncloud.org/ns}offset';
-	const REPORT_PARAM_TIMESTAMP = '{http://owncloud.org/ns}datetime';
+	public const REPORT_NAME            = '{http://owncloud.org/ns}filter-comments';
+	public const REPORT_PARAM_LIMIT     = '{http://owncloud.org/ns}limit';
+	public const REPORT_PARAM_OFFSET    = '{http://owncloud.org/ns}offset';
+	public const REPORT_PARAM_TIMESTAMP = '{http://owncloud.org/ns}datetime';
 
 	/** @var ICommentsManager  */
 	protected $commentsManager;
diff --git a/apps/dav/lib/Comments/EntityCollection.php b/apps/dav/lib/Comments/EntityCollection.php
index d64c5c36423a77deecd2385de52e6c0ed161f9d0..683cbd6252966ff3ea9b2449a1ee84472e5a92f2 100644
--- a/apps/dav/lib/Comments/EntityCollection.php
+++ b/apps/dav/lib/Comments/EntityCollection.php
@@ -41,7 +41,7 @@ use Sabre\DAV\PropPatch;
  * @package OCA\DAV\Comments
  */
 class EntityCollection extends RootCollection implements IProperties {
-	const PROPERTY_NAME_READ_MARKER  = '{http://owncloud.org/ns}readMarker';
+	public const PROPERTY_NAME_READ_MARKER  = '{http://owncloud.org/ns}readMarker';
 
 	/** @var  string */
 	protected $id;
diff --git a/apps/dav/lib/Connector/Sabre/Auth.php b/apps/dav/lib/Connector/Sabre/Auth.php
index ba33d3234b30441f5d91eeffc5e07e53fea6eb64..ad042cd96ce0dae1ede8911011109b3dd9260ea0 100644
--- a/apps/dav/lib/Connector/Sabre/Auth.php
+++ b/apps/dav/lib/Connector/Sabre/Auth.php
@@ -50,7 +50,7 @@ use Sabre\HTTP\RequestInterface;
 use Sabre\HTTP\ResponseInterface;
 
 class Auth extends AbstractBasic {
-	const DAV_AUTHENTICATED = 'AUTHENTICATED_TO_DAV_BACKEND';
+	public const DAV_AUTHENTICATED = 'AUTHENTICATED_TO_DAV_BACKEND';
 
 	/** @var ISession */
 	private $session;
diff --git a/apps/dav/lib/Connector/Sabre/ChecksumList.php b/apps/dav/lib/Connector/Sabre/ChecksumList.php
index 7c9204cbe754c41c3266d4c4f354e10dfe5a303c..d0b83cff1fa5d37ba8059eb7154e95a5c70f5895 100644
--- a/apps/dav/lib/Connector/Sabre/ChecksumList.php
+++ b/apps/dav/lib/Connector/Sabre/ChecksumList.php
@@ -32,7 +32,7 @@ use Sabre\Xml\XmlSerializable;
  * checksum name.
  */
 class ChecksumList implements XmlSerializable {
-	const NS_OWNCLOUD = 'http://owncloud.org/ns';
+	public const NS_OWNCLOUD = 'http://owncloud.org/ns';
 
 	/** @var string[] of TYPE:CHECKSUM */
 	private $checksums;
diff --git a/apps/dav/lib/Connector/Sabre/CommentPropertiesPlugin.php b/apps/dav/lib/Connector/Sabre/CommentPropertiesPlugin.php
index 5ae8dcdb9386c4ab2e8dbc57f75c7f5eeed0ad34..22e418ee561afe4c7eb5fd85f66af58286462b15 100644
--- a/apps/dav/lib/Connector/Sabre/CommentPropertiesPlugin.php
+++ b/apps/dav/lib/Connector/Sabre/CommentPropertiesPlugin.php
@@ -32,9 +32,9 @@ use Sabre\DAV\PropFind;
 use Sabre\DAV\ServerPlugin;
 
 class CommentPropertiesPlugin extends ServerPlugin {
-	const PROPERTY_NAME_HREF   = '{http://owncloud.org/ns}comments-href';
-	const PROPERTY_NAME_COUNT  = '{http://owncloud.org/ns}comments-count';
-	const PROPERTY_NAME_UNREAD = '{http://owncloud.org/ns}comments-unread';
+	public const PROPERTY_NAME_HREF   = '{http://owncloud.org/ns}comments-href';
+	public const PROPERTY_NAME_COUNT  = '{http://owncloud.org/ns}comments-count';
+	public const PROPERTY_NAME_UNREAD = '{http://owncloud.org/ns}comments-unread';
 
 	/** @var  \Sabre\DAV\Server */
 	protected $server;
diff --git a/apps/dav/lib/Connector/Sabre/Exception/Forbidden.php b/apps/dav/lib/Connector/Sabre/Exception/Forbidden.php
index 46659737e87297d309d5b9212e00350b68d28092..a9c07a0369c5345a505243018c5bb1c416ba89f2 100644
--- a/apps/dav/lib/Connector/Sabre/Exception/Forbidden.php
+++ b/apps/dav/lib/Connector/Sabre/Exception/Forbidden.php
@@ -23,7 +23,7 @@
 namespace OCA\DAV\Connector\Sabre\Exception;
 
 class Forbidden extends \Sabre\DAV\Exception\Forbidden {
-	const NS_OWNCLOUD = 'http://owncloud.org/ns';
+	public const NS_OWNCLOUD = 'http://owncloud.org/ns';
 
 	/**
 	 * @var bool
diff --git a/apps/dav/lib/Connector/Sabre/Exception/InvalidPath.php b/apps/dav/lib/Connector/Sabre/Exception/InvalidPath.php
index 2871fd83e09e941936d3a0212095a61ace3fbae3..25fa3205b5c94abdbd7a0179b8e4891a191d9d74 100644
--- a/apps/dav/lib/Connector/Sabre/Exception/InvalidPath.php
+++ b/apps/dav/lib/Connector/Sabre/Exception/InvalidPath.php
@@ -26,7 +26,7 @@ namespace OCA\DAV\Connector\Sabre\Exception;
 use Sabre\DAV\Exception;
 
 class InvalidPath extends Exception {
-	const NS_OWNCLOUD = 'http://owncloud.org/ns';
+	public const NS_OWNCLOUD = 'http://owncloud.org/ns';
 
 	/**
 	 * @var bool
diff --git a/apps/dav/lib/Connector/Sabre/Exception/PasswordLoginForbidden.php b/apps/dav/lib/Connector/Sabre/Exception/PasswordLoginForbidden.php
index c3e417b20ad2023afe0c56a8e022a7c63a8cfcc5..aac9b735839bce2e865f0c83271e4b18b2019eba 100644
--- a/apps/dav/lib/Connector/Sabre/Exception/PasswordLoginForbidden.php
+++ b/apps/dav/lib/Connector/Sabre/Exception/PasswordLoginForbidden.php
@@ -29,7 +29,7 @@ use Sabre\DAV\Exception\NotAuthenticated;
 use Sabre\DAV\Server;
 
 class PasswordLoginForbidden extends NotAuthenticated {
-	const NS_OWNCLOUD = 'http://owncloud.org/ns';
+	public const NS_OWNCLOUD = 'http://owncloud.org/ns';
 
 	public function getHTTPCode() {
 		return 401;
diff --git a/apps/dav/lib/Connector/Sabre/FilesPlugin.php b/apps/dav/lib/Connector/Sabre/FilesPlugin.php
index e14fd691f45267a2625e5bd384ba2adb7fc39ebc..076e5b6483bedf938e31e793dc54babd32a14f65 100644
--- a/apps/dav/lib/Connector/Sabre/FilesPlugin.php
+++ b/apps/dav/lib/Connector/Sabre/FilesPlugin.php
@@ -54,28 +54,28 @@ use Sabre\HTTP\ResponseInterface;
 class FilesPlugin extends ServerPlugin {
 
 	// namespace
-	const NS_OWNCLOUD = 'http://owncloud.org/ns';
-	const NS_NEXTCLOUD = 'http://nextcloud.org/ns';
-	const FILEID_PROPERTYNAME = '{http://owncloud.org/ns}id';
-	const INTERNAL_FILEID_PROPERTYNAME = '{http://owncloud.org/ns}fileid';
-	const PERMISSIONS_PROPERTYNAME = '{http://owncloud.org/ns}permissions';
-	const SHARE_PERMISSIONS_PROPERTYNAME = '{http://open-collaboration-services.org/ns}share-permissions';
-	const OCM_SHARE_PERMISSIONS_PROPERTYNAME = '{http://open-cloud-mesh.org/ns}share-permissions';
-	const DOWNLOADURL_PROPERTYNAME = '{http://owncloud.org/ns}downloadURL';
-	const SIZE_PROPERTYNAME = '{http://owncloud.org/ns}size';
-	const GETETAG_PROPERTYNAME = '{DAV:}getetag';
-	const LASTMODIFIED_PROPERTYNAME = '{DAV:}lastmodified';
-	const OWNER_ID_PROPERTYNAME = '{http://owncloud.org/ns}owner-id';
-	const OWNER_DISPLAY_NAME_PROPERTYNAME = '{http://owncloud.org/ns}owner-display-name';
-	const CHECKSUMS_PROPERTYNAME = '{http://owncloud.org/ns}checksums';
-	const DATA_FINGERPRINT_PROPERTYNAME = '{http://owncloud.org/ns}data-fingerprint';
-	const HAS_PREVIEW_PROPERTYNAME = '{http://nextcloud.org/ns}has-preview';
-	const MOUNT_TYPE_PROPERTYNAME = '{http://nextcloud.org/ns}mount-type';
-	const IS_ENCRYPTED_PROPERTYNAME = '{http://nextcloud.org/ns}is-encrypted';
-	const METADATA_ETAG_PROPERTYNAME = '{http://nextcloud.org/ns}metadata_etag';
-	const UPLOAD_TIME_PROPERTYNAME = '{http://nextcloud.org/ns}upload_time';
-	const CREATION_TIME_PROPERTYNAME = '{http://nextcloud.org/ns}creation_time';
-	const SHARE_NOTE = '{http://nextcloud.org/ns}note';
+	public const NS_OWNCLOUD = 'http://owncloud.org/ns';
+	public const NS_NEXTCLOUD = 'http://nextcloud.org/ns';
+	public const FILEID_PROPERTYNAME = '{http://owncloud.org/ns}id';
+	public const INTERNAL_FILEID_PROPERTYNAME = '{http://owncloud.org/ns}fileid';
+	public const PERMISSIONS_PROPERTYNAME = '{http://owncloud.org/ns}permissions';
+	public const SHARE_PERMISSIONS_PROPERTYNAME = '{http://open-collaboration-services.org/ns}share-permissions';
+	public const OCM_SHARE_PERMISSIONS_PROPERTYNAME = '{http://open-cloud-mesh.org/ns}share-permissions';
+	public const DOWNLOADURL_PROPERTYNAME = '{http://owncloud.org/ns}downloadURL';
+	public const SIZE_PROPERTYNAME = '{http://owncloud.org/ns}size';
+	public const GETETAG_PROPERTYNAME = '{DAV:}getetag';
+	public const LASTMODIFIED_PROPERTYNAME = '{DAV:}lastmodified';
+	public const OWNER_ID_PROPERTYNAME = '{http://owncloud.org/ns}owner-id';
+	public const OWNER_DISPLAY_NAME_PROPERTYNAME = '{http://owncloud.org/ns}owner-display-name';
+	public const CHECKSUMS_PROPERTYNAME = '{http://owncloud.org/ns}checksums';
+	public const DATA_FINGERPRINT_PROPERTYNAME = '{http://owncloud.org/ns}data-fingerprint';
+	public const HAS_PREVIEW_PROPERTYNAME = '{http://nextcloud.org/ns}has-preview';
+	public const MOUNT_TYPE_PROPERTYNAME = '{http://nextcloud.org/ns}mount-type';
+	public const IS_ENCRYPTED_PROPERTYNAME = '{http://nextcloud.org/ns}is-encrypted';
+	public const METADATA_ETAG_PROPERTYNAME = '{http://nextcloud.org/ns}metadata_etag';
+	public const UPLOAD_TIME_PROPERTYNAME = '{http://nextcloud.org/ns}upload_time';
+	public const CREATION_TIME_PROPERTYNAME = '{http://nextcloud.org/ns}creation_time';
+	public const SHARE_NOTE = '{http://nextcloud.org/ns}note';
 
 	/**
 	 * Reference to main server object
diff --git a/apps/dav/lib/Connector/Sabre/FilesReportPlugin.php b/apps/dav/lib/Connector/Sabre/FilesReportPlugin.php
index 617847626cca3008afcb4ddb61b28d4eec1b52ce..0e7db3f57ce51019a422fef1876ca6c23c4f0423 100644
--- a/apps/dav/lib/Connector/Sabre/FilesReportPlugin.php
+++ b/apps/dav/lib/Connector/Sabre/FilesReportPlugin.php
@@ -48,10 +48,10 @@ use Sabre\DAV\Xml\Response\MultiStatus;
 class FilesReportPlugin extends ServerPlugin {
 
 	// namespace
-	const NS_OWNCLOUD = 'http://owncloud.org/ns';
-	const REPORT_NAME            = '{http://owncloud.org/ns}filter-files';
-	const SYSTEMTAG_PROPERTYNAME = '{http://owncloud.org/ns}systemtag';
-	const CIRCLE_PROPERTYNAME = '{http://owncloud.org/ns}circle';
+	public const NS_OWNCLOUD = 'http://owncloud.org/ns';
+	public const REPORT_NAME            = '{http://owncloud.org/ns}filter-files';
+	public const SYSTEMTAG_PROPERTYNAME = '{http://owncloud.org/ns}systemtag';
+	public const CIRCLE_PROPERTYNAME = '{http://owncloud.org/ns}circle';
 
 	/**
 	 * Reference to main server object
diff --git a/apps/dav/lib/Connector/Sabre/ShareTypeList.php b/apps/dav/lib/Connector/Sabre/ShareTypeList.php
index ed32b7a00b124e9c83fc718565533bce76eca64a..5a4a1f5635f91404efd097b1abd46898489965ee 100644
--- a/apps/dav/lib/Connector/Sabre/ShareTypeList.php
+++ b/apps/dav/lib/Connector/Sabre/ShareTypeList.php
@@ -32,7 +32,7 @@ use Sabre\Xml\Writer;
  * This property contains multiple "share-type" elements, each containing a share type.
  */
 class ShareTypeList implements Element {
-	const NS_OWNCLOUD = 'http://owncloud.org/ns';
+	public const NS_OWNCLOUD = 'http://owncloud.org/ns';
 
 	/**
 	 * Share types
diff --git a/apps/dav/lib/Connector/Sabre/ShareeList.php b/apps/dav/lib/Connector/Sabre/ShareeList.php
index d303305fe476c349a9b3911728c7b1c03e39f262..235ae9cd823bf18ac93173d1301a6fbf6d89de8b 100644
--- a/apps/dav/lib/Connector/Sabre/ShareeList.php
+++ b/apps/dav/lib/Connector/Sabre/ShareeList.php
@@ -35,7 +35,7 @@ use Sabre\Xml\XmlSerializable;
  * This property contains multiple "sharee" elements, each containing a share sharee
  */
 class ShareeList implements XmlSerializable {
-	const NS_NEXTCLOUD = 'http://nextcloud.org/ns';
+	public const NS_NEXTCLOUD = 'http://nextcloud.org/ns';
 
 	/** @var IShare[] */
 	private $shares;
diff --git a/apps/dav/lib/Connector/Sabre/SharesPlugin.php b/apps/dav/lib/Connector/Sabre/SharesPlugin.php
index ee4246011bfa27ba2698b6cea06752db78be7f77..63c204fda4efcf06304a8ee01f8ebb64b017c680 100644
--- a/apps/dav/lib/Connector/Sabre/SharesPlugin.php
+++ b/apps/dav/lib/Connector/Sabre/SharesPlugin.php
@@ -35,10 +35,10 @@ use Sabre\DAV\PropFind;
  * Sabre Plugin to provide share-related properties
  */
 class SharesPlugin extends \Sabre\DAV\ServerPlugin {
-	const NS_OWNCLOUD = 'http://owncloud.org/ns';
-	const NS_NEXTCLOUD = 'http://nextcloud.org/ns';
-	const SHARETYPES_PROPERTYNAME = '{http://owncloud.org/ns}share-types';
-	const SHAREES_PROPERTYNAME = '{http://nextcloud.org/ns}sharees';
+	public const NS_OWNCLOUD = 'http://owncloud.org/ns';
+	public const NS_NEXTCLOUD = 'http://nextcloud.org/ns';
+	public const SHARETYPES_PROPERTYNAME = '{http://owncloud.org/ns}share-types';
+	public const SHAREES_PROPERTYNAME = '{http://nextcloud.org/ns}sharees';
 
 	/**
 	 * Reference to main server object
diff --git a/apps/dav/lib/Connector/Sabre/TagList.php b/apps/dav/lib/Connector/Sabre/TagList.php
index c73f698c18807c14fd17df0de4f9187b6015c2c6..603087fd5fa9b4f659835b91627d2ed3b26eb3a7 100644
--- a/apps/dav/lib/Connector/Sabre/TagList.php
+++ b/apps/dav/lib/Connector/Sabre/TagList.php
@@ -34,7 +34,7 @@ use Sabre\Xml\Writer;
  * This property contains multiple "tag" elements, each containing a tag name.
  */
 class TagList implements Element {
-	const NS_OWNCLOUD = 'http://owncloud.org/ns';
+	public const NS_OWNCLOUD = 'http://owncloud.org/ns';
 
 	/**
 	 * tags
diff --git a/apps/dav/lib/Connector/Sabre/TagsPlugin.php b/apps/dav/lib/Connector/Sabre/TagsPlugin.php
index 33698810cfb7d682d99cc6fed3e47454cb157229..ad3e0611270d2ec50bc6f107aac1e95b442b38bd 100644
--- a/apps/dav/lib/Connector/Sabre/TagsPlugin.php
+++ b/apps/dav/lib/Connector/Sabre/TagsPlugin.php
@@ -55,10 +55,10 @@ use Sabre\DAV\PropPatch;
 class TagsPlugin extends \Sabre\DAV\ServerPlugin {
 
 	// namespace
-	const NS_OWNCLOUD = 'http://owncloud.org/ns';
-	const TAGS_PROPERTYNAME = '{http://owncloud.org/ns}tags';
-	const FAVORITE_PROPERTYNAME = '{http://owncloud.org/ns}favorite';
-	const TAG_FAVORITE = '_$!<Favorite>!$_';
+	public const NS_OWNCLOUD = 'http://owncloud.org/ns';
+	public const TAGS_PROPERTYNAME = '{http://owncloud.org/ns}tags';
+	public const FAVORITE_PROPERTYNAME = '{http://owncloud.org/ns}favorite';
+	public const TAG_FAVORITE = '_$!<Favorite>!$_';
 
 	/**
 	 * Reference to main server object
diff --git a/apps/dav/lib/DAV/GroupPrincipalBackend.php b/apps/dav/lib/DAV/GroupPrincipalBackend.php
index cfa896c4f2c8446fd9658b521d59b18bfc7fd2fc..15e95a9bd29cf9d284f95dc5c491c78fa6d68ae5 100644
--- a/apps/dav/lib/DAV/GroupPrincipalBackend.php
+++ b/apps/dav/lib/DAV/GroupPrincipalBackend.php
@@ -36,7 +36,7 @@ use Sabre\DAV\PropPatch;
 use Sabre\DAVACL\PrincipalBackend\BackendInterface;
 
 class GroupPrincipalBackend implements BackendInterface {
-	const PRINCIPAL_PREFIX = 'principals/groups';
+	public const PRINCIPAL_PREFIX = 'principals/groups';
 
 	/** @var IGroupManager */
 	private $groupManager;
diff --git a/apps/dav/lib/DAV/Sharing/Backend.php b/apps/dav/lib/DAV/Sharing/Backend.php
index ae69e33387c747198f75332b7e7c7da7b1f9d848..6c88fa4d15ec96268845c337170be785306eeb90 100644
--- a/apps/dav/lib/DAV/Sharing/Backend.php
+++ b/apps/dav/lib/DAV/Sharing/Backend.php
@@ -45,9 +45,9 @@ class Backend {
 	/** @var string */
 	private $resourceType;
 
-	const ACCESS_OWNER = 1;
-	const ACCESS_READ_WRITE = 2;
-	const ACCESS_READ = 3;
+	public const ACCESS_OWNER = 1;
+	public const ACCESS_READ_WRITE = 2;
+	public const ACCESS_READ = 3;
 
 	/**
 	 * @param IDBConnection $db
diff --git a/apps/dav/lib/DAV/Sharing/Plugin.php b/apps/dav/lib/DAV/Sharing/Plugin.php
index 148afa323dd079a87c714653ef4689ad045d4ae2..e33d879fa0e393a369d260f417650878bc0f5516 100644
--- a/apps/dav/lib/DAV/Sharing/Plugin.php
+++ b/apps/dav/lib/DAV/Sharing/Plugin.php
@@ -37,8 +37,8 @@ use Sabre\HTTP\RequestInterface;
 use Sabre\HTTP\ResponseInterface;
 
 class Plugin extends ServerPlugin {
-	const NS_OWNCLOUD = 'http://owncloud.org/ns';
-	const NS_NEXTCLOUD = 'http://nextcloud.com/ns';
+	public const NS_OWNCLOUD = 'http://owncloud.org/ns';
+	public const NS_NEXTCLOUD = 'http://nextcloud.com/ns';
 
 	/** @var Auth */
 	private $auth;
diff --git a/apps/dav/lib/Provisioning/Apple/AppleProvisioningNode.php b/apps/dav/lib/Provisioning/Apple/AppleProvisioningNode.php
index 98c9ce0b6e1fcfa71f0ecaa36f323b13d16ef5d5..e2e192eda8529b05a26ebced480870ec44a3bce9 100644
--- a/apps/dav/lib/Provisioning/Apple/AppleProvisioningNode.php
+++ b/apps/dav/lib/Provisioning/Apple/AppleProvisioningNode.php
@@ -30,7 +30,7 @@ use Sabre\DAV\IProperties;
 use Sabre\DAV\PropPatch;
 
 class AppleProvisioningNode implements INode, IProperties {
-	const FILENAME = 'apple-provisioning.mobileconfig';
+	public const FILENAME = 'apple-provisioning.mobileconfig';
 
 	protected $timeFactory;
 
diff --git a/apps/dav/lib/SystemTag/SystemTagPlugin.php b/apps/dav/lib/SystemTag/SystemTagPlugin.php
index b05ba07ead25da3bd9706d499d065cdcf2458727..c83fd3f048763ff81a9c0e5bf342ec9f36c67c63 100644
--- a/apps/dav/lib/SystemTag/SystemTagPlugin.php
+++ b/apps/dav/lib/SystemTag/SystemTagPlugin.php
@@ -50,13 +50,13 @@ use Sabre\HTTP\ResponseInterface;
 class SystemTagPlugin extends \Sabre\DAV\ServerPlugin {
 
 	// namespace
-	const NS_OWNCLOUD = 'http://owncloud.org/ns';
-	const ID_PROPERTYNAME = '{http://owncloud.org/ns}id';
-	const DISPLAYNAME_PROPERTYNAME = '{http://owncloud.org/ns}display-name';
-	const USERVISIBLE_PROPERTYNAME = '{http://owncloud.org/ns}user-visible';
-	const USERASSIGNABLE_PROPERTYNAME = '{http://owncloud.org/ns}user-assignable';
-	const GROUPS_PROPERTYNAME = '{http://owncloud.org/ns}groups';
-	const CANASSIGN_PROPERTYNAME = '{http://owncloud.org/ns}can-assign';
+	public const NS_OWNCLOUD = 'http://owncloud.org/ns';
+	public const ID_PROPERTYNAME = '{http://owncloud.org/ns}id';
+	public const DISPLAYNAME_PROPERTYNAME = '{http://owncloud.org/ns}display-name';
+	public const USERVISIBLE_PROPERTYNAME = '{http://owncloud.org/ns}user-visible';
+	public const USERASSIGNABLE_PROPERTYNAME = '{http://owncloud.org/ns}user-assignable';
+	public const GROUPS_PROPERTYNAME = '{http://owncloud.org/ns}groups';
+	public const CANASSIGN_PROPERTYNAME = '{http://owncloud.org/ns}can-assign';
 
 	/**
 	 * @var \Sabre\DAV\Server $server
diff --git a/apps/dav/tests/unit/CalDAV/AbstractCalDavBackend.php b/apps/dav/tests/unit/CalDAV/AbstractCalDavBackend.php
index ff62bdaa6d2eb36437cdf9cf8938b33bdc27eb15..131339ee40eb8782622bf8e13828ac1be4d255a0 100644
--- a/apps/dav/tests/unit/CalDAV/AbstractCalDavBackend.php
+++ b/apps/dav/tests/unit/CalDAV/AbstractCalDavBackend.php
@@ -68,10 +68,10 @@ abstract class AbstractCalDavBackend extends TestCase {
 	/** @var ILogger */
 	private $logger;
 
-	const UNIT_TEST_USER = 'principals/users/caldav-unit-test';
-	const UNIT_TEST_USER1 = 'principals/users/caldav-unit-test1';
-	const UNIT_TEST_GROUP = 'principals/groups/caldav-unit-test-group';
-	const UNIT_TEST_GROUP2 = 'principals/groups/caldav-unit-test-group2';
+	public const UNIT_TEST_USER = 'principals/users/caldav-unit-test';
+	public const UNIT_TEST_USER1 = 'principals/users/caldav-unit-test1';
+	public const UNIT_TEST_GROUP = 'principals/groups/caldav-unit-test-group';
+	public const UNIT_TEST_GROUP2 = 'principals/groups/caldav-unit-test-group2';
 
 	protected function setUp(): void {
 		parent::setUp();
diff --git a/apps/dav/tests/unit/CalDAV/PublicCalendarRootTest.php b/apps/dav/tests/unit/CalDAV/PublicCalendarRootTest.php
index 0e58c36b39d6d713abe89cacc2dc9863ce8e0fcb..8ea6e5257f08dc81c222d4d2c6670bdabcbb85cd 100644
--- a/apps/dav/tests/unit/CalDAV/PublicCalendarRootTest.php
+++ b/apps/dav/tests/unit/CalDAV/PublicCalendarRootTest.php
@@ -52,7 +52,7 @@ use Test\TestCase;
  * @package OCA\DAV\Tests\unit\CalDAV
  */
 class PublicCalendarRootTest extends TestCase {
-	const UNIT_TEST_USER = '';
+	public const UNIT_TEST_USER = '';
 	/** @var CalDavBackend */
 	private $backend;
 	/** @var PublicCalendarRoot */
diff --git a/apps/dav/tests/unit/CalDAV/Publishing/PublisherTest.php b/apps/dav/tests/unit/CalDAV/Publishing/PublisherTest.php
index 7a555220d8571170104332acd122cec720864b6c..d4abf61af1a8785702a51847c1a5228b7ccbdabd 100644
--- a/apps/dav/tests/unit/CalDAV/Publishing/PublisherTest.php
+++ b/apps/dav/tests/unit/CalDAV/Publishing/PublisherTest.php
@@ -31,7 +31,7 @@ use Sabre\Xml\Writer;
 use Test\TestCase;
 
 class PublisherTest extends TestCase {
-	const NS_CALENDARSERVER = 'http://calendarserver.org/ns/';
+	public const NS_CALENDARSERVER = 'http://calendarserver.org/ns/';
 
 	public function testSerializePublished() {
 		$publish = new Publisher('urltopublish', true);
diff --git a/apps/dav/tests/unit/CalDAV/Reminder/NotificationProvider/EmailProviderTest.php b/apps/dav/tests/unit/CalDAV/Reminder/NotificationProvider/EmailProviderTest.php
index cd111c44ae4964e43f8f53abc06345cbf1aa893f..9a22f63c1be6c9d8668027b4248c4e70d5b3ceed 100644
--- a/apps/dav/tests/unit/CalDAV/Reminder/NotificationProvider/EmailProviderTest.php
+++ b/apps/dav/tests/unit/CalDAV/Reminder/NotificationProvider/EmailProviderTest.php
@@ -43,7 +43,7 @@ use OCP\Mail\IMessage;
 use Sabre\VObject\Component\VCalendar;
 
 class EmailProviderTest extends AbstractNotificationProviderTest {
-	const USER_EMAIL = 'frodo@hobb.it';
+	public const USER_EMAIL = 'frodo@hobb.it';
 
 	/** @var ILogger|\PHPUnit\Framework\MockObject\MockObject */
 	protected $logger;
diff --git a/apps/dav/tests/unit/CardDAV/CardDavBackendTest.php b/apps/dav/tests/unit/CardDAV/CardDavBackendTest.php
index e7d2197a6ee0a8e742945cc418c151e7def6440e..1768acb39e0beb50148552f08aaf56c7cd1eb3a1 100644
--- a/apps/dav/tests/unit/CardDAV/CardDavBackendTest.php
+++ b/apps/dav/tests/unit/CardDAV/CardDavBackendTest.php
@@ -86,9 +86,9 @@ class CardDavBackendTest extends TestCase {
 	/** @var string */
 	private $dbCardsPropertiesTable = 'cards_properties';
 
-	const UNIT_TEST_USER = 'principals/users/carddav-unit-test';
-	const UNIT_TEST_USER1 = 'principals/users/carddav-unit-test1';
-	const UNIT_TEST_GROUP = 'principals/groups/carddav-unit-test-group';
+	public const UNIT_TEST_USER = 'principals/users/carddav-unit-test';
+	public const UNIT_TEST_USER1 = 'principals/users/carddav-unit-test1';
+	public const UNIT_TEST_GROUP = 'principals/groups/carddav-unit-test-group';
 
 	private $vcardTest0 = 'BEGIN:VCARD'.PHP_EOL.
 						 'VERSION:3.0'.PHP_EOL.
diff --git a/apps/dav/tests/unit/Command/ListCalendarsTest.php b/apps/dav/tests/unit/Command/ListCalendarsTest.php
index 8960a9d7721e2dc02764b9edb3d91a9ee01c3e0a..ab3721e80b96946de97f2c1e087e3cd67137e62f 100644
--- a/apps/dav/tests/unit/Command/ListCalendarsTest.php
+++ b/apps/dav/tests/unit/Command/ListCalendarsTest.php
@@ -48,7 +48,7 @@ class ListCalendarsTest extends TestCase {
 	/** @var ListCalendars */
 	private $command;
 
-	const USERNAME = 'username';
+	public const USERNAME = 'username';
 
 	protected function setUp(): void {
 		parent::setUp();
diff --git a/apps/dav/tests/unit/Connector/Sabre/FilesPluginTest.php b/apps/dav/tests/unit/Connector/Sabre/FilesPluginTest.php
index 2b8d145059f41b89c4d386ab5c6b0da36f23aaa0..9ce2837332f6180a5d4cdddd9b85851e15857292 100644
--- a/apps/dav/tests/unit/Connector/Sabre/FilesPluginTest.php
+++ b/apps/dav/tests/unit/Connector/Sabre/FilesPluginTest.php
@@ -56,17 +56,17 @@ use Test\TestCase;
  * See the COPYING-README file.
  */
 class FilesPluginTest extends TestCase {
-	const GETETAG_PROPERTYNAME = FilesPlugin::GETETAG_PROPERTYNAME;
-	const FILEID_PROPERTYNAME = FilesPlugin::FILEID_PROPERTYNAME;
-	const INTERNAL_FILEID_PROPERTYNAME = FilesPlugin::INTERNAL_FILEID_PROPERTYNAME;
-	const SIZE_PROPERTYNAME = FilesPlugin::SIZE_PROPERTYNAME;
-	const PERMISSIONS_PROPERTYNAME = FilesPlugin::PERMISSIONS_PROPERTYNAME;
-	const LASTMODIFIED_PROPERTYNAME = FilesPlugin::LASTMODIFIED_PROPERTYNAME;
-	const DOWNLOADURL_PROPERTYNAME = FilesPlugin::DOWNLOADURL_PROPERTYNAME;
-	const OWNER_ID_PROPERTYNAME = FilesPlugin::OWNER_ID_PROPERTYNAME;
-	const OWNER_DISPLAY_NAME_PROPERTYNAME = FilesPlugin::OWNER_DISPLAY_NAME_PROPERTYNAME;
-	const DATA_FINGERPRINT_PROPERTYNAME = FilesPlugin::DATA_FINGERPRINT_PROPERTYNAME;
-	const HAS_PREVIEW_PROPERTYNAME = FilesPlugin::HAS_PREVIEW_PROPERTYNAME;
+	public const GETETAG_PROPERTYNAME = FilesPlugin::GETETAG_PROPERTYNAME;
+	public const FILEID_PROPERTYNAME = FilesPlugin::FILEID_PROPERTYNAME;
+	public const INTERNAL_FILEID_PROPERTYNAME = FilesPlugin::INTERNAL_FILEID_PROPERTYNAME;
+	public const SIZE_PROPERTYNAME = FilesPlugin::SIZE_PROPERTYNAME;
+	public const PERMISSIONS_PROPERTYNAME = FilesPlugin::PERMISSIONS_PROPERTYNAME;
+	public const LASTMODIFIED_PROPERTYNAME = FilesPlugin::LASTMODIFIED_PROPERTYNAME;
+	public const DOWNLOADURL_PROPERTYNAME = FilesPlugin::DOWNLOADURL_PROPERTYNAME;
+	public const OWNER_ID_PROPERTYNAME = FilesPlugin::OWNER_ID_PROPERTYNAME;
+	public const OWNER_DISPLAY_NAME_PROPERTYNAME = FilesPlugin::OWNER_DISPLAY_NAME_PROPERTYNAME;
+	public const DATA_FINGERPRINT_PROPERTYNAME = FilesPlugin::DATA_FINGERPRINT_PROPERTYNAME;
+	public const HAS_PREVIEW_PROPERTYNAME = FilesPlugin::HAS_PREVIEW_PROPERTYNAME;
 
 	/**
 	 * @var \Sabre\DAV\Server | \PHPUnit_Framework_MockObject_MockObject
diff --git a/apps/dav/tests/unit/Connector/Sabre/SharesPluginTest.php b/apps/dav/tests/unit/Connector/Sabre/SharesPluginTest.php
index ea4eef1690a8e2a4b6c8ac237073a9a6e95d2af2..153bc0cd93bb0520221c50169b1f18259a8134f5 100644
--- a/apps/dav/tests/unit/Connector/Sabre/SharesPluginTest.php
+++ b/apps/dav/tests/unit/Connector/Sabre/SharesPluginTest.php
@@ -40,7 +40,7 @@ use OCP\Share\IShare;
 use Sabre\DAV\Tree;
 
 class SharesPluginTest extends \Test\TestCase {
-	const SHARETYPES_PROPERTYNAME = \OCA\DAV\Connector\Sabre\SharesPlugin::SHARETYPES_PROPERTYNAME;
+	public const SHARETYPES_PROPERTYNAME = \OCA\DAV\Connector\Sabre\SharesPlugin::SHARETYPES_PROPERTYNAME;
 
 	/**
 	 * @var \Sabre\DAV\Server
diff --git a/apps/dav/tests/unit/Connector/Sabre/TagsPluginTest.php b/apps/dav/tests/unit/Connector/Sabre/TagsPluginTest.php
index 49519431151f19ae4c85e7684dfab15431749e58..210e732438c782a1feb8d2594e2d865ab2a20ba4 100644
--- a/apps/dav/tests/unit/Connector/Sabre/TagsPluginTest.php
+++ b/apps/dav/tests/unit/Connector/Sabre/TagsPluginTest.php
@@ -41,9 +41,9 @@ use Sabre\DAV\Tree;
  * See the COPYING-README file.
  */
 class TagsPluginTest extends \Test\TestCase {
-	const TAGS_PROPERTYNAME = \OCA\DAV\Connector\Sabre\TagsPlugin::TAGS_PROPERTYNAME;
-	const FAVORITE_PROPERTYNAME = \OCA\DAV\Connector\Sabre\TagsPlugin::FAVORITE_PROPERTYNAME;
-	const TAG_FAVORITE = \OCA\DAV\Connector\Sabre\TagsPlugin::TAG_FAVORITE;
+	public const TAGS_PROPERTYNAME = \OCA\DAV\Connector\Sabre\TagsPlugin::TAGS_PROPERTYNAME;
+	public const FAVORITE_PROPERTYNAME = \OCA\DAV\Connector\Sabre\TagsPlugin::FAVORITE_PROPERTYNAME;
+	public const TAG_FAVORITE = \OCA\DAV\Connector\Sabre\TagsPlugin::TAG_FAVORITE;
 
 	/**
 	 * @var \Sabre\DAV\Server
diff --git a/apps/dav/tests/unit/SystemTag/SystemTagPluginTest.php b/apps/dav/tests/unit/SystemTag/SystemTagPluginTest.php
index dc47c20f3454164ae7945c07f567c56d97a17c65..97e140a0ab7d769915b375bc77e62b6df432a102 100644
--- a/apps/dav/tests/unit/SystemTag/SystemTagPluginTest.php
+++ b/apps/dav/tests/unit/SystemTag/SystemTagPluginTest.php
@@ -43,12 +43,12 @@ use Sabre\HTTP\RequestInterface;
 use Sabre\HTTP\ResponseInterface;
 
 class SystemTagPluginTest extends \Test\TestCase {
-	const ID_PROPERTYNAME = \OCA\DAV\SystemTag\SystemTagPlugin::ID_PROPERTYNAME;
-	const DISPLAYNAME_PROPERTYNAME = \OCA\DAV\SystemTag\SystemTagPlugin::DISPLAYNAME_PROPERTYNAME;
-	const USERVISIBLE_PROPERTYNAME = \OCA\DAV\SystemTag\SystemTagPlugin::USERVISIBLE_PROPERTYNAME;
-	const USERASSIGNABLE_PROPERTYNAME = \OCA\DAV\SystemTag\SystemTagPlugin::USERASSIGNABLE_PROPERTYNAME;
-	const CANASSIGN_PROPERTYNAME = \OCA\DAV\SystemTag\SystemTagPlugin::CANASSIGN_PROPERTYNAME;
-	const GROUPS_PROPERTYNAME = \OCA\DAV\SystemTag\SystemTagPlugin::GROUPS_PROPERTYNAME;
+	public const ID_PROPERTYNAME = \OCA\DAV\SystemTag\SystemTagPlugin::ID_PROPERTYNAME;
+	public const DISPLAYNAME_PROPERTYNAME = \OCA\DAV\SystemTag\SystemTagPlugin::DISPLAYNAME_PROPERTYNAME;
+	public const USERVISIBLE_PROPERTYNAME = \OCA\DAV\SystemTag\SystemTagPlugin::USERVISIBLE_PROPERTYNAME;
+	public const USERASSIGNABLE_PROPERTYNAME = \OCA\DAV\SystemTag\SystemTagPlugin::USERASSIGNABLE_PROPERTYNAME;
+	public const CANASSIGN_PROPERTYNAME = \OCA\DAV\SystemTag\SystemTagPlugin::CANASSIGN_PROPERTYNAME;
+	public const GROUPS_PROPERTYNAME = \OCA\DAV\SystemTag\SystemTagPlugin::GROUPS_PROPERTYNAME;
 
 	/**
 	 * @var \Sabre\DAV\Server
diff --git a/apps/encryption/lib/Crypto/Crypt.php b/apps/encryption/lib/Crypto/Crypt.php
index 24b1f21ecd0cc883da523789e08ca348ef84ebe4..fe12bfaf7272dc08e1719a8460a6d7828210c905 100644
--- a/apps/encryption/lib/Crypto/Crypt.php
+++ b/apps/encryption/lib/Crypto/Crypt.php
@@ -54,16 +54,16 @@ use OCP\IUserSession;
  * @package OCA\Encryption\Crypto
  */
 class Crypt {
-	const DEFAULT_CIPHER = 'AES-256-CTR';
+	public const DEFAULT_CIPHER = 'AES-256-CTR';
 	// default cipher from old Nextcloud versions
-	const LEGACY_CIPHER = 'AES-128-CFB';
+	public const LEGACY_CIPHER = 'AES-128-CFB';
 
 	// default key format, old Nextcloud version encrypted the private key directly
 	// with the user password
-	const LEGACY_KEY_FORMAT = 'password';
+	public const LEGACY_KEY_FORMAT = 'password';
 
-	const HEADER_START = 'HBEGIN';
-	const HEADER_END = 'HEND';
+	public const HEADER_START = 'HBEGIN';
+	public const HEADER_END = 'HEND';
 
 	/** @var ILogger */
 	private $logger;
diff --git a/apps/encryption/lib/Crypto/Encryption.php b/apps/encryption/lib/Crypto/Encryption.php
index 57cf4e2edac2abff905081140f31584a2842c395..39dfece7629cb36e613c0570a1c74182aeb43e3c 100644
--- a/apps/encryption/lib/Crypto/Encryption.php
+++ b/apps/encryption/lib/Crypto/Encryption.php
@@ -45,8 +45,8 @@ use Symfony\Component\Console\Input\InputInterface;
 use Symfony\Component\Console\Output\OutputInterface;
 
 class Encryption implements IEncryptionModule {
-	const ID = 'OC_DEFAULT_MODULE';
-	const DISPLAY_NAME = 'Default encryption module';
+	public const ID = 'OC_DEFAULT_MODULE';
+	public const DISPLAY_NAME = 'Default encryption module';
 
 	/**
 	 * @var Crypt
diff --git a/apps/encryption/lib/Session.php b/apps/encryption/lib/Session.php
index 4398f9c4e0ae2436da485bd4971e6343d7926879..3c79cd29e17f8c240ece3807b1f8abb0f1f6b8be 100644
--- a/apps/encryption/lib/Session.php
+++ b/apps/encryption/lib/Session.php
@@ -34,9 +34,9 @@ class Session {
 	/** @var ISession */
 	protected $session;
 
-	const NOT_INITIALIZED = '0';
-	const INIT_EXECUTED = '1';
-	const INIT_SUCCESSFUL = '2';
+	public const NOT_INITIALIZED = '0';
+	public const INIT_EXECUTED = '1';
+	public const INIT_SUCCESSFUL = '2';
 
 	/**
 	 * @param ISession $session
diff --git a/apps/federatedfilesharing/lib/FederatedShareProvider.php b/apps/federatedfilesharing/lib/FederatedShareProvider.php
index aaa3e27cfd2272c697a0fdbd767596a867c62156..228fab305b9c3da90a53afd54f4d26d72d4272a8 100644
--- a/apps/federatedfilesharing/lib/FederatedShareProvider.php
+++ b/apps/federatedfilesharing/lib/FederatedShareProvider.php
@@ -58,7 +58,7 @@ use OCP\Share\IShareProvider;
  * @package OCA\FederatedFileSharing
  */
 class FederatedShareProvider implements IShareProvider {
-	const SHARE_TYPE_REMOTE = 6;
+	public const SHARE_TYPE_REMOTE = 6;
 
 	/** @var IDBConnection */
 	private $dbConnection;
diff --git a/apps/federatedfilesharing/lib/Notifications.php b/apps/federatedfilesharing/lib/Notifications.php
index 6d11ea65096728914a34f7caaa076bfd90ad8625..7b2105ecb0f36bdeaaef5d7d269a7751351522cb 100644
--- a/apps/federatedfilesharing/lib/Notifications.php
+++ b/apps/federatedfilesharing/lib/Notifications.php
@@ -33,7 +33,7 @@ use OCP\Http\Client\IClientService;
 use OCP\OCS\IDiscoveryService;
 
 class Notifications {
-	const RESPONSE_FORMAT = 'json'; // default response format for ocs calls
+	public const RESPONSE_FORMAT = 'json'; // default response format for ocs calls
 
 	/** @var AddressHandler */
 	private $addressHandler;
diff --git a/apps/federatedfilesharing/lib/TokenHandler.php b/apps/federatedfilesharing/lib/TokenHandler.php
index 3922765aebaf82b92847fb5e8c0a8acbee5f64c5..37645a855c8d21d5d38d8d84b2e935cd31d06659 100644
--- a/apps/federatedfilesharing/lib/TokenHandler.php
+++ b/apps/federatedfilesharing/lib/TokenHandler.php
@@ -30,7 +30,7 @@ use OCP\Security\ISecureRandom;
  * @package OCA\FederatedFileSharing
  */
 class TokenHandler {
-	const TOKEN_LENGTH = 15;
+	public const TOKEN_LENGTH = 15;
 
 	/** @var ISecureRandom */
 	private $secureRandom;
diff --git a/apps/federatedfilesharing/tests/TestCase.php b/apps/federatedfilesharing/tests/TestCase.php
index 813c3c8a15f78a13488b867ffecf684372ef73f5..174197a1559d1d81ee9f8d526eaaf5f802f66afc 100644
--- a/apps/federatedfilesharing/tests/TestCase.php
+++ b/apps/federatedfilesharing/tests/TestCase.php
@@ -36,8 +36,8 @@ use OC\Group\Database;
  * Base class for sharing tests.
  */
 abstract class TestCase extends \Test\TestCase {
-	const TEST_FILES_SHARING_API_USER1 = "test-share-user1";
-	const TEST_FILES_SHARING_API_USER2 = "test-share-user2";
+	public const TEST_FILES_SHARING_API_USER1 = "test-share-user1";
+	public const TEST_FILES_SHARING_API_USER2 = "test-share-user2";
 
 	public static function setUpBeforeClass(): void {
 		parent::setUpBeforeClass();
diff --git a/apps/federation/lib/TrustedServers.php b/apps/federation/lib/TrustedServers.php
index 3d659e7eb957ebf930df61024266e31cbfb1df75..cc1913e9475d24491eeb5c46e44d4d158fbbc4c2 100644
--- a/apps/federation/lib/TrustedServers.php
+++ b/apps/federation/lib/TrustedServers.php
@@ -42,13 +42,13 @@ use Symfony\Component\EventDispatcher\GenericEvent;
 class TrustedServers {
 
 	/** after a user list was exchanged at least once successfully */
-	const STATUS_OK = 1;
+	public const STATUS_OK = 1;
 	/** waiting for shared secret or initial user list exchange */
-	const STATUS_PENDING = 2;
+	public const STATUS_PENDING = 2;
 	/** something went wrong, misconfigured server, software bug,... user interaction needed */
-	const STATUS_FAILURE = 3;
+	public const STATUS_FAILURE = 3;
 	/** remote server revoked access */
-	const STATUS_ACCESS_REVOKED = 4;
+	public const STATUS_ACCESS_REVOKED = 4;
 
 	/** @var  dbHandler */
 	private $dbHandler;
diff --git a/apps/files/lib/Activity/FavoriteProvider.php b/apps/files/lib/Activity/FavoriteProvider.php
index 9cf1255765b2c58972c1585a4ad1c77174cb19ba..8692b83f0081e5ba0701b48bfbaddc5ea3fa02d1 100644
--- a/apps/files/lib/Activity/FavoriteProvider.php
+++ b/apps/files/lib/Activity/FavoriteProvider.php
@@ -32,8 +32,8 @@ use OCP\IURLGenerator;
 use OCP\L10N\IFactory;
 
 class FavoriteProvider implements IProvider {
-	const SUBJECT_ADDED = 'added_favorite';
-	const SUBJECT_REMOVED = 'removed_favorite';
+	public const SUBJECT_ADDED = 'added_favorite';
+	public const SUBJECT_REMOVED = 'removed_favorite';
 
 	/** @var IFactory */
 	protected $languageFactory;
diff --git a/apps/files/lib/Activity/Helper.php b/apps/files/lib/Activity/Helper.php
index df9ed7af909e53ee83432a54a1c02e8a367c8d7d..c274df2ccbb6b224fd458a99538a903f4fb18985 100644
--- a/apps/files/lib/Activity/Helper.php
+++ b/apps/files/lib/Activity/Helper.php
@@ -27,7 +27,7 @@ use OCP\ITagManager;
 
 class Helper {
 	/** If a user has a lot of favorites the query might get too slow and long */
-	const FAVORITE_LIMIT = 50;
+	public const FAVORITE_LIMIT = 50;
 
 	/** @var ITagManager */
 	protected $tagManager;
diff --git a/apps/files/lib/BackgroundJob/DeleteOrphanedItems.php b/apps/files/lib/BackgroundJob/DeleteOrphanedItems.php
index b0f91b70401ad83d7ad1c507d3b4dd55f104eb4d..ca890269a93a836506940b5b6328f711d35ca4c9 100644
--- a/apps/files/lib/BackgroundJob/DeleteOrphanedItems.php
+++ b/apps/files/lib/BackgroundJob/DeleteOrphanedItems.php
@@ -31,7 +31,7 @@ use OCP\DB\QueryBuilder\IQueryBuilder;
  * Delete all share entries that have no matching entries in the file cache table.
  */
 class DeleteOrphanedItems extends TimedJob {
-	const CHUNK_SIZE = 200;
+	public const CHUNK_SIZE = 200;
 
 	/** @var \OCP\IDBConnection */
 	protected $connection;
diff --git a/apps/files/lib/BackgroundJob/ScanFiles.php b/apps/files/lib/BackgroundJob/ScanFiles.php
index f1ff1a633efb7004e3d9b7a08a7d3907300d7974..b9f37ca8116013522e1d194410af6b6c1a2c132b 100644
--- a/apps/files/lib/BackgroundJob/ScanFiles.php
+++ b/apps/files/lib/BackgroundJob/ScanFiles.php
@@ -48,7 +48,7 @@ class ScanFiles extends \OC\BackgroundJob\TimedJob {
 	private $logger;
 
 	/** Amount of users that should get scanned per execution */
-	const USERS_PER_SESSION = 500;
+	public const USERS_PER_SESSION = 500;
 
 	/**
 	 * @param IConfig|null $config
diff --git a/apps/files/lib/Command/DeleteOrphanedFiles.php b/apps/files/lib/Command/DeleteOrphanedFiles.php
index c5072983ef4c5ea75b7052048367ca2058df81e5..855958511d7aa2bc3f936eeecaab45e02c294c4b 100644
--- a/apps/files/lib/Command/DeleteOrphanedFiles.php
+++ b/apps/files/lib/Command/DeleteOrphanedFiles.php
@@ -32,7 +32,7 @@ use Symfony\Component\Console\Output\OutputInterface;
  * Delete all file entries that have no matching entries in the storage table.
  */
 class DeleteOrphanedFiles extends Command {
-	const CHUNK_SIZE = 200;
+	public const CHUNK_SIZE = 200;
 
 	/**
 	 * @var IDBConnection
diff --git a/apps/files_external/lib/Command/ListCommand.php b/apps/files_external/lib/Command/ListCommand.php
index e7f43ce2a0ec4a1c327c02936935e2ae06a09e46..b238b33f6a4e9c765f22a0ea374d2a9c3373c43f 100644
--- a/apps/files_external/lib/Command/ListCommand.php
+++ b/apps/files_external/lib/Command/ListCommand.php
@@ -58,7 +58,7 @@ class ListCommand extends Base {
 	 */
 	protected $userManager;
 
-	const ALL = -1;
+	public const ALL = -1;
 
 	public function __construct(GlobalStoragesService $globalService, UserStoragesService $userService, IUserSession $userSession, IUserManager $userManager) {
 		parent::__construct();
diff --git a/apps/files_external/lib/Lib/Auth/AmazonS3/AccessKey.php b/apps/files_external/lib/Lib/Auth/AmazonS3/AccessKey.php
index 4822789ba2b57052f2cd92f4fb077ef9769e56a3..cd72634e58a0bc2d17a7a05b355cdc5d2205f31c 100644
--- a/apps/files_external/lib/Lib/Auth/AmazonS3/AccessKey.php
+++ b/apps/files_external/lib/Lib/Auth/AmazonS3/AccessKey.php
@@ -32,7 +32,7 @@ use OCP\IL10N;
  * Amazon S3 access key authentication
  */
 class AccessKey extends AuthMechanism {
-	const SCHEME_AMAZONS3_ACCESSKEY = 'amazons3_accesskey';
+	public const SCHEME_AMAZONS3_ACCESSKEY = 'amazons3_accesskey';
 
 	public function __construct(IL10N $l) {
 		$this
diff --git a/apps/files_external/lib/Lib/Auth/AuthMechanism.php b/apps/files_external/lib/Lib/Auth/AuthMechanism.php
index c13774ea5e05e84f02d7c12861d5afb138120925..5a693b75dbf4e4046847cd69203aa1bb57e39e52 100644
--- a/apps/files_external/lib/Lib/Auth/AuthMechanism.php
+++ b/apps/files_external/lib/Lib/Auth/AuthMechanism.php
@@ -52,14 +52,14 @@ use OCA\Files_External\Lib\VisibilityTrait;
  */
 class AuthMechanism implements \JsonSerializable {
 	/** Standard authentication schemes */
-	const SCHEME_NULL = 'null';
-	const SCHEME_BUILTIN = 'builtin';
-	const SCHEME_PASSWORD = 'password';
-	const SCHEME_OAUTH1 = 'oauth1';
-	const SCHEME_OAUTH2 = 'oauth2';
-	const SCHEME_PUBLICKEY = 'publickey';
-	const SCHEME_OPENSTACK = 'openstack';
-	const SCHEME_SMB = 'smb';
+	public const SCHEME_NULL = 'null';
+	public const SCHEME_BUILTIN = 'builtin';
+	public const SCHEME_PASSWORD = 'password';
+	public const SCHEME_OAUTH1 = 'oauth1';
+	public const SCHEME_OAUTH2 = 'oauth2';
+	public const SCHEME_PUBLICKEY = 'publickey';
+	public const SCHEME_OPENSTACK = 'openstack';
+	public const SCHEME_SMB = 'smb';
 
 	use VisibilityTrait;
 	use FrontendDefinitionTrait;
diff --git a/apps/files_external/lib/Lib/Auth/Password/GlobalAuth.php b/apps/files_external/lib/Lib/Auth/Password/GlobalAuth.php
index de6e34c4443c1a4cfd6160cf862bc8a667756420..34b1b747bfe53ae064821eb24e5aa0da54387e0f 100644
--- a/apps/files_external/lib/Lib/Auth/Password/GlobalAuth.php
+++ b/apps/files_external/lib/Lib/Auth/Password/GlobalAuth.php
@@ -36,7 +36,7 @@ use OCP\Security\ICredentialsManager;
  * Global Username and Password
  */
 class GlobalAuth extends AuthMechanism {
-	const CREDENTIALS_IDENTIFIER = 'password::global';
+	public const CREDENTIALS_IDENTIFIER = 'password::global';
 
 	/** @var ICredentialsManager */
 	protected $credentialsManager;
diff --git a/apps/files_external/lib/Lib/Auth/Password/LoginCredentials.php b/apps/files_external/lib/Lib/Auth/Password/LoginCredentials.php
index 0165bb6d077f54291b59812f5db6010f6e26c4bd..8d06707b2af13ea6910bcf36d4277792569a7b6a 100644
--- a/apps/files_external/lib/Lib/Auth/Password/LoginCredentials.php
+++ b/apps/files_external/lib/Lib/Auth/Password/LoginCredentials.php
@@ -35,7 +35,7 @@ use OCP\Security\ICredentialsManager;
  * Username and password from login credentials, saved in DB
  */
 class LoginCredentials extends AuthMechanism {
-	const CREDENTIALS_IDENTIFIER = 'password::logincredentials/credentials';
+	public const CREDENTIALS_IDENTIFIER = 'password::logincredentials/credentials';
 
 	/** @var ISession */
 	protected $session;
diff --git a/apps/files_external/lib/Lib/Auth/Password/UserProvided.php b/apps/files_external/lib/Lib/Auth/Password/UserProvided.php
index 552b707b5448d69aaf36609a6775dd5577436133..429e0f1c26139c798cac1b070b9da67e61e0836c 100644
--- a/apps/files_external/lib/Lib/Auth/Password/UserProvided.php
+++ b/apps/files_external/lib/Lib/Auth/Password/UserProvided.php
@@ -37,7 +37,7 @@ use OCP\Security\ICredentialsManager;
  * User provided Username and Password
  */
 class UserProvided extends AuthMechanism implements IUserProvided {
-	const CREDENTIALS_IDENTIFIER_PREFIX = 'password::userprovided/';
+	public const CREDENTIALS_IDENTIFIER_PREFIX = 'password::userprovided/';
 
 	/** @var ICredentialsManager */
 	protected $credentialsManager;
diff --git a/apps/files_external/lib/Lib/DefinitionParameter.php b/apps/files_external/lib/Lib/DefinitionParameter.php
index 2e1ce7fb1dd02185ad39151d77bc2cac4c495c31..519de22d70d8022071372a3dd2db78e184da0f7b 100644
--- a/apps/files_external/lib/Lib/DefinitionParameter.php
+++ b/apps/files_external/lib/Lib/DefinitionParameter.php
@@ -29,18 +29,18 @@ namespace OCA\Files_External\Lib;
 class DefinitionParameter implements \JsonSerializable {
 	// placeholder value for password fields, when the client updates a storage configuration
 	// placeholder values are ignored and the field is left unmodified
-	const UNMODIFIED_PLACEHOLDER = '__unmodified__';
+	public const UNMODIFIED_PLACEHOLDER = '__unmodified__';
 
 	/** Value constants */
-	const VALUE_TEXT = 0;
-	const VALUE_BOOLEAN = 1;
-	const VALUE_PASSWORD = 2;
-	const VALUE_HIDDEN = 3;
+	public const VALUE_TEXT = 0;
+	public const VALUE_BOOLEAN = 1;
+	public const VALUE_PASSWORD = 2;
+	public const VALUE_HIDDEN = 3;
 
 	/** Flag constants */
-	const FLAG_NONE = 0;
-	const FLAG_OPTIONAL = 1;
-	const FLAG_USER_PROVIDED = 2;
+	public const FLAG_NONE = 0;
+	public const FLAG_OPTIONAL = 1;
+	public const FLAG_USER_PROVIDED = 2;
 
 	/** @var string name of parameter */
 	private $name;
diff --git a/apps/files_external/lib/Lib/Storage/OwnCloud.php b/apps/files_external/lib/Lib/Storage/OwnCloud.php
index d8e3ee321b766e2b7f9e817776ac410fbbdf668c..8125d87d9ee71e09373a1c979ea00b0ddfa78b52 100644
--- a/apps/files_external/lib/Lib/Storage/OwnCloud.php
+++ b/apps/files_external/lib/Lib/Storage/OwnCloud.php
@@ -39,7 +39,7 @@ use Sabre\DAV\Client;
  *
  */
 class OwnCloud extends \OC\Files\Storage\DAV implements IDisableEncryptionStorage {
-	const OC_URL_SUFFIX = 'remote.php/webdav';
+	public const OC_URL_SUFFIX = 'remote.php/webdav';
 
 	public function __construct($params) {
 		// extract context path from host if specified
diff --git a/apps/files_external/lib/Lib/Storage/Swift.php b/apps/files_external/lib/Lib/Storage/Swift.php
index 96fb4f0ac9aebb1ecad52954a545b4957c6b4a41..3ecb73f54afbc1f8b1dba1aacf9900477ac63c65 100644
--- a/apps/files_external/lib/Lib/Storage/Swift.php
+++ b/apps/files_external/lib/Lib/Storage/Swift.php
@@ -101,7 +101,7 @@ class Swift extends \OC\Files\Storage\Common {
 		return $path;
 	}
 
-	const SUBCONTAINER_FILE = '.subcontainers';
+	public const SUBCONTAINER_FILE = '.subcontainers';
 
 	/**
 	 * translate directory path to container name
diff --git a/apps/files_external/lib/Lib/StorageConfig.php b/apps/files_external/lib/Lib/StorageConfig.php
index 5ed65918b22e2a4d423eb49732d59acd4e6aed12..43d95b8232af7ac2bb8fc7e2783f7da41ad3bb12 100644
--- a/apps/files_external/lib/Lib/StorageConfig.php
+++ b/apps/files_external/lib/Lib/StorageConfig.php
@@ -36,8 +36,8 @@ use OCA\Files_External\Lib\Backend\Backend;
  * External storage configuration
  */
 class StorageConfig implements \JsonSerializable {
-	const MOUNT_TYPE_ADMIN = 1;
-	const MOUNT_TYPE_PERSONAl = 2;
+	public const MOUNT_TYPE_ADMIN = 1;
+	public const MOUNT_TYPE_PERSONAl = 2;
 
 	/**
 	 * Storage config id
diff --git a/apps/files_external/lib/Service/BackendService.php b/apps/files_external/lib/Service/BackendService.php
index 617b44651aea70a1a3fbea04bdeb72afcf262c35..d89e782f6f6082846ce3f0c544de981288d20dd8 100644
--- a/apps/files_external/lib/Service/BackendService.php
+++ b/apps/files_external/lib/Service/BackendService.php
@@ -41,15 +41,15 @@ use OCP\IConfig;
 class BackendService {
 
 	/** Visibility constants for VisibilityTrait */
-	const VISIBILITY_NONE = 0;
-	const VISIBILITY_PERSONAL = 1;
-	const VISIBILITY_ADMIN = 2;
+	public const VISIBILITY_NONE = 0;
+	public const VISIBILITY_PERSONAL = 1;
+	public const VISIBILITY_ADMIN = 2;
 	//const VISIBILITY_ALIENS = 4;
 
-	const VISIBILITY_DEFAULT = 3; // PERSONAL | ADMIN
+	public const VISIBILITY_DEFAULT = 3; // PERSONAL | ADMIN
 
 	/** Priority constants for PriorityTrait */
-	const PRIORITY_DEFAULT = 100;
+	public const PRIORITY_DEFAULT = 100;
 
 	/** @var IConfig */
 	protected $config;
diff --git a/apps/files_external/lib/Service/DBConfigService.php b/apps/files_external/lib/Service/DBConfigService.php
index 51373e8dda60b0b15b9107b147f7cf9436debc3e..7a4579fd3f7c9e107d6af4fc57afd482c121fc95 100644
--- a/apps/files_external/lib/Service/DBConfigService.php
+++ b/apps/files_external/lib/Service/DBConfigService.php
@@ -36,12 +36,12 @@ use OCP\Security\ICrypto;
  * Stores the mount config in the database
  */
 class DBConfigService {
-	const MOUNT_TYPE_ADMIN = 1;
-	const MOUNT_TYPE_PERSONAl = 2;
+	public const MOUNT_TYPE_ADMIN = 1;
+	public const MOUNT_TYPE_PERSONAl = 2;
 
-	const APPLICABLE_TYPE_GLOBAL = 1;
-	const APPLICABLE_TYPE_GROUP = 2;
-	const APPLICABLE_TYPE_USER = 3;
+	public const APPLICABLE_TYPE_GLOBAL = 1;
+	public const APPLICABLE_TYPE_GROUP = 2;
+	public const APPLICABLE_TYPE_USER = 3;
 
 	/**
 	 * @var IDBConnection
diff --git a/apps/files_external/lib/config.php b/apps/files_external/lib/config.php
index c69955c3406f93050ac042eedd91458bb1c46c9e..745f2da6d5e059494ef6a318502d3fec45ed8eca 100644
--- a/apps/files_external/lib/config.php
+++ b/apps/files_external/lib/config.php
@@ -60,10 +60,10 @@ use phpseclib\Crypt\AES;
 class OC_Mount_Config {
 	// TODO: make this class non-static and give it a proper namespace
 
-	const MOUNT_TYPE_GLOBAL = 'global';
-	const MOUNT_TYPE_GROUP = 'group';
-	const MOUNT_TYPE_USER = 'user';
-	const MOUNT_TYPE_PERSONAL = 'personal';
+	public const MOUNT_TYPE_GLOBAL = 'global';
+	public const MOUNT_TYPE_GROUP = 'group';
+	public const MOUNT_TYPE_USER = 'user';
+	public const MOUNT_TYPE_PERSONAL = 'personal';
 
 	// whether to skip backend test (for unit tests, as this static class is not mockable)
 	public static $skipTest = false;
diff --git a/apps/files_external/tests/Service/UserGlobalStoragesServiceTest.php b/apps/files_external/tests/Service/UserGlobalStoragesServiceTest.php
index c23d741b23d8c19eeeb66cf7ac2ad917f7eb445b..f99b25a9fc71ded8484e2ae328e3074eed4b3152 100644
--- a/apps/files_external/tests/Service/UserGlobalStoragesServiceTest.php
+++ b/apps/files_external/tests/Service/UserGlobalStoragesServiceTest.php
@@ -57,9 +57,9 @@ class UserGlobalStoragesServiceTest extends GlobalStoragesServiceTest {
 
 	protected $user;
 
-	const USER_ID = 'test_user';
-	const GROUP_ID = 'test_group';
-	const GROUP_ID2 = 'test_group2';
+	public const USER_ID = 'test_user';
+	public const GROUP_ID = 'test_group';
+	public const GROUP_ID2 = 'test_group2';
 
 	protected function setUp(): void {
 		parent::setUp();
diff --git a/apps/files_sharing/lib/Activity/Filter.php b/apps/files_sharing/lib/Activity/Filter.php
index 4df53745c7b0b7fcb6faadeb6e2d940676e9788f..4997482bddb446f9215ba313bb646a48b34554f3 100644
--- a/apps/files_sharing/lib/Activity/Filter.php
+++ b/apps/files_sharing/lib/Activity/Filter.php
@@ -28,8 +28,8 @@ use OCP\IL10N;
 use OCP\IURLGenerator;
 
 class Filter implements IFilter {
-	const TYPE_REMOTE_SHARE = 'remote_share';
-	const TYPE_SHARED = 'shared';
+	public const TYPE_REMOTE_SHARE = 'remote_share';
+	public const TYPE_SHARED = 'shared';
 
 	/** @var IL10N */
 	protected $l;
diff --git a/apps/files_sharing/lib/Activity/Providers/Downloads.php b/apps/files_sharing/lib/Activity/Providers/Downloads.php
index 23c55e08a268d68943c6947dccce4d77c716ae59..acb4ce3837a308454cae6a0e46c5b8a4a5a5ab16 100644
--- a/apps/files_sharing/lib/Activity/Providers/Downloads.php
+++ b/apps/files_sharing/lib/Activity/Providers/Downloads.php
@@ -26,11 +26,11 @@ namespace OCA\Files_Sharing\Activity\Providers;
 use OCP\Activity\IEvent;
 
 class Downloads extends Base {
-	const SUBJECT_PUBLIC_SHARED_FILE_DOWNLOADED = 'public_shared_file_downloaded';
-	const SUBJECT_PUBLIC_SHARED_FOLDER_DOWNLOADED = 'public_shared_folder_downloaded';
+	public const SUBJECT_PUBLIC_SHARED_FILE_DOWNLOADED = 'public_shared_file_downloaded';
+	public const SUBJECT_PUBLIC_SHARED_FOLDER_DOWNLOADED = 'public_shared_folder_downloaded';
 
-	const SUBJECT_SHARED_FILE_BY_EMAIL_DOWNLOADED = 'file_shared_with_email_downloaded';
-	const SUBJECT_SHARED_FOLDER_BY_EMAIL_DOWNLOADED = 'folder_shared_with_email_downloaded';
+	public const SUBJECT_SHARED_FILE_BY_EMAIL_DOWNLOADED = 'file_shared_with_email_downloaded';
+	public const SUBJECT_SHARED_FOLDER_BY_EMAIL_DOWNLOADED = 'folder_shared_with_email_downloaded';
 
 	/**
 	 * @param IEvent $event
diff --git a/apps/files_sharing/lib/Activity/Providers/Groups.php b/apps/files_sharing/lib/Activity/Providers/Groups.php
index c6115a8dba0e019696059074ade6966015fe8c5b..dfc3e6b521d2a415c0ef5a36e633739821f75674 100644
--- a/apps/files_sharing/lib/Activity/Providers/Groups.php
+++ b/apps/files_sharing/lib/Activity/Providers/Groups.php
@@ -35,13 +35,13 @@ use OCP\IUserManager;
 use OCP\L10N\IFactory;
 
 class Groups extends Base {
-	const SUBJECT_SHARED_GROUP_SELF = 'shared_group_self';
-	const SUBJECT_RESHARED_GROUP_BY = 'reshared_group_by';
+	public const SUBJECT_SHARED_GROUP_SELF = 'shared_group_self';
+	public const SUBJECT_RESHARED_GROUP_BY = 'reshared_group_by';
 
-	const SUBJECT_UNSHARED_GROUP_SELF = 'unshared_group_self';
-	const SUBJECT_UNSHARED_GROUP_BY = 'unshared_group_by';
+	public const SUBJECT_UNSHARED_GROUP_SELF = 'unshared_group_self';
+	public const SUBJECT_UNSHARED_GROUP_BY = 'unshared_group_by';
 
-	const SUBJECT_EXPIRED_GROUP = 'expired_group';
+	public const SUBJECT_EXPIRED_GROUP = 'expired_group';
 
 	/** @var IGroupManager */
 	protected $groupManager;
diff --git a/apps/files_sharing/lib/Activity/Providers/PublicLinks.php b/apps/files_sharing/lib/Activity/Providers/PublicLinks.php
index 0ebe6cdec0fcc41b5017025a505571e81216616c..884296e46f5f76cd91e979aa364e0f421563f000 100644
--- a/apps/files_sharing/lib/Activity/Providers/PublicLinks.php
+++ b/apps/files_sharing/lib/Activity/Providers/PublicLinks.php
@@ -26,12 +26,12 @@ namespace OCA\Files_Sharing\Activity\Providers;
 use OCP\Activity\IEvent;
 
 class PublicLinks extends Base {
-	const SUBJECT_SHARED_LINK_SELF = 'shared_link_self';
-	const SUBJECT_RESHARED_LINK_BY = 'reshared_link_by';
-	const SUBJECT_UNSHARED_LINK_SELF = 'unshared_link_self';
-	const SUBJECT_UNSHARED_LINK_BY = 'unshared_link_by';
-	const SUBJECT_LINK_EXPIRED = 'link_expired';
-	const SUBJECT_LINK_BY_EXPIRED = 'link_by_expired';
+	public const SUBJECT_SHARED_LINK_SELF = 'shared_link_self';
+	public const SUBJECT_RESHARED_LINK_BY = 'reshared_link_by';
+	public const SUBJECT_UNSHARED_LINK_SELF = 'unshared_link_self';
+	public const SUBJECT_UNSHARED_LINK_BY = 'unshared_link_by';
+	public const SUBJECT_LINK_EXPIRED = 'link_expired';
+	public const SUBJECT_LINK_BY_EXPIRED = 'link_by_expired';
 
 	/**
 	 * @param IEvent $event
diff --git a/apps/files_sharing/lib/Activity/Providers/RemoteShares.php b/apps/files_sharing/lib/Activity/Providers/RemoteShares.php
index 2604288d448e79be2c709d5f3ac1728026ff47c7..4a297fcf0602d79ea834c84017a73d41047db44d 100644
--- a/apps/files_sharing/lib/Activity/Providers/RemoteShares.php
+++ b/apps/files_sharing/lib/Activity/Providers/RemoteShares.php
@@ -33,10 +33,10 @@ use OCP\IUserManager;
 use OCP\L10N\IFactory;
 
 class RemoteShares extends Base {
-	const SUBJECT_REMOTE_SHARE_ACCEPTED = 'remote_share_accepted';
-	const SUBJECT_REMOTE_SHARE_DECLINED = 'remote_share_declined';
-	const SUBJECT_REMOTE_SHARE_RECEIVED = 'remote_share_received';
-	const SUBJECT_REMOTE_SHARE_UNSHARED = 'remote_share_unshared';
+	public const SUBJECT_REMOTE_SHARE_ACCEPTED = 'remote_share_accepted';
+	public const SUBJECT_REMOTE_SHARE_DECLINED = 'remote_share_declined';
+	public const SUBJECT_REMOTE_SHARE_RECEIVED = 'remote_share_received';
+	public const SUBJECT_REMOTE_SHARE_UNSHARED = 'remote_share_unshared';
 
 	public function __construct(IFactory $languageFactory,
 								IURLGenerator $url,
diff --git a/apps/files_sharing/lib/Activity/Providers/Users.php b/apps/files_sharing/lib/Activity/Providers/Users.php
index aff5feddc0172b9e1279e42ae5105ae3582e1766..8f90ffdf567f7252c952b476e72299371f7dd91c 100644
--- a/apps/files_sharing/lib/Activity/Providers/Users.php
+++ b/apps/files_sharing/lib/Activity/Providers/Users.php
@@ -28,18 +28,18 @@ namespace OCA\Files_Sharing\Activity\Providers;
 use OCP\Activity\IEvent;
 
 class Users extends Base {
-	const SUBJECT_SHARED_USER_SELF = 'shared_user_self';
-	const SUBJECT_RESHARED_USER_BY = 'reshared_user_by';
-	const SUBJECT_UNSHARED_USER_SELF = 'unshared_user_self';
-	const SUBJECT_UNSHARED_USER_BY = 'unshared_user_by';
+	public const SUBJECT_SHARED_USER_SELF = 'shared_user_self';
+	public const SUBJECT_RESHARED_USER_BY = 'reshared_user_by';
+	public const SUBJECT_UNSHARED_USER_SELF = 'unshared_user_self';
+	public const SUBJECT_UNSHARED_USER_BY = 'unshared_user_by';
 
-	const SUBJECT_SHARED_WITH_BY = 'shared_with_by';
-	const SUBJECT_UNSHARED_BY = 'unshared_by';
-	const SUBJECT_SELF_UNSHARED = 'self_unshared';
-	const SUBJECT_SELF_UNSHARED_BY = 'self_unshared_by';
+	public const SUBJECT_SHARED_WITH_BY = 'shared_with_by';
+	public const SUBJECT_UNSHARED_BY = 'unshared_by';
+	public const SUBJECT_SELF_UNSHARED = 'self_unshared';
+	public const SUBJECT_SELF_UNSHARED_BY = 'self_unshared_by';
 
-	const SUBJECT_EXPIRED_USER = 'expired_user';
-	const SUBJECT_EXPIRED = 'expired';
+	public const SUBJECT_EXPIRED_USER = 'expired_user';
+	public const SUBJECT_EXPIRED = 'expired';
 
 	/**
 	 * @param IEvent $event
diff --git a/apps/files_sharing/lib/AppInfo/Application.php b/apps/files_sharing/lib/AppInfo/Application.php
index 2902b820af3e3f93750b06ddc4d5f0e4571e2b4b..34db7441daaabdb7f49af4833cc266ca39126069 100644
--- a/apps/files_sharing/lib/AppInfo/Application.php
+++ b/apps/files_sharing/lib/AppInfo/Application.php
@@ -65,7 +65,7 @@ use OCP\Util;
 use Symfony\Component\EventDispatcher\GenericEvent;
 
 class Application extends App {
-	const APP_ID = 'files_sharing';
+	public const APP_ID = 'files_sharing';
 
 	public function __construct(array $urlParams = []) {
 		parent::__construct(self::APP_ID, $urlParams);
diff --git a/apps/files_sharing/lib/External/Manager.php b/apps/files_sharing/lib/External/Manager.php
index 3923fdf09d34ebfd62ea67161a688daf724a3655..8331787c6dfd5d613328776a1d72f33f9261090d 100644
--- a/apps/files_sharing/lib/External/Manager.php
+++ b/apps/files_sharing/lib/External/Manager.php
@@ -48,7 +48,7 @@ use OCP\Share;
 use OCP\Share\IShare;
 
 class Manager {
-	const STORAGE = '\OCA\Files_Sharing\External\Storage';
+	public const STORAGE = '\OCA\Files_Sharing\External\Storage';
 
 	/**
 	 * @var string
diff --git a/apps/files_sharing/lib/External/MountProvider.php b/apps/files_sharing/lib/External/MountProvider.php
index 992aba48c6671b4acf466108d66607fc48b25fd4..5d26bf20b4778207d2a3b82b41394c4d43d17d45 100644
--- a/apps/files_sharing/lib/External/MountProvider.php
+++ b/apps/files_sharing/lib/External/MountProvider.php
@@ -30,7 +30,7 @@ use OCP\IDBConnection;
 use OCP\IUser;
 
 class MountProvider implements IMountProvider {
-	const STORAGE = '\OCA\Files_Sharing\External\Storage';
+	public const STORAGE = '\OCA\Files_Sharing\External\Storage';
 
 	/**
 	 * @var \OCP\IDBConnection
diff --git a/apps/files_sharing/lib/ShareBackend/File.php b/apps/files_sharing/lib/ShareBackend/File.php
index 2db6c374c85b43ded1409a6c15646b00f9658f71..a15391162ff4f94fa588a438db3a950948619055 100644
--- a/apps/files_sharing/lib/ShareBackend/File.php
+++ b/apps/files_sharing/lib/ShareBackend/File.php
@@ -37,13 +37,13 @@ namespace OCA\Files_Sharing\ShareBackend;
 use OCA\FederatedFileSharing\FederatedShareProvider;
 
 class File implements \OCP\Share_Backend_File_Dependent {
-	const FORMAT_SHARED_STORAGE = 0;
-	const FORMAT_GET_FOLDER_CONTENTS = 1;
-	const FORMAT_FILE_APP_ROOT = 2;
-	const FORMAT_OPENDIR = 3;
-	const FORMAT_GET_ALL = 4;
-	const FORMAT_PERMISSIONS = 5;
-	const FORMAT_TARGET_NAMES = 6;
+	public const FORMAT_SHARED_STORAGE = 0;
+	public const FORMAT_GET_FOLDER_CONTENTS = 1;
+	public const FORMAT_FILE_APP_ROOT = 2;
+	public const FORMAT_OPENDIR = 3;
+	public const FORMAT_GET_ALL = 4;
+	public const FORMAT_PERMISSIONS = 5;
+	public const FORMAT_TARGET_NAMES = 6;
 
 	private $path;
 
diff --git a/apps/files_sharing/tests/ApiTest.php b/apps/files_sharing/tests/ApiTest.php
index bb478044a2fb69a8833e0cc9f98c9b5d3415a724..6bbb62d60905a9b94cd266c4a014283f18c490aa 100644
--- a/apps/files_sharing/tests/ApiTest.php
+++ b/apps/files_sharing/tests/ApiTest.php
@@ -53,8 +53,8 @@ use OCP\Share\IShare;
  * TODO: convert to real intergration tests
  */
 class ApiTest extends TestCase {
-	const TEST_FOLDER_NAME = '/folder_share_api_test';
-	const APP_NAME = 'files_sharing';
+	public const TEST_FOLDER_NAME = '/folder_share_api_test';
+	public const APP_NAME = 'files_sharing';
 
 	private static $tempStorage;
 
diff --git a/apps/files_sharing/tests/ShareTest.php b/apps/files_sharing/tests/ShareTest.php
index 313c8d8ac562e2fbfb993d56cc76be5f42345670..ba6b401e65ecf11744f6b9527d6f5fc9ce6293af 100644
--- a/apps/files_sharing/tests/ShareTest.php
+++ b/apps/files_sharing/tests/ShareTest.php
@@ -34,7 +34,7 @@ namespace OCA\Files_Sharing\Tests;
  * @group DB
  */
 class ShareTest extends TestCase {
-	const TEST_FOLDER_NAME = '/folder_share_api_test';
+	public const TEST_FOLDER_NAME = '/folder_share_api_test';
 
 	private static $tempStorage;
 
diff --git a/apps/files_sharing/tests/TestCase.php b/apps/files_sharing/tests/TestCase.php
index 323fc06f321278452d15963a794dc7a91401058a..f84867c0acaa392f25a630463f94ffb4b8693ce0 100644
--- a/apps/files_sharing/tests/TestCase.php
+++ b/apps/files_sharing/tests/TestCase.php
@@ -47,12 +47,12 @@ use Test\Traits\MountProviderTrait;
 abstract class TestCase extends \Test\TestCase {
 	use MountProviderTrait;
 
-	const TEST_FILES_SHARING_API_USER1 = "test-share-user1";
-	const TEST_FILES_SHARING_API_USER2 = "test-share-user2";
-	const TEST_FILES_SHARING_API_USER3 = "test-share-user3";
-	const TEST_FILES_SHARING_API_USER4 = "test-share-user4";
+	public const TEST_FILES_SHARING_API_USER1 = "test-share-user1";
+	public const TEST_FILES_SHARING_API_USER2 = "test-share-user2";
+	public const TEST_FILES_SHARING_API_USER3 = "test-share-user3";
+	public const TEST_FILES_SHARING_API_USER4 = "test-share-user4";
 
-	const TEST_FILES_SHARING_API_GROUP1 = "test-share-group1";
+	public const TEST_FILES_SHARING_API_GROUP1 = "test-share-group1";
 
 	public $filename;
 	public $data;
diff --git a/apps/files_sharing/tests/UnshareChildrenTest.php b/apps/files_sharing/tests/UnshareChildrenTest.php
index 56fdeb44a307116766126a838b56751bbe49f32c..15daf9d5108515aa2abadb7d09579d025bb9d7cf 100644
--- a/apps/files_sharing/tests/UnshareChildrenTest.php
+++ b/apps/files_sharing/tests/UnshareChildrenTest.php
@@ -37,7 +37,7 @@ namespace OCA\Files_Sharing\Tests;
 class UnshareChildrenTest extends TestCase {
 	protected $subsubfolder;
 
-	const TEST_FOLDER_NAME = '/folder_share_api_test';
+	public const TEST_FOLDER_NAME = '/folder_share_api_test';
 
 	private static $tempStorage;
 
diff --git a/apps/files_sharing/tests/UpdaterTest.php b/apps/files_sharing/tests/UpdaterTest.php
index 0abc76df4338d2e88ace257efcd10506001e9a88..f2227721edc03671e100802b5bec45fa47eb0415 100644
--- a/apps/files_sharing/tests/UpdaterTest.php
+++ b/apps/files_sharing/tests/UpdaterTest.php
@@ -36,7 +36,7 @@ namespace OCA\Files_Sharing\Tests;
  * @group DB
  */
 class UpdaterTest extends TestCase {
-	const TEST_FOLDER_NAME = '/folder_share_updater_test';
+	public const TEST_FOLDER_NAME = '/folder_share_updater_test';
 
 	public static function setUpBeforeClass(): void {
 		parent::setUpBeforeClass();
diff --git a/apps/files_trashbin/lib/Expiration.php b/apps/files_trashbin/lib/Expiration.php
index 9a660f9e9422a70e8a776a5f736486ab8d363884..3a2dc2ede03e32b3634c69255c41849cb4a399bb 100644
--- a/apps/files_trashbin/lib/Expiration.php
+++ b/apps/files_trashbin/lib/Expiration.php
@@ -32,8 +32,8 @@ use OCP\IConfig;
 class Expiration {
 
 	// how long do we keep files in the trash bin if no other value is defined in the config file (unit: days)
-	const DEFAULT_RETENTION_OBLIGATION = 30;
-	const NO_OBLIGATION = -1;
+	public const DEFAULT_RETENTION_OBLIGATION = 30;
+	public const NO_OBLIGATION = -1;
 
 	/** @var ITimeFactory */
 	private $timeFactory;
diff --git a/apps/files_trashbin/lib/Sabre/PropfindPlugin.php b/apps/files_trashbin/lib/Sabre/PropfindPlugin.php
index 1920ed1786358adcbbb3130a58f2f5c3abc92d14..ac3fcdb319238f8fcb988d73b1364e8f10a80c9c 100644
--- a/apps/files_trashbin/lib/Sabre/PropfindPlugin.php
+++ b/apps/files_trashbin/lib/Sabre/PropfindPlugin.php
@@ -35,10 +35,10 @@ use Sabre\DAV\Server;
 use Sabre\DAV\ServerPlugin;
 
 class PropfindPlugin extends ServerPlugin {
-	const TRASHBIN_FILENAME = '{http://nextcloud.org/ns}trashbin-filename';
-	const TRASHBIN_ORIGINAL_LOCATION = '{http://nextcloud.org/ns}trashbin-original-location';
-	const TRASHBIN_DELETION_TIME = '{http://nextcloud.org/ns}trashbin-deletion-time';
-	const TRASHBIN_TITLE = '{http://nextcloud.org/ns}trashbin-title';
+	public const TRASHBIN_FILENAME = '{http://nextcloud.org/ns}trashbin-filename';
+	public const TRASHBIN_ORIGINAL_LOCATION = '{http://nextcloud.org/ns}trashbin-original-location';
+	public const TRASHBIN_DELETION_TIME = '{http://nextcloud.org/ns}trashbin-deletion-time';
+	public const TRASHBIN_TITLE = '{http://nextcloud.org/ns}trashbin-title';
 
 	/** @var Server */
 	private $server;
diff --git a/apps/files_trashbin/lib/Trashbin.php b/apps/files_trashbin/lib/Trashbin.php
index adfdf1364be318c1ea255446984c556171520baa..4ceac3b04c5f82ee1f8ba815d00e4a7a678aac97 100644
--- a/apps/files_trashbin/lib/Trashbin.php
+++ b/apps/files_trashbin/lib/Trashbin.php
@@ -56,7 +56,7 @@ use OCP\User;
 class Trashbin {
 
 	// unit: percentage; 50% of available disk space/quota
-	const DEFAULTMAXSIZE = 50;
+	public const DEFAULTMAXSIZE = 50;
 
 	/**
 	 * Whether versions have already be rescanned during this PHP request
diff --git a/apps/files_trashbin/tests/ExpirationTest.php b/apps/files_trashbin/tests/ExpirationTest.php
index 581ef247ac7ffe80278edb0156a9a6d9227b71c6..a9b4124236e1a4d7d88a9bfff4b5a5cfd30ce59a 100644
--- a/apps/files_trashbin/tests/ExpirationTest.php
+++ b/apps/files_trashbin/tests/ExpirationTest.php
@@ -28,9 +28,9 @@ use OCP\IConfig;
 use PHPUnit\Framework\MockObject\MockObject;
 
 class ExpirationTest extends \Test\TestCase {
-	const SECONDS_PER_DAY = 86400; //60*60*24
+	public const SECONDS_PER_DAY = 86400; //60*60*24
 
-	const FAKE_TIME_NOW = 1000000;
+	public const FAKE_TIME_NOW = 1000000;
 
 	public function expirationData() {
 		$today = 100*self::SECONDS_PER_DAY;
diff --git a/apps/files_trashbin/tests/TrashbinTest.php b/apps/files_trashbin/tests/TrashbinTest.php
index fbf1b1c1c13bce1d7b4c30a34ae923e14a103397..136d8121cfa6652a2d85c86cccaefad6786f98e4 100644
--- a/apps/files_trashbin/tests/TrashbinTest.php
+++ b/apps/files_trashbin/tests/TrashbinTest.php
@@ -37,8 +37,8 @@ use OCA\Files_Sharing\AppInfo\Application;
  * @group DB
  */
 class TrashbinTest extends \Test\TestCase {
-	const TEST_TRASHBIN_USER1 = "test-trashbin-user1";
-	const TEST_TRASHBIN_USER2 = "test-trashbin-user2";
+	public const TEST_TRASHBIN_USER1 = "test-trashbin-user1";
+	public const TEST_TRASHBIN_USER2 = "test-trashbin-user2";
 
 	private $trashRoot1;
 	private $trashRoot2;
diff --git a/apps/files_versions/lib/AppInfo/Application.php b/apps/files_versions/lib/AppInfo/Application.php
index 36d7b6d2767baba4b87dbc881d56c8342955470e..23942bf8952712dd9bba84cdd369402fc1a75db5 100644
--- a/apps/files_versions/lib/AppInfo/Application.php
+++ b/apps/files_versions/lib/AppInfo/Application.php
@@ -42,7 +42,7 @@ use OCP\AppFramework\IAppContainer;
 use OCP\EventDispatcher\IEventDispatcher;
 
 class Application extends App {
-	const APP_ID = 'files_versions';
+	public const APP_ID = 'files_versions';
 
 	public function __construct(array $urlParams = []) {
 		parent::__construct(self::APP_ID, $urlParams);
diff --git a/apps/files_versions/lib/BackgroundJob/ExpireVersions.php b/apps/files_versions/lib/BackgroundJob/ExpireVersions.php
index 4c8f82a1c7641f447b963861af570be80a803c65..201824389d5594f6d682ba1aa0432aea1060d3e8 100644
--- a/apps/files_versions/lib/BackgroundJob/ExpireVersions.php
+++ b/apps/files_versions/lib/BackgroundJob/ExpireVersions.php
@@ -31,7 +31,7 @@ use OCP\IUser;
 use OCP\IUserManager;
 
 class ExpireVersions extends \OC\BackgroundJob\TimedJob {
-	const ITEMS_PER_SESSION = 1000;
+	public const ITEMS_PER_SESSION = 1000;
 
 	/**
 	 * @var Expiration
diff --git a/apps/files_versions/lib/Expiration.php b/apps/files_versions/lib/Expiration.php
index c9c91d67d7fb8da93bbc9d1e53582277c5bf9201..ab1eeab69010c9138120a7b526afee2b3998e673 100644
--- a/apps/files_versions/lib/Expiration.php
+++ b/apps/files_versions/lib/Expiration.php
@@ -30,7 +30,7 @@ use OCP\IConfig;
 class Expiration {
 
 	// how long do we keep files a version if no other value is defined in the config file (unit: days)
-	const NO_OBLIGATION = -1;
+	public const NO_OBLIGATION = -1;
 
 	/** @var ITimeFactory */
 	private $timeFactory;
diff --git a/apps/files_versions/lib/Storage.php b/apps/files_versions/lib/Storage.php
index f62650e539d41dcc3134f7fbf6d3727645086378..cb5a02581b5dc60313ce97cb03835878be26cb30 100644
--- a/apps/files_versions/lib/Storage.php
+++ b/apps/files_versions/lib/Storage.php
@@ -57,13 +57,13 @@ use OCP\Lock\ILockingProvider;
 use OCP\User;
 
 class Storage {
-	const DEFAULTENABLED=true;
-	const DEFAULTMAXSIZE=50; // unit: percentage; 50% of available disk space/quota
-	const VERSIONS_ROOT = 'files_versions/';
+	public const DEFAULTENABLED=true;
+	public const DEFAULTMAXSIZE=50; // unit: percentage; 50% of available disk space/quota
+	public const VERSIONS_ROOT = 'files_versions/';
 
-	const DELETE_TRIGGER_MASTER_REMOVED = 0;
-	const DELETE_TRIGGER_RETENTION_CONSTRAINT = 1;
-	const DELETE_TRIGGER_QUOTA_EXCEEDED = 2;
+	public const DELETE_TRIGGER_MASTER_REMOVED = 0;
+	public const DELETE_TRIGGER_RETENTION_CONSTRAINT = 1;
+	public const DELETE_TRIGGER_QUOTA_EXCEEDED = 2;
 
 	// files for which we can remove the versions after the delete operation was successful
 	private static $deletedFiles = [];
diff --git a/apps/files_versions/tests/ExpirationTest.php b/apps/files_versions/tests/ExpirationTest.php
index 426d07e4b42c91daf4b13ad27eae27dd159f1575..1979da624c7f761b43d8545c2fe48d71bb1dd540 100644
--- a/apps/files_versions/tests/ExpirationTest.php
+++ b/apps/files_versions/tests/ExpirationTest.php
@@ -31,7 +31,7 @@ use OCP\IConfig;
 use PHPUnit\Framework\MockObject\MockObject;
 
 class ExpirationTest extends \Test\TestCase {
-	const SECONDS_PER_DAY = 86400; //60*60*24
+	public const SECONDS_PER_DAY = 86400; //60*60*24
 
 	public function expirationData() {
 		$today = 100*self::SECONDS_PER_DAY;
diff --git a/apps/files_versions/tests/VersioningTest.php b/apps/files_versions/tests/VersioningTest.php
index c3ae186e73eb99893901d216e1fbb25731acd53c..264295743645ae9385fec8931124975819016f5d 100644
--- a/apps/files_versions/tests/VersioningTest.php
+++ b/apps/files_versions/tests/VersioningTest.php
@@ -47,9 +47,9 @@ use OCP\IUser;
  * @group DB
  */
 class VersioningTest extends \Test\TestCase {
-	const TEST_VERSIONS_USER = 'test-versions-user';
-	const TEST_VERSIONS_USER2 = 'test-versions-user2';
-	const USERS_VERSIONS_ROOT = '/test-versions-user/files_versions';
+	public const TEST_VERSIONS_USER = 'test-versions-user';
+	public const TEST_VERSIONS_USER2 = 'test-versions-user2';
+	public const USERS_VERSIONS_ROOT = '/test-versions-user/files_versions';
 
 	/**
 	 * @var \OC\Files\View
diff --git a/apps/oauth2/lib/Controller/SettingsController.php b/apps/oauth2/lib/Controller/SettingsController.php
index 89685bbee19d976631bea5a3deedc3448bed36cf..db0c6957d067895e7e2b8142f29265b6e8ad3770 100644
--- a/apps/oauth2/lib/Controller/SettingsController.php
+++ b/apps/oauth2/lib/Controller/SettingsController.php
@@ -53,7 +53,7 @@ class SettingsController extends Controller {
 	/** @var IL10N */
 	private $l;
 
-	const validChars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';
+	public const validChars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';
 
 	/**
 	 * @param string $appName
diff --git a/apps/settings/lib/AppInfo/Application.php b/apps/settings/lib/AppInfo/Application.php
index 809fe6cf844c3ab9ef371e4a36df3b0eae41cc8e..0f1a529ae81e1a39d0801ef82f41e53984c1f723 100644
--- a/apps/settings/lib/AppInfo/Application.php
+++ b/apps/settings/lib/AppInfo/Application.php
@@ -54,7 +54,7 @@ use Symfony\Component\EventDispatcher\EventDispatcherInterface;
 use Symfony\Component\EventDispatcher\GenericEvent;
 
 class Application extends App {
-	const APP_ID = 'settings';
+	public const APP_ID = 'settings';
 
 	/**
 	 * @param array $urlParams
diff --git a/apps/sharebymail/lib/Activity.php b/apps/sharebymail/lib/Activity.php
index 757b2692e86ec4204e32ebd35e7a8ce3a979c2f0..af8157523f1f1192b33366cf76a35a941e615210 100644
--- a/apps/sharebymail/lib/Activity.php
+++ b/apps/sharebymail/lib/Activity.php
@@ -60,12 +60,12 @@ class Activity implements IProvider {
 	/** @var array */
 	protected $contactNames = [];
 
-	const SUBJECT_SHARED_EMAIL_SELF = 'shared_with_email_self';
-	const SUBJECT_SHARED_EMAIL_BY = 'shared_with_email_by';
-	const SUBJECT_SHARED_EMAIL_PASSWORD_SEND = 'shared_with_email_password_send';
-	const SUBJECT_SHARED_EMAIL_PASSWORD_SEND_SELF = 'shared_with_email_password_send_self';
-	const SUBJECT_UNSHARED_EMAIL_SELF = 'unshared_with_email_self';
-	const SUBJECT_UNSHARED_EMAIL_BY = 'unshared_with_email_by';
+	public const SUBJECT_SHARED_EMAIL_SELF = 'shared_with_email_self';
+	public const SUBJECT_SHARED_EMAIL_BY = 'shared_with_email_by';
+	public const SUBJECT_SHARED_EMAIL_PASSWORD_SEND = 'shared_with_email_password_send';
+	public const SUBJECT_SHARED_EMAIL_PASSWORD_SEND_SELF = 'shared_with_email_password_send_self';
+	public const SUBJECT_UNSHARED_EMAIL_SELF = 'unshared_with_email_self';
+	public const SUBJECT_UNSHARED_EMAIL_BY = 'unshared_with_email_by';
 
 	/**
 	 * @param IFactory $languageFactory
diff --git a/apps/systemtags/lib/Activity/Provider.php b/apps/systemtags/lib/Activity/Provider.php
index c60aad31d62f128b433c6dc9355b2b71fa6afbe2..6c91daffe1803f32054e8251bec1bfbae1a44aec 100644
--- a/apps/systemtags/lib/Activity/Provider.php
+++ b/apps/systemtags/lib/Activity/Provider.php
@@ -33,12 +33,12 @@ use OCP\IUserManager;
 use OCP\L10N\IFactory;
 
 class Provider implements IProvider {
-	const CREATE_TAG = 'create_tag';
-	const UPDATE_TAG = 'update_tag';
-	const DELETE_TAG = 'delete_tag';
+	public const CREATE_TAG = 'create_tag';
+	public const UPDATE_TAG = 'update_tag';
+	public const DELETE_TAG = 'delete_tag';
 
-	const ASSIGN_TAG = 'assign_tag';
-	const UNASSIGN_TAG = 'unassign_tag';
+	public const ASSIGN_TAG = 'assign_tag';
+	public const UNASSIGN_TAG = 'unassign_tag';
 
 	/** @var IFactory */
 	protected $languageFactory;
diff --git a/apps/testing/lib/Locking/FakeDBLockingProvider.php b/apps/testing/lib/Locking/FakeDBLockingProvider.php
index 62cbc4d24687291977c1b3b7e28980ea4ff1642f..2de83eac1a8f0bca056a04beb4f3b5e1de97d31e 100644
--- a/apps/testing/lib/Locking/FakeDBLockingProvider.php
+++ b/apps/testing/lib/Locking/FakeDBLockingProvider.php
@@ -29,7 +29,7 @@ use OCP\ILogger;
 
 class FakeDBLockingProvider extends \OC\Lock\DBLockingProvider {
 	// Lock for 10 hours just to be sure
-	const TTL = 36000;
+	public const TTL = 36000;
 
 	/**
 	 * Need a new child, because parent::connection is private instead of protected...
diff --git a/apps/user_ldap/lib/Access.php b/apps/user_ldap/lib/Access.php
index 6744b044cdf0d34b9ff4a57059297c7e77038c42..71994585c73236c804a0304aaf5c49c3d788e34d 100644
--- a/apps/user_ldap/lib/Access.php
+++ b/apps/user_ldap/lib/Access.php
@@ -64,7 +64,7 @@ use OCP\IUserManager;
  * @package OCA\User_LDAP
  */
 class Access extends LDAPUtility {
-	const UUID_ATTRIBUTES = ['entryuuid', 'nsuniqueid', 'objectguid', 'guid', 'ipauniqueid'];
+	public const UUID_ATTRIBUTES = ['entryuuid', 'nsuniqueid', 'objectguid', 'guid', 'ipauniqueid'];
 
 	/** @var \OCA\User_LDAP\Connection */
 	public $connection;
diff --git a/apps/user_ldap/lib/Configuration.php b/apps/user_ldap/lib/Configuration.php
index 4076a6e8a3d4cf76ab883d2da122e20172906845..81e33e6244f33c064d88b3e9659608137a188952 100644
--- a/apps/user_ldap/lib/Configuration.php
+++ b/apps/user_ldap/lib/Configuration.php
@@ -41,9 +41,9 @@ namespace OCA\User_LDAP;
  * @property string ldapUserAvatarRule
  */
 class Configuration {
-	const AVATAR_PREFIX_DEFAULT = 'default';
-	const AVATAR_PREFIX_NONE = 'none';
-	const AVATAR_PREFIX_DATA_ATTRIBUTE = 'data:';
+	public const AVATAR_PREFIX_DEFAULT = 'default';
+	public const AVATAR_PREFIX_NONE = 'none';
+	public const AVATAR_PREFIX_DATA_ATTRIBUTE = 'data:';
 
 	protected $configPrefix = null;
 	protected $configRead = false;
diff --git a/apps/user_ldap/lib/Jobs/Sync.php b/apps/user_ldap/lib/Jobs/Sync.php
index 1ef2d16e7c2d016a80b87806e3a4950e30915803..053ca8949028fa1dac692d6d9dc78e664dbcc2e2 100644
--- a/apps/user_ldap/lib/Jobs/Sync.php
+++ b/apps/user_ldap/lib/Jobs/Sync.php
@@ -43,8 +43,8 @@ use OCP\IUserManager;
 use OCP\Notification\IManager;
 
 class Sync extends TimedJob {
-	const MAX_INTERVAL = 12 * 60 * 60; // 12h
-	const MIN_INTERVAL = 30 * 60; // 30min
+	public const MAX_INTERVAL = 12 * 60 * 60; // 12h
+	public const MIN_INTERVAL = 30 * 60; // 30min
 	/** @var  Helper */
 	protected $ldapHelper;
 	/** @var  LDAP */
diff --git a/apps/user_ldap/lib/User/User.php b/apps/user_ldap/lib/User/User.php
index 724db0636597130ab437a46f77136f17f9e209f2..7d4e6c267de617c5b447a025662adac09b9456be 100644
--- a/apps/user_ldap/lib/User/User.php
+++ b/apps/user_ldap/lib/User/User.php
@@ -107,8 +107,8 @@ class User {
 	/**
 	 * DB config keys for user preferences
 	 */
-	const USER_PREFKEY_FIRSTLOGIN  = 'firstLoginAccomplished';
-	const USER_PREFKEY_LASTREFRESH = 'lastFeatureRefresh';
+	public const USER_PREFKEY_FIRSTLOGIN  = 'firstLoginAccomplished';
+	public const USER_PREFKEY_LASTREFRESH = 'lastFeatureRefresh';
 
 	/**
 	 * @brief constructor, make sure the subclasses call this one!
diff --git a/apps/user_ldap/lib/Wizard.php b/apps/user_ldap/lib/Wizard.php
index b0b9374fdf6be6897d89cae5aec9a882501fa9c4..73032bfd7f2566a035a5dd6295248273ff3bbf9c 100644
--- a/apps/user_ldap/lib/Wizard.php
+++ b/apps/user_ldap/lib/Wizard.php
@@ -50,18 +50,18 @@ class Wizard extends LDAPUtility {
 	protected $result;
 	protected $resultCache = [];
 
-	const LRESULT_PROCESSED_OK = 2;
-	const LRESULT_PROCESSED_INVALID = 3;
-	const LRESULT_PROCESSED_SKIP = 4;
+	public const LRESULT_PROCESSED_OK = 2;
+	public const LRESULT_PROCESSED_INVALID = 3;
+	public const LRESULT_PROCESSED_SKIP = 4;
 
-	const LFILTER_LOGIN      = 2;
-	const LFILTER_USER_LIST  = 3;
-	const LFILTER_GROUP_LIST = 4;
+	public const LFILTER_LOGIN      = 2;
+	public const LFILTER_USER_LIST  = 3;
+	public const LFILTER_GROUP_LIST = 4;
 
-	const LFILTER_MODE_ASSISTED = 2;
-	const LFILTER_MODE_RAW = 1;
+	public const LFILTER_MODE_ASSISTED = 2;
+	public const LFILTER_MODE_RAW = 1;
 
-	const LDAP_NW_TIMEOUT = 4;
+	public const LDAP_NW_TIMEOUT = 4;
 
 	/**
 	 * Constructor
diff --git a/apps/workflowengine/lib/AppInfo/Application.php b/apps/workflowengine/lib/AppInfo/Application.php
index c9e982a311fcf3f39cc4153f99a9f8f54c0a8d45..70b5468c55325fc48ff129f6f47df5dc866461a9 100644
--- a/apps/workflowengine/lib/AppInfo/Application.php
+++ b/apps/workflowengine/lib/AppInfo/Application.php
@@ -35,7 +35,7 @@ use OCP\WorkflowEngine\IOperationCompat;
 use Symfony\Component\EventDispatcher\EventDispatcherInterface;
 
 class Application extends \OCP\AppFramework\App {
-	const APP_ID = 'workflowengine';
+	public const APP_ID = 'workflowengine';
 
 	/** @var EventDispatcherInterface */
 	protected $dispatcher;
diff --git a/apps/workflowengine/lib/Check/RequestTime.php b/apps/workflowengine/lib/Check/RequestTime.php
index 9729129104f3f669e872bd251c5a01d2322d8041..df210cdae58f9578dfde53b32bd8844c4655166d 100644
--- a/apps/workflowengine/lib/Check/RequestTime.php
+++ b/apps/workflowengine/lib/Check/RequestTime.php
@@ -26,8 +26,8 @@ use OCP\IL10N;
 use OCP\WorkflowEngine\ICheck;
 
 class RequestTime implements ICheck {
-	const REGEX_TIME = '([0-1][0-9]|2[0-3]):([0-5][0-9])';
-	const REGEX_TIMEZONE = '([a-zA-Z]+(?:\\/[a-zA-Z\-\_]+)+)';
+	public const REGEX_TIME = '([0-1][0-9]|2[0-3]):([0-5][0-9])';
+	public const REGEX_TIMEZONE = '([a-zA-Z]+(?:\\/[a-zA-Z\-\_]+)+)';
 
 	/** @var bool[] */
 	protected $cachedResults;
diff --git a/core/Command/Base.php b/core/Command/Base.php
index 9c20e049311fe7d6ef32ee186a87d89e553f469f..385642a7313ee05c09c3a08026312a5cc3b5a9ff 100644
--- a/core/Command/Base.php
+++ b/core/Command/Base.php
@@ -34,9 +34,9 @@ use Symfony\Component\Console\Input\InputOption;
 use Symfony\Component\Console\Output\OutputInterface;
 
 class Base extends Command implements CompletionAwareInterface {
-	const OUTPUT_FORMAT_PLAIN = 'plain';
-	const OUTPUT_FORMAT_JSON = 'json';
-	const OUTPUT_FORMAT_JSON_PRETTY = 'json_pretty';
+	public const OUTPUT_FORMAT_PLAIN = 'plain';
+	public const OUTPUT_FORMAT_JSON = 'json';
+	public const OUTPUT_FORMAT_JSON_PRETTY = 'json_pretty';
 
 	protected $defaultOutputFormat = self::OUTPUT_FORMAT_PLAIN;
 
diff --git a/core/Command/Log/Manage.php b/core/Command/Log/Manage.php
index 2d7eaf9e2e6eb4d40436477c79bcb26b7631354d..0318e1c8d2d03ef8dbaa66152e455d88f4360921 100644
--- a/core/Command/Log/Manage.php
+++ b/core/Command/Log/Manage.php
@@ -36,9 +36,9 @@ use Symfony\Component\Console\Input\InputOption;
 use Symfony\Component\Console\Output\OutputInterface;
 
 class Manage extends Command implements CompletionAwareInterface {
-	const DEFAULT_BACKEND = 'file';
-	const DEFAULT_LOG_LEVEL = 2;
-	const DEFAULT_TIMEZONE = 'UTC';
+	public const DEFAULT_BACKEND = 'file';
+	public const DEFAULT_LOG_LEVEL = 2;
+	public const DEFAULT_TIMEZONE = 'UTC';
 
 	/** @var IConfig */
 	protected $config;
diff --git a/core/Command/Maintenance/Mimetype/UpdateDB.php b/core/Command/Maintenance/Mimetype/UpdateDB.php
index 47b0b600777574188a464eff0e25c8b0d816b791..eb81ad4991a93b8c473cd21f5b95e19190113a99 100644
--- a/core/Command/Maintenance/Mimetype/UpdateDB.php
+++ b/core/Command/Maintenance/Mimetype/UpdateDB.php
@@ -32,7 +32,7 @@ use Symfony\Component\Console\Input\InputOption;
 use Symfony\Component\Console\Output\OutputInterface;
 
 class UpdateDB extends Command {
-	const DEFAULT_MIMETYPE = 'application/octet-stream';
+	public const DEFAULT_MIMETYPE = 'application/octet-stream';
 
 	/** @var IMimeTypeDetector */
 	protected $mimetypeDetector;
diff --git a/core/Command/Upgrade.php b/core/Command/Upgrade.php
index 461884fabe4cc6df4b6dd36a3a172b51e008b495..f00945a29d06772b0986d5c75627a072afcbbf5c 100644
--- a/core/Command/Upgrade.php
+++ b/core/Command/Upgrade.php
@@ -47,12 +47,12 @@ use Symfony\Component\Console\Output\OutputInterface;
 use Symfony\Component\EventDispatcher\GenericEvent;
 
 class Upgrade extends Command {
-	const ERROR_SUCCESS = 0;
-	const ERROR_NOT_INSTALLED = 1;
-	const ERROR_MAINTENANCE_MODE = 2;
-	const ERROR_UP_TO_DATE = 0;
-	const ERROR_INVALID_ARGUMENTS = 4;
-	const ERROR_FAILURE = 5;
+	public const ERROR_SUCCESS = 0;
+	public const ERROR_NOT_INSTALLED = 1;
+	public const ERROR_MAINTENANCE_MODE = 2;
+	public const ERROR_UP_TO_DATE = 0;
+	public const ERROR_INVALID_ARGUMENTS = 4;
+	public const ERROR_FAILURE = 5;
 
 	/** @var IConfig */
 	private $config;
diff --git a/core/Controller/ClientFlowLoginController.php b/core/Controller/ClientFlowLoginController.php
index dad43fc837ac2f0acef360835405252e520a6ee6..748a4cf50d20b21fe06822847b526c4fa8e324e2 100644
--- a/core/Controller/ClientFlowLoginController.php
+++ b/core/Controller/ClientFlowLoginController.php
@@ -77,7 +77,7 @@ class ClientFlowLoginController extends Controller {
 	/** @var EventDispatcherInterface */
 	private $eventDispatcher;
 
-	const stateName = 'client.flow.state.token';
+	public const stateName = 'client.flow.state.token';
 
 	/**
 	 * @param string $appName
diff --git a/core/Controller/LoginController.php b/core/Controller/LoginController.php
index 4813f15f1c55fb6d5469f57153c516014de0b5e3..0fcadd21c8ac79d6efc6e5211c7c08c2f4344a09 100644
--- a/core/Controller/LoginController.php
+++ b/core/Controller/LoginController.php
@@ -57,8 +57,8 @@ use OCP\IUserSession;
 use OCP\Util;
 
 class LoginController extends Controller {
-	const LOGIN_MSG_INVALIDPASSWORD = 'invalidpassword';
-	const LOGIN_MSG_USERDISABLED = 'userdisabled';
+	public const LOGIN_MSG_INVALIDPASSWORD = 'invalidpassword';
+	public const LOGIN_MSG_USERDISABLED = 'userdisabled';
 
 	/** @var IUserManager */
 	private $userManager;
diff --git a/core/Controller/SetupController.php b/core/Controller/SetupController.php
index b57b991884c44d58426c93130fa824aca74a8046..dd7e4eefc811eb2c599d659cc64c85810b36631e 100644
--- a/core/Controller/SetupController.php
+++ b/core/Controller/SetupController.php
@@ -44,7 +44,7 @@ class SetupController {
 	/**
 	 * @param Setup $setupHelper
 	 */
-	function __construct(Setup $setupHelper) {
+	public function __construct(Setup $setupHelper) {
 		$this->autoConfigFile = \OC::$configDir.'autoconfig.php';
 		$this->setupHelper = $setupHelper;
 	}
diff --git a/core/Controller/WalledGardenController.php b/core/Controller/WalledGardenController.php
index 5bd66225076a77bd5f66064b7fab3880affa8523..fd2b3cbf902321324de5687ef210666dffe834d0 100644
--- a/core/Controller/WalledGardenController.php
+++ b/core/Controller/WalledGardenController.php
@@ -35,7 +35,7 @@ class WalledGardenController extends Controller {
 	 *
 	 * @return Response
 	 */
-	function get() {
+	public function get() {
 		$resp = new Response();
 		$resp->setStatus(Http::STATUS_NO_CONTENT);
 		return $resp;
diff --git a/lib/private/App/AppStore/Fetcher/Fetcher.php b/lib/private/App/AppStore/Fetcher/Fetcher.php
index fd0600a3ce440a6b432b2bacd9a8b4101398e404..a54d149df62bb5e0f6f399efca45aa8ba70182d9 100644
--- a/lib/private/App/AppStore/Fetcher/Fetcher.php
+++ b/lib/private/App/AppStore/Fetcher/Fetcher.php
@@ -40,7 +40,7 @@ use OCP\IConfig;
 use OCP\ILogger;
 
 abstract class Fetcher {
-	const INVALIDATE_AFTER_SECONDS = 300;
+	public const INVALIDATE_AFTER_SECONDS = 300;
 
 	/** @var IAppData */
 	protected $appData;
diff --git a/lib/private/App/CodeChecker/CodeChecker.php b/lib/private/App/CodeChecker/CodeChecker.php
index aa8f43e6af21713a2cf6685ce100934d0324b68d..01969006af4d6dcd585f2d3d0835385e62f1f7da 100644
--- a/lib/private/App/CodeChecker/CodeChecker.php
+++ b/lib/private/App/CodeChecker/CodeChecker.php
@@ -37,14 +37,14 @@ use RegexIterator;
 use SplFileInfo;
 
 class CodeChecker extends BasicEmitter {
-	const CLASS_EXTENDS_NOT_ALLOWED = 1000;
-	const CLASS_IMPLEMENTS_NOT_ALLOWED = 1001;
-	const STATIC_CALL_NOT_ALLOWED = 1002;
-	const CLASS_CONST_FETCH_NOT_ALLOWED = 1003;
-	const CLASS_NEW_NOT_ALLOWED =  1004;
-	const OP_OPERATOR_USAGE_DISCOURAGED =  1005;
-	const CLASS_USE_NOT_ALLOWED =  1006;
-	const CLASS_METHOD_CALL_NOT_ALLOWED =  1007;
+	public const CLASS_EXTENDS_NOT_ALLOWED = 1000;
+	public const CLASS_IMPLEMENTS_NOT_ALLOWED = 1001;
+	public const STATIC_CALL_NOT_ALLOWED = 1002;
+	public const CLASS_CONST_FETCH_NOT_ALLOWED = 1003;
+	public const CLASS_NEW_NOT_ALLOWED =  1004;
+	public const OP_OPERATOR_USAGE_DISCOURAGED =  1005;
+	public const CLASS_USE_NOT_ALLOWED =  1006;
+	public const CLASS_METHOD_CALL_NOT_ALLOWED =  1007;
 
 	/** @var Parser */
 	private $parser;
diff --git a/lib/private/App/CompareVersion.php b/lib/private/App/CompareVersion.php
index 12cd761576936724739ba6d48af78c38a1bad348..5d38d4c358e395a75e8cd33e36b2fd2a3c3e029a 100644
--- a/lib/private/App/CompareVersion.php
+++ b/lib/private/App/CompareVersion.php
@@ -26,10 +26,10 @@ namespace OC\App;
 use InvalidArgumentException;
 
 class CompareVersion {
-	const REGEX_MAJOR = '/^\d+$/';
-	const REGEX_MAJOR_MINOR = '/^\d+.\d+$/';
-	const REGEX_MAJOR_MINOR_PATCH = '/^\d+.\d+.\d+$/';
-	const REGEX_SERVER = '/^\d+.\d+.\d+(.\d+)?$/';
+	public const REGEX_MAJOR = '/^\d+$/';
+	public const REGEX_MAJOR_MINOR = '/^\d+.\d+$/';
+	public const REGEX_MAJOR_MINOR_PATCH = '/^\d+.\d+.\d+$/';
+	public const REGEX_SERVER = '/^\d+.\d+.\d+(.\d+)?$/';
 
 	/**
 	 * Checks if the given server version fulfills the given (app) version requirements.
diff --git a/lib/private/AppFramework/Http/Request.php b/lib/private/AppFramework/Http/Request.php
index 1dcec3c3b98a0abac4baaa0345017ee4c3335563..c9b22dd7a1ee15fcca3e2dc23771b6abbdac47e1 100644
--- a/lib/private/AppFramework/Http/Request.php
+++ b/lib/private/AppFramework/Http/Request.php
@@ -64,32 +64,32 @@ use OCP\Security\ISecureRandom;
  * @property mixed[] server
  */
 class Request implements \ArrayAccess, \Countable, IRequest {
-	const USER_AGENT_IE = '/(MSIE)|(Trident)/';
+	public const USER_AGENT_IE = '/(MSIE)|(Trident)/';
 	// Microsoft Edge User Agent from https://msdn.microsoft.com/en-us/library/hh869301(v=vs.85).aspx
-	const USER_AGENT_MS_EDGE = '/^Mozilla\/5\.0 \([^)]+\) AppleWebKit\/[0-9.]+ \(KHTML, like Gecko\) Chrome\/[0-9.]+ (Mobile Safari|Safari)\/[0-9.]+ Edge\/[0-9.]+$/';
+	public const USER_AGENT_MS_EDGE = '/^Mozilla\/5\.0 \([^)]+\) AppleWebKit\/[0-9.]+ \(KHTML, like Gecko\) Chrome\/[0-9.]+ (Mobile Safari|Safari)\/[0-9.]+ Edge\/[0-9.]+$/';
 	// Firefox User Agent from https://developer.mozilla.org/en-US/docs/Web/HTTP/Gecko_user_agent_string_reference
-	const USER_AGENT_FIREFOX = '/^Mozilla\/5\.0 \([^)]+\) Gecko\/[0-9.]+ Firefox\/[0-9.]+$/';
+	public const USER_AGENT_FIREFOX = '/^Mozilla\/5\.0 \([^)]+\) Gecko\/[0-9.]+ Firefox\/[0-9.]+$/';
 	// Chrome User Agent from https://developer.chrome.com/multidevice/user-agent
-	const USER_AGENT_CHROME = '/^Mozilla\/5\.0 \([^)]+\) AppleWebKit\/[0-9.]+ \(KHTML, like Gecko\)( Ubuntu Chromium\/[0-9.]+|) Chrome\/[0-9.]+ (Mobile Safari|Safari)\/[0-9.]+( (Vivaldi|Brave|OPR)\/[0-9.]+|)$/';
+	public const USER_AGENT_CHROME = '/^Mozilla\/5\.0 \([^)]+\) AppleWebKit\/[0-9.]+ \(KHTML, like Gecko\)( Ubuntu Chromium\/[0-9.]+|) Chrome\/[0-9.]+ (Mobile Safari|Safari)\/[0-9.]+( (Vivaldi|Brave|OPR)\/[0-9.]+|)$/';
 	// Safari User Agent from http://www.useragentstring.com/pages/Safari/
-	const USER_AGENT_SAFARI = '/^Mozilla\/5\.0 \([^)]+\) AppleWebKit\/[0-9.]+ \(KHTML, like Gecko\) Version\/[0-9.]+ Safari\/[0-9.A-Z]+$/';
+	public const USER_AGENT_SAFARI = '/^Mozilla\/5\.0 \([^)]+\) AppleWebKit\/[0-9.]+ \(KHTML, like Gecko\) Version\/[0-9.]+ Safari\/[0-9.A-Z]+$/';
 	// Android Chrome user agent: https://developers.google.com/chrome/mobile/docs/user-agent
-	const USER_AGENT_ANDROID_MOBILE_CHROME = '#Android.*Chrome/[.0-9]*#';
-	const USER_AGENT_FREEBOX = '#^Mozilla/5\.0$#';
-	const REGEX_LOCALHOST = '/^(127\.0\.0\.1|localhost|::1)$/';
+	public const USER_AGENT_ANDROID_MOBILE_CHROME = '#Android.*Chrome/[.0-9]*#';
+	public const USER_AGENT_FREEBOX = '#^Mozilla/5\.0$#';
+	public const REGEX_LOCALHOST = '/^(127\.0\.0\.1|localhost|::1)$/';
 
 	/**
 	 * @deprecated use \OCP\IRequest::USER_AGENT_CLIENT_IOS instead
 	 */
-	const USER_AGENT_OWNCLOUD_IOS = '/^Mozilla\/5\.0 \(iOS\) (ownCloud|Nextcloud)\-iOS.*$/';
+	public const USER_AGENT_OWNCLOUD_IOS = '/^Mozilla\/5\.0 \(iOS\) (ownCloud|Nextcloud)\-iOS.*$/';
 	/**
 	 * @deprecated use \OCP\IRequest::USER_AGENT_CLIENT_ANDROID instead
 	 */
-	const USER_AGENT_OWNCLOUD_ANDROID = '/^Mozilla\/5\.0 \(Android\) ownCloud\-android.*$/';
+	public const USER_AGENT_OWNCLOUD_ANDROID = '/^Mozilla\/5\.0 \(Android\) ownCloud\-android.*$/';
 	/**
 	 * @deprecated use \OCP\IRequest::USER_AGENT_CLIENT_DESKTOP instead
 	 */
-	const USER_AGENT_OWNCLOUD_DESKTOP = '/^Mozilla\/5\.0 \([A-Za-z ]+\) (mirall|csyncoC)\/.*$/';
+	public const USER_AGENT_OWNCLOUD_DESKTOP = '/^Mozilla\/5\.0 \([A-Za-z ]+\) (mirall|csyncoC)\/.*$/';
 
 	protected $inputStream;
 	protected $content;
diff --git a/lib/private/Archive/TAR.php b/lib/private/Archive/TAR.php
index f6e7c12d02dfa64aeefed918c65d032e0bc2bf36..0d4103299ced7de4e8105699b38eb651a888df36 100644
--- a/lib/private/Archive/TAR.php
+++ b/lib/private/Archive/TAR.php
@@ -35,9 +35,9 @@ namespace OC\Archive;
 use Icewind\Streams\CallbackWrapper;
 
 class TAR extends Archive {
-	const PLAIN = 0;
-	const GZIP = 1;
-	const BZIP = 2;
+	public const PLAIN = 0;
+	public const GZIP = 1;
+	public const BZIP = 2;
 
 	private $fileList;
 	private $cachedHeaders;
diff --git a/lib/private/Authentication/Token/DefaultToken.php b/lib/private/Authentication/Token/DefaultToken.php
index 7ca05849635a6994d09592489b87dc757a91963b..9df907dfb4a5044508ac9fe0fd308a705cff8c98 100644
--- a/lib/private/Authentication/Token/DefaultToken.php
+++ b/lib/private/Authentication/Token/DefaultToken.php
@@ -43,7 +43,7 @@ use OCP\AppFramework\Db\Entity;
  * @method void setVersion(int $version)
  */
 class DefaultToken extends Entity implements INamedToken {
-	const VERSION = 1;
+	public const VERSION = 1;
 
 	/** @var string user UID */
 	protected $uid;
diff --git a/lib/private/Authentication/Token/IToken.php b/lib/private/Authentication/Token/IToken.php
index 1f7c736f86beb1d3049ebb452b5f07ea640ece57..326e9554b8e20dc55054d594224af7aaf709f28c 100644
--- a/lib/private/Authentication/Token/IToken.php
+++ b/lib/private/Authentication/Token/IToken.php
@@ -30,11 +30,11 @@ namespace OC\Authentication\Token;
 use JsonSerializable;
 
 interface IToken extends JsonSerializable {
-	const TEMPORARY_TOKEN = 0;
-	const PERMANENT_TOKEN = 1;
-	const WIPE_TOKEN = 2;
-	const DO_NOT_REMEMBER = 0;
-	const REMEMBER = 1;
+	public const TEMPORARY_TOKEN = 0;
+	public const PERMANENT_TOKEN = 1;
+	public const WIPE_TOKEN = 2;
+	public const DO_NOT_REMEMBER = 0;
+	public const REMEMBER = 1;
 
 	/**
 	 * Get the token ID
diff --git a/lib/private/Authentication/Token/PublicKeyToken.php b/lib/private/Authentication/Token/PublicKeyToken.php
index 27eda0b688937da20f65ae7f361d5f4e473f9cc4..0724eabc70ca8c20740784c77688947aa2b019b2 100644
--- a/lib/private/Authentication/Token/PublicKeyToken.php
+++ b/lib/private/Authentication/Token/PublicKeyToken.php
@@ -47,7 +47,7 @@ use OCP\AppFramework\Db\Entity;
  * @method bool getPasswordInvalid()
  */
 class PublicKeyToken extends Entity implements INamedToken, IWipeableToken {
-	const VERSION = 2;
+	public const VERSION = 2;
 
 	/** @var string user UID */
 	protected $uid;
diff --git a/lib/private/Authentication/TwoFactorAuth/Db/ProviderUserAssignmentDao.php b/lib/private/Authentication/TwoFactorAuth/Db/ProviderUserAssignmentDao.php
index a5ddad47e014b2406c8b1e1791eed4e9aee36e11..02e6863d1c41213026461693ff6c85abee50fa49 100644
--- a/lib/private/Authentication/TwoFactorAuth/Db/ProviderUserAssignmentDao.php
+++ b/lib/private/Authentication/TwoFactorAuth/Db/ProviderUserAssignmentDao.php
@@ -35,7 +35,7 @@ use OCP\IDBConnection;
  * 2FA providers
  */
 class ProviderUserAssignmentDao {
-	const TABLE_NAME = 'twofactor_providers';
+	public const TABLE_NAME = 'twofactor_providers';
 
 	/** @var IDBConnection */
 	private $conn;
diff --git a/lib/private/Authentication/TwoFactorAuth/Manager.php b/lib/private/Authentication/TwoFactorAuth/Manager.php
index ec414e67938c6285a92029bc9cf3a5ae31314e48..07e611753617929f278590c1f1942fcf80d55576 100644
--- a/lib/private/Authentication/TwoFactorAuth/Manager.php
+++ b/lib/private/Authentication/TwoFactorAuth/Manager.php
@@ -46,10 +46,10 @@ use Symfony\Component\EventDispatcher\EventDispatcherInterface;
 use Symfony\Component\EventDispatcher\GenericEvent;
 
 class Manager {
-	const SESSION_UID_KEY = 'two_factor_auth_uid';
-	const SESSION_UID_DONE = 'two_factor_auth_passed';
-	const REMEMBER_LOGIN = 'two_factor_remember_login';
-	const BACKUP_CODES_PROVIDER_ID = 'backup_codes';
+	public const SESSION_UID_KEY = 'two_factor_auth_uid';
+	public const SESSION_UID_DONE = 'two_factor_auth_passed';
+	public const REMEMBER_LOGIN = 'two_factor_remember_login';
+	public const BACKUP_CODES_PROVIDER_ID = 'backup_codes';
 
 	/** @var ProviderLoader */
 	private $providerLoader;
diff --git a/lib/private/Authentication/TwoFactorAuth/ProviderLoader.php b/lib/private/Authentication/TwoFactorAuth/ProviderLoader.php
index 0754679adf18da683e206486578dae782b624507..40385d737ae00daf7bc680075a984992f4d4de38 100644
--- a/lib/private/Authentication/TwoFactorAuth/ProviderLoader.php
+++ b/lib/private/Authentication/TwoFactorAuth/ProviderLoader.php
@@ -35,7 +35,7 @@ use OCP\Authentication\TwoFactorAuth\IProvider;
 use OCP\IUser;
 
 class ProviderLoader {
-	const BACKUP_CODES_APP_ID = 'twofactor_backupcodes';
+	public const BACKUP_CODES_APP_ID = 'twofactor_backupcodes';
 
 	/** @var IAppManager */
 	private $appManager;
diff --git a/lib/private/Config.php b/lib/private/Config.php
index 1724222f4bbfbab25035a4bedaddb04f949a1511..d44f713f361c23cd5b432a4b749d846ef72356f7 100644
--- a/lib/private/Config.php
+++ b/lib/private/Config.php
@@ -42,7 +42,7 @@ namespace OC;
  * configuration file of Nextcloud.
  */
 class Config {
-	const ENV_PREFIX = 'NC_';
+	public const ENV_PREFIX = 'NC_';
 
 	/** @var array Associative array ($key => $value) */
 	protected $cache = [];
diff --git a/lib/private/DB/AdapterOCI8.php b/lib/private/DB/AdapterOCI8.php
index 3eb50916aab34954ecedbfa94af27c793890b566..33a30b8348dac9dc652bb558e3aa2bafc5179693 100644
--- a/lib/private/DB/AdapterOCI8.php
+++ b/lib/private/DB/AdapterOCI8.php
@@ -37,7 +37,7 @@ class AdapterOCI8 extends Adapter {
 		return $this->conn->realLastInsertId($table);
 	}
 
-	const UNIX_TIMESTAMP_REPLACEMENT = "(cast(sys_extract_utc(systimestamp) as date) - date'1970-01-01') * 86400";
+	public const UNIX_TIMESTAMP_REPLACEMENT = "(cast(sys_extract_utc(systimestamp) as date) - date'1970-01-01') * 86400";
 
 	public function fixupStatement($statement) {
 		$statement = preg_replace('/`(\w+)` ILIKE \?/', 'REGEXP_LIKE(`$1`, \'^\' || REPLACE(?, \'%\', \'.*\') || \'$\', \'i\')', $statement);
diff --git a/lib/private/DB/AdapterPgSql.php b/lib/private/DB/AdapterPgSql.php
index 7457ab9a77d6d56b70df8b8c687a4a8cab794982..bc7fa7698ee85d72c4e0a0d06c8388ae533db684 100644
--- a/lib/private/DB/AdapterPgSql.php
+++ b/lib/private/DB/AdapterPgSql.php
@@ -33,7 +33,7 @@ class AdapterPgSql extends Adapter {
 		return $this->conn->fetchColumn('SELECT lastval()');
 	}
 
-	const UNIX_TIMESTAMP_REPLACEMENT = 'cast(extract(epoch from current_timestamp) as integer)';
+	public const UNIX_TIMESTAMP_REPLACEMENT = 'cast(extract(epoch from current_timestamp) as integer)';
 	public function fixupStatement($statement) {
 		$statement = str_replace('`', '"', $statement);
 		$statement = str_ireplace('UNIX_TIMESTAMP()', self::UNIX_TIMESTAMP_REPLACEMENT, $statement);
diff --git a/lib/private/DB/ConnectionFactory.php b/lib/private/DB/ConnectionFactory.php
index fe97048aaac1894401373b7aff6d74d64132cec0..441e4567dbd43fdc08b20a7bf1ebc6e54d0f6c0e 100644
--- a/lib/private/DB/ConnectionFactory.php
+++ b/lib/private/DB/ConnectionFactory.php
@@ -41,10 +41,10 @@ use OC\SystemConfig;
  */
 class ConnectionFactory {
 	/** @var string default database name */
-	const DEFAULT_DBNAME = 'owncloud';
+	public const DEFAULT_DBNAME = 'owncloud';
 
 	/** @var string default database table prefix */
-	const DEFAULT_DBTABLEPREFIX = 'oc_';
+	public const DEFAULT_DBTABLEPREFIX = 'oc_';
 
 	/**
 	 * @var array
diff --git a/lib/private/DB/ReconnectWrapper.php b/lib/private/DB/ReconnectWrapper.php
index ebb4c56fc6a8c00e3d746ec57b6ff00c4c63b761..df3a0518e35024d925ac9ce9018d5b5d66ddfe97 100644
--- a/lib/private/DB/ReconnectWrapper.php
+++ b/lib/private/DB/ReconnectWrapper.php
@@ -28,7 +28,7 @@ use Doctrine\DBAL\Configuration;
 use Doctrine\DBAL\Driver;
 
 class ReconnectWrapper extends \Doctrine\DBAL\Connection {
-	const CHECK_CONNECTION_INTERVAL = 60;
+	public const CHECK_CONNECTION_INTERVAL = 60;
 
 	private $lastConnectionCheck = null;
 
diff --git a/lib/private/Encryption/Keys/Storage.php b/lib/private/Encryption/Keys/Storage.php
index 2030f26f8f5db6f6e42e9498e634307a70c00c81..38cbfbfdd9f420a8b0016b99fc4504ad28a10ab2 100644
--- a/lib/private/Encryption/Keys/Storage.php
+++ b/lib/private/Encryption/Keys/Storage.php
@@ -36,7 +36,7 @@ use OCP\Encryption\Keys\IStorage;
 class Storage implements IStorage {
 
 	// hidden file which indicate that the folder is a valid key storage
-	const KEY_STORAGE_MARKER = '.oc_key_storage';
+	public const KEY_STORAGE_MARKER = '.oc_key_storage';
 
 	/** @var View */
 	private $view;
diff --git a/lib/private/Encryption/Util.php b/lib/private/Encryption/Util.php
index a5414a6679640cc7442d3a21b3f4a1ec0f536b25..8b3360c30e0e665415e5f673de8735591f04bca9 100644
--- a/lib/private/Encryption/Util.php
+++ b/lib/private/Encryption/Util.php
@@ -38,11 +38,11 @@ use OCP\IConfig;
 use OCP\IUser;
 
 class Util {
-	const HEADER_START = 'HBEGIN';
-	const HEADER_END = 'HEND';
-	const HEADER_PADDING_CHAR = '-';
+	public const HEADER_START = 'HBEGIN';
+	public const HEADER_END = 'HEND';
+	public const HEADER_PADDING_CHAR = '-';
 
-	const HEADER_ENCRYPTION_MODULE_KEY = 'oc_encryption_module';
+	public const HEADER_ENCRYPTION_MODULE_KEY = 'oc_encryption_module';
 
 	/**
 	 * block size will always be 8192 for a PHP stream
diff --git a/lib/private/Files/Cache/QuerySearchHelper.php b/lib/private/Files/Cache/QuerySearchHelper.php
index f1e8aa978f48b81624e349a924a84efd6fff7d95..eba4178d9bdc0bf7afcad9c80e3454d091ca434a 100644
--- a/lib/private/Files/Cache/QuerySearchHelper.php
+++ b/lib/private/Files/Cache/QuerySearchHelper.php
@@ -54,7 +54,7 @@ class QuerySearchHelper {
 		ISearchComparison::COMPARE_LESS_THAN_EQUAL => 'lt'
 	];
 
-	const TAG_FAVORITE = '_$!<Favorite>!$_';
+	public const TAG_FAVORITE = '_$!<Favorite>!$_';
 
 	/** @var IMimeTypeLoader */
 	private $mimetypeLoader;
diff --git a/lib/private/Files/Filesystem.php b/lib/private/Files/Filesystem.php
index 1e9902f887139ce192aa81bbfd98759e0de71a8f..d3c4e1afc62a2fd3582214ed3fbc37b9792a36a7 100644
--- a/lib/private/Files/Filesystem.php
+++ b/lib/private/Files/Filesystem.php
@@ -92,7 +92,7 @@ class Filesystem {
 	 * classname which used for hooks handling
 	 * used as signalclass in OC_Hooks::emit()
 	 */
-	const CLASSNAME = 'OC_Filesystem';
+	public const CLASSNAME = 'OC_Filesystem';
 
 	/**
 	 * signalname emitted before file renaming
@@ -100,7 +100,7 @@ class Filesystem {
 	 * @param string $oldpath
 	 * @param string $newpath
 	 */
-	const signal_rename = 'rename';
+	public const signal_rename = 'rename';
 
 	/**
 	 * signal emitted after file renaming
@@ -108,7 +108,7 @@ class Filesystem {
 	 * @param string $oldpath
 	 * @param string $newpath
 	 */
-	const signal_post_rename = 'post_rename';
+	public const signal_post_rename = 'post_rename';
 
 	/**
 	 * signal emitted before file/dir creation
@@ -116,7 +116,7 @@ class Filesystem {
 	 * @param string $path
 	 * @param bool $run changing this flag to false in hook handler will cancel event
 	 */
-	const signal_create = 'create';
+	public const signal_create = 'create';
 
 	/**
 	 * signal emitted after file/dir creation
@@ -124,7 +124,7 @@ class Filesystem {
 	 * @param string $path
 	 * @param bool $run changing this flag to false in hook handler will cancel event
 	 */
-	const signal_post_create = 'post_create';
+	public const signal_post_create = 'post_create';
 
 	/**
 	 * signal emits before file/dir copy
@@ -133,7 +133,7 @@ class Filesystem {
 	 * @param string $newpath
 	 * @param bool $run changing this flag to false in hook handler will cancel event
 	 */
-	const signal_copy = 'copy';
+	public const signal_copy = 'copy';
 
 	/**
 	 * signal emits after file/dir copy
@@ -141,7 +141,7 @@ class Filesystem {
 	 * @param string $oldpath
 	 * @param string $newpath
 	 */
-	const signal_post_copy = 'post_copy';
+	public const signal_post_copy = 'post_copy';
 
 	/**
 	 * signal emits before file/dir save
@@ -149,14 +149,14 @@ class Filesystem {
 	 * @param string $path
 	 * @param bool $run changing this flag to false in hook handler will cancel event
 	 */
-	const signal_write = 'write';
+	public const signal_write = 'write';
 
 	/**
 	 * signal emits after file/dir save
 	 *
 	 * @param string $path
 	 */
-	const signal_post_write = 'post_write';
+	public const signal_post_write = 'post_write';
 
 	/**
 	 * signal emitted before file/dir update
@@ -164,7 +164,7 @@ class Filesystem {
 	 * @param string $path
 	 * @param bool $run changing this flag to false in hook handler will cancel event
 	 */
-	const signal_update = 'update';
+	public const signal_update = 'update';
 
 	/**
 	 * signal emitted after file/dir update
@@ -172,38 +172,38 @@ class Filesystem {
 	 * @param string $path
 	 * @param bool $run changing this flag to false in hook handler will cancel event
 	 */
-	const signal_post_update = 'post_update';
+	public const signal_post_update = 'post_update';
 
 	/**
 	 * signal emits when reading file/dir
 	 *
 	 * @param string $path
 	 */
-	const signal_read = 'read';
+	public const signal_read = 'read';
 
 	/**
 	 * signal emits when removing file/dir
 	 *
 	 * @param string $path
 	 */
-	const signal_delete = 'delete';
+	public const signal_delete = 'delete';
 
 	/**
 	 * parameters definitions for signals
 	 */
-	const signal_param_path = 'path';
-	const signal_param_oldpath = 'oldpath';
-	const signal_param_newpath = 'newpath';
+	public const signal_param_path = 'path';
+	public const signal_param_oldpath = 'oldpath';
+	public const signal_param_newpath = 'newpath';
 
 	/**
 	 * run - changing this flag to false in hook handler will cancel event
 	 */
-	const signal_param_run = 'run';
+	public const signal_param_run = 'run';
 
-	const signal_create_mount = 'create_mount';
-	const signal_delete_mount = 'delete_mount';
-	const signal_param_mount_type = 'mounttype';
-	const signal_param_users = 'users';
+	public const signal_create_mount = 'create_mount';
+	public const signal_delete_mount = 'delete_mount';
+	public const signal_param_mount_type = 'mounttype';
+	public const signal_param_users = 'users';
 
 	/**
 	 * @var \OC\Files\Storage\StorageFactory $loader
diff --git a/lib/private/Files/ObjectStore/SwiftFactory.php b/lib/private/Files/ObjectStore/SwiftFactory.php
index c7d2e691bbd4f1e83da0b5845dda028088b284ba..59446576400032c6af519458a5b799ffbdb001c2 100644
--- a/lib/private/Files/ObjectStore/SwiftFactory.php
+++ b/lib/private/Files/ObjectStore/SwiftFactory.php
@@ -56,7 +56,7 @@ class SwiftFactory {
 	private $container = null;
 	private $logger;
 
-	const DEFAULT_OPTIONS = [
+	public const DEFAULT_OPTIONS = [
 		'autocreate' => false,
 		'urlType' => 'publicURL',
 		'catalogName' => 'swift',
diff --git a/lib/private/Files/Storage/Wrapper/Availability.php b/lib/private/Files/Storage/Wrapper/Availability.php
index b949c9103a77c4ccf0e6c42b2ff87d00ba74520d..300ba7e7f7c726e3f5384047cf27128f9d463edc 100644
--- a/lib/private/Files/Storage/Wrapper/Availability.php
+++ b/lib/private/Files/Storage/Wrapper/Availability.php
@@ -37,7 +37,7 @@ use OCP\IConfig;
  * Throws a StorageNotAvailableException for storages with known failures
  */
 class Availability extends Wrapper {
-	const RECHECK_TTL_SEC = 600; // 10 minutes
+	public const RECHECK_TTL_SEC = 600; // 10 minutes
 
 	/** @var IConfig */
 	protected $config;
diff --git a/lib/private/Files/Utils/Scanner.php b/lib/private/Files/Utils/Scanner.php
index a729da89fb0605e671e8677f7a2c25ad7c3ec48b..996380037b72bba686cd06a21c9bb7030bf93ca8 100644
--- a/lib/private/Files/Utils/Scanner.php
+++ b/lib/private/Files/Utils/Scanner.php
@@ -61,7 +61,7 @@ use OCP\ILogger;
  * @package OC\Files\Utils
  */
 class Scanner extends PublicEmitter {
-	const MAX_ENTRIES_TO_COMMIT = 10000;
+	public const MAX_ENTRIES_TO_COMMIT = 10000;
 
 	/** @var string $user */
 	private $user;
diff --git a/lib/private/Group/Backend.php b/lib/private/Group/Backend.php
index 0f0e2c743e85d64242569062ebd98ae1642c01c5..ebd8d3620d433715d7e4e49f165606656dc4c662 100644
--- a/lib/private/Group/Backend.php
+++ b/lib/private/Group/Backend.php
@@ -32,7 +32,7 @@ abstract class Backend implements \OCP\GroupInterface {
 	/**
 	 * error code for functions not provided by the group backend
 	 */
-	const NOT_IMPLEMENTED = -501;
+	public const NOT_IMPLEMENTED = -501;
 
 	protected $possibleActions = [
 		self::CREATE_GROUP => 'createGroup',
diff --git a/lib/private/Group/MetaData.php b/lib/private/Group/MetaData.php
index 880dbf6437c92413db568230dfe30d7925e520f1..6950a2396785e645aba63f8658c86a2be3ac5885 100644
--- a/lib/private/Group/MetaData.php
+++ b/lib/private/Group/MetaData.php
@@ -35,9 +35,9 @@ use OCP\IGroupManager;
 use OCP\IUserSession;
 
 class MetaData {
-	const SORT_NONE = 0;
-	const SORT_USERCOUNT = 1; // May have performance issues on LDAP backends
-	const SORT_GROUPNAME = 2;
+	public const SORT_NONE = 0;
+	public const SORT_USERCOUNT = 1; // May have performance issues on LDAP backends
+	public const SORT_GROUPNAME = 2;
 
 	/** @var string */
 	protected $user;
diff --git a/lib/private/Http/CookieHelper.php b/lib/private/Http/CookieHelper.php
index 7083584bffafdcf6dac1fefe1d01cd7bb4fa2416..8c20ddb9f657f8dcb1e1a36985db0a00fa2a5704 100644
--- a/lib/private/Http/CookieHelper.php
+++ b/lib/private/Http/CookieHelper.php
@@ -27,9 +27,9 @@ declare(strict_types=1);
 namespace OC\Http;
 
 class CookieHelper {
-	const SAMESITE_NONE = 0;
-	const SAMESITE_LAX = 1;
-	const SAMESITE_STRICT = 2;
+	public const SAMESITE_NONE = 0;
+	public const SAMESITE_LAX = 1;
+	public const SAMESITE_STRICT = 2;
 
 	public static function setCookie(string $name,
 									 string $value = '',
diff --git a/lib/private/IntegrityCheck/Checker.php b/lib/private/IntegrityCheck/Checker.php
index 1084a9e1dd59c0ad197ec0c75e0a4b157cd94f36..af1e3555c32a225ea3eb00bf9888ae56144d0d58 100644
--- a/lib/private/IntegrityCheck/Checker.php
+++ b/lib/private/IntegrityCheck/Checker.php
@@ -58,7 +58,7 @@ use phpseclib\File\X509;
  * @package OC\IntegrityCheck
  */
 class Checker {
-	const CACHE_KEY = 'oc.integritycheck.checker';
+	public const CACHE_KEY = 'oc.integritycheck.checker';
 	/** @var EnvironmentHelper */
 	private $environmentHelper;
 	/** @var AppLocator */
diff --git a/lib/private/L10N/Factory.php b/lib/private/L10N/Factory.php
index a1afb1f4f0af1b4afd59b2c325d04e34f9850e3b..03240f484104535fbb9b91beb9d6909d8a9b5b4f 100644
--- a/lib/private/L10N/Factory.php
+++ b/lib/private/L10N/Factory.php
@@ -72,7 +72,7 @@ class Factory implements IFactory {
 	 */
 	protected $pluralFunctions = [];
 
-	const COMMON_LANGUAGE_CODES = [
+	public const COMMON_LANGUAGE_CODES = [
 		'en', 'es', 'fr', 'de', 'de_DE', 'ja', 'ar', 'ru', 'nl', 'it',
 		'pt_BR', 'pt_PT', 'da', 'fi_FI', 'nb_NO', 'sv', 'tr', 'zh_CN', 'ko'
 	];
diff --git a/lib/private/LargeFileHelper.php b/lib/private/LargeFileHelper.php
index c24657a5c9c2a3857b7c9986b4f046d027e8aaeb..2a6a6714eb35631cd8f068e9270de98cfa46657e 100755
--- a/lib/private/LargeFileHelper.php
+++ b/lib/private/LargeFileHelper.php
@@ -37,13 +37,13 @@ class LargeFileHelper {
 	 * pow(2, 53) as a base-10 string.
 	 * @var string
 	 */
-	const POW_2_53 = '9007199254740992';
+	public const POW_2_53 = '9007199254740992';
 
 	/**
 	 * pow(2, 53) - 1 as a base-10 string.
 	 * @var string
 	 */
-	const POW_2_53_MINUS_1 = '9007199254740991';
+	public const POW_2_53_MINUS_1 = '9007199254740991';
 
 	/**
 	 * @brief Checks whether our assumptions hold on the PHP platform we are on.
diff --git a/lib/private/Log/ExceptionSerializer.php b/lib/private/Log/ExceptionSerializer.php
index 50544d7149c584f4b25f7cb188831c1d6c594536..237d33cfefa33cd3385170f995cbe3db84ceb848 100644
--- a/lib/private/Log/ExceptionSerializer.php
+++ b/lib/private/Log/ExceptionSerializer.php
@@ -32,7 +32,7 @@ use OC\HintException;
 use OC\Setup;
 
 class ExceptionSerializer {
-	const methodsWithSensitiveParameters = [
+	public const methodsWithSensitiveParameters = [
 		// Session/User
 		'completeLogin',
 		'login',
@@ -86,7 +86,7 @@ class ExceptionSerializer {
 		'update',
 	];
 
-	const methodsWithSensitiveParametersByClass = [
+	public const methodsWithSensitiveParametersByClass = [
 		SetupController::class => [
 			'run',
 			'display',
diff --git a/lib/private/Memcache/Factory.php b/lib/private/Memcache/Factory.php
index 0e6552ba4368442eb7e6167b938f261bec983902..52c5af4ef988f23fb48678aa92bcf7c43c6526ba 100644
--- a/lib/private/Memcache/Factory.php
+++ b/lib/private/Memcache/Factory.php
@@ -36,7 +36,7 @@ use OCP\ILogger;
 use OCP\IMemcache;
 
 class Factory implements ICacheFactory {
-	const NULL_CACHE = NullCache::class;
+	public const NULL_CACHE = NullCache::class;
 
 	/**
 	 * @var string $globalPrefix
diff --git a/lib/private/MemoryInfo.php b/lib/private/MemoryInfo.php
index 520225fc6d11c3a47ea812b644d354a5cd8e75b0..0e70b50053293c70f0acbf77974e6ab3c9233d25 100644
--- a/lib/private/MemoryInfo.php
+++ b/lib/private/MemoryInfo.php
@@ -30,7 +30,7 @@ namespace OC;
  * Helper class that covers memory info.
  */
 class MemoryInfo {
-	const RECOMMENDED_MEMORY_LIMIT = 512 * 1024 * 1024;
+	public const RECOMMENDED_MEMORY_LIMIT = 512 * 1024 * 1024;
 
 	/**
 	 * Tests if the memory limit is greater or equal the recommended value.
diff --git a/lib/private/Remote/User.php b/lib/private/Remote/User.php
index 5519d7dc22fbd537111d078e5008b2c7c2def7ac..31ded598b7c5fc1cf48d0438995aa3ec66a050e5 100644
--- a/lib/private/Remote/User.php
+++ b/lib/private/Remote/User.php
@@ -26,7 +26,7 @@ namespace OC\Remote;
 use OCP\Remote\IUser;
 
 class User implements IUser {
-	const EXPECTED_KEYS = [
+	public const EXPECTED_KEYS = [
 		'id',
 		'email',
 		'displayname',
diff --git a/lib/private/Repair/Owncloud/SaveAccountsTableData.php b/lib/private/Repair/Owncloud/SaveAccountsTableData.php
index 6dd49e6c9fd9f0fa6be173af5520cc2e60e689b8..6eccf53c5a86b194b53c35bd78120f9800dd4263 100644
--- a/lib/private/Repair/Owncloud/SaveAccountsTableData.php
+++ b/lib/private/Repair/Owncloud/SaveAccountsTableData.php
@@ -35,7 +35,7 @@ use OCP\PreConditionNotMetException;
  * before the data structure is changed and the information is gone
  */
 class SaveAccountsTableData implements IRepairStep {
-	const BATCH_SIZE = 75;
+	public const BATCH_SIZE = 75;
 
 	/** @var IDBConnection */
 	protected $db;
diff --git a/lib/private/Repair/RepairInvalidShares.php b/lib/private/Repair/RepairInvalidShares.php
index becf8ba7594023a752ba9dddca77732c696a1a2c..a0fe246571a0d40f3e2a8c841d48128fb6694811 100644
--- a/lib/private/Repair/RepairInvalidShares.php
+++ b/lib/private/Repair/RepairInvalidShares.php
@@ -32,7 +32,7 @@ use OCP\Migration\IRepairStep;
  * Repairs shares with invalid data
  */
 class RepairInvalidShares implements IRepairStep {
-	const CHUNK_SIZE = 200;
+	public const CHUNK_SIZE = 200;
 
 	/** @var \OCP\IConfig */
 	protected $config;
diff --git a/lib/private/Security/Bruteforce/Throttler.php b/lib/private/Security/Bruteforce/Throttler.php
index c04e0e1b38311a15ea3abf1aa2f7942d5676e404..d1fead6759f846303188acb8130b63ca1479ad30 100644
--- a/lib/private/Security/Bruteforce/Throttler.php
+++ b/lib/private/Security/Bruteforce/Throttler.php
@@ -48,7 +48,7 @@ use OCP\ILogger;
  * @package OC\Security\Bruteforce
  */
 class Throttler {
-	const LOGIN_ACTION = 'login';
+	public const LOGIN_ACTION = 'login';
 
 	/** @var IDBConnection */
 	private $db;
diff --git a/lib/private/Security/CredentialsManager.php b/lib/private/Security/CredentialsManager.php
index ab06a8076136c33c6ce6e668763f3669be8b6cbe..770919dacd779ae8db4a2ccbf6ccc0a2d9dc6c2a 100644
--- a/lib/private/Security/CredentialsManager.php
+++ b/lib/private/Security/CredentialsManager.php
@@ -33,7 +33,7 @@ use OCP\Security\ICrypto;
  * @package OC\Security
  */
 class CredentialsManager implements ICredentialsManager {
-	const DB_TABLE = 'credentials';
+	public const DB_TABLE = 'credentials';
 
 	/** @var ICrypto */
 	protected $crypto;
diff --git a/lib/private/Session/CryptoSessionData.php b/lib/private/Session/CryptoSessionData.php
index 892c243604064c36cda35d9d5f7403e3559f056e..fc7693b71b2b307a0a1db77d05c4773f858d7a11 100644
--- a/lib/private/Session/CryptoSessionData.php
+++ b/lib/private/Session/CryptoSessionData.php
@@ -50,7 +50,7 @@ class CryptoSessionData implements \ArrayAccess, ISession {
 	protected $sessionValues;
 	/** @var bool */
 	protected $isModified = false;
-	const encryptedSessionName = 'encrypted_session_data';
+	public const encryptedSessionName = 'encrypted_session_data';
 
 	/**
 	 * @param ISession $session
diff --git a/lib/private/Session/CryptoWrapper.php b/lib/private/Session/CryptoWrapper.php
index bb82652a01d51972efaa25fc4912dcc039f2d273..f4d30bee145e5ea32661c6c8692be38be08bc90a 100644
--- a/lib/private/Session/CryptoWrapper.php
+++ b/lib/private/Session/CryptoWrapper.php
@@ -48,7 +48,7 @@ use OCP\Security\ISecureRandom;
  * @package OC\Session
  */
 class CryptoWrapper {
-	const COOKIE_NAME = 'oc_sessionPassphrase';
+	public const COOKIE_NAME = 'oc_sessionPassphrase';
 
 	/** @var IConfig */
 	protected $config;
diff --git a/lib/private/Share/Constants.php b/lib/private/Share/Constants.php
index d1b47f1dd4755da0bcb58f79b06791d574f4cc25..18f6864b6c911bce6a90821e77fb496bd35bb93c 100644
--- a/lib/private/Share/Constants.php
+++ b/lib/private/Share/Constants.php
@@ -37,50 +37,50 @@ class Constants {
 	/**
 	 * @deprecated 17.0.0 - use IShare::TYPE_USER instead
 	 */
-	const SHARE_TYPE_USER = 0;
+	public const SHARE_TYPE_USER = 0;
 	/**
 	 * @deprecated 17.0.0 - use IShare::TYPE_GROUP instead
 	 */
-	const SHARE_TYPE_GROUP = 1;
+	public const SHARE_TYPE_GROUP = 1;
 	// const SHARE_TYPE_USERGROUP = 2; // Internal type used by DefaultShareProvider
 	/**
 	 * @deprecated 17.0.0 - use IShare::TYPE_LINK instead
 	 */
-	const SHARE_TYPE_LINK = 3;
+	public const SHARE_TYPE_LINK = 3;
 	/**
 	 * @deprecated 17.0.0 - use IShare::TYPE_EMAIL instead
 	 */
-	const SHARE_TYPE_EMAIL = 4;
-	const SHARE_TYPE_CONTACT = 5; // ToDo Check if it is still in use otherwise remove it
+	public const SHARE_TYPE_EMAIL = 4;
+	public const SHARE_TYPE_CONTACT = 5; // ToDo Check if it is still in use otherwise remove it
 	/**
 	 * @deprecated 17.0.0 - use IShare::TYPE_REMOTE instead
 	 */
-	const SHARE_TYPE_REMOTE = 6;
+	public const SHARE_TYPE_REMOTE = 6;
 	/**
 	 * @deprecated 17.0.0 - use IShare::TYPE_CIRCLE instead
 	 */
-	const SHARE_TYPE_CIRCLE = 7;
+	public const SHARE_TYPE_CIRCLE = 7;
 	/**
 	 * @deprecated 17.0.0 - use IShare::TYPE_GUEST instead
 	 */
-	const SHARE_TYPE_GUEST = 8;
+	public const SHARE_TYPE_GUEST = 8;
 	/**
 	 * @deprecated 17.0.0 - use IShare::REMOTE_GROUP instead
 	 */
-	const SHARE_TYPE_REMOTE_GROUP = 9;
+	public const SHARE_TYPE_REMOTE_GROUP = 9;
 	/**
 	 * @deprecated 17.0.0 - use IShare::TYPE_ROOM instead
 	 */
-	const SHARE_TYPE_ROOM = 10;
+	public const SHARE_TYPE_ROOM = 10;
 	// const SHARE_TYPE_USERROOM = 11; // Internal type used by RoomShareProvider
 
-	const FORMAT_NONE = -1;
-	const FORMAT_STATUSES = -2;
-	const FORMAT_SOURCES = -3;  // ToDo Check if it is still in use otherwise remove it
+	public const FORMAT_NONE = -1;
+	public const FORMAT_STATUSES = -2;
+	public const FORMAT_SOURCES = -3;  // ToDo Check if it is still in use otherwise remove it
 
-	const RESPONSE_FORMAT = 'json'; // default resonse format for ocs calls
+	public const RESPONSE_FORMAT = 'json'; // default resonse format for ocs calls
 
-	const TOKEN_LENGTH = 15; // old (oc7) length is 32, keep token length in db at least that for compatibility
+	public const TOKEN_LENGTH = 15; // old (oc7) length is 32, keep token length in db at least that for compatibility
 
 	protected static $shareTypeUserAndGroups = -1;
 	protected static $shareTypeGroupUserUnique = 2;
diff --git a/lib/private/Share20/DefaultShareProvider.php b/lib/private/Share20/DefaultShareProvider.php
index 41a727593b3b502563a0cbaecf5a881ad38b767c..75745a7fe971a1f361cd85151b0141f509629114 100644
--- a/lib/private/Share20/DefaultShareProvider.php
+++ b/lib/private/Share20/DefaultShareProvider.php
@@ -63,7 +63,7 @@ use OCP\Share\IShareProvider;
 class DefaultShareProvider implements IShareProvider {
 
 	// Special share type for user modified group shares
-	const SHARE_TYPE_USERGROUP = 2;
+	public const SHARE_TYPE_USERGROUP = 2;
 
 	/** @var IDBConnection */
 	private $dbConn;
diff --git a/lib/private/SystemTag/SystemTagManager.php b/lib/private/SystemTag/SystemTagManager.php
index 2d7b1bc3ae4af00b8e248c891f22077e0e0ab142..a718a007e345f742c69e72ab2652ad6921013847 100644
--- a/lib/private/SystemTag/SystemTagManager.php
+++ b/lib/private/SystemTag/SystemTagManager.php
@@ -44,8 +44,8 @@ use Symfony\Component\EventDispatcher\EventDispatcherInterface;
  * Manager class for system tags
  */
 class SystemTagManager implements ISystemTagManager {
-	const TAG_TABLE = 'systemtag';
-	const TAG_GROUP_TABLE = 'systemtag_group';
+	public const TAG_TABLE = 'systemtag';
+	public const TAG_GROUP_TABLE = 'systemtag_group';
 
 	/** @var IDBConnection */
 	protected $connection;
diff --git a/lib/private/SystemTag/SystemTagObjectMapper.php b/lib/private/SystemTag/SystemTagObjectMapper.php
index eb33d2d30bbab1510a7d7c83aabce865e085df1a..c6d6d09b95a487e270d996567fd27894e611645e 100644
--- a/lib/private/SystemTag/SystemTagObjectMapper.php
+++ b/lib/private/SystemTag/SystemTagObjectMapper.php
@@ -38,7 +38,7 @@ use OCP\SystemTag\TagNotFoundException;
 use Symfony\Component\EventDispatcher\EventDispatcherInterface;
 
 class SystemTagObjectMapper implements ISystemTagObjectMapper {
-	const RELATION_TABLE = 'systemtag_object_mapping';
+	public const RELATION_TABLE = 'systemtag_object_mapping';
 
 	/** @var ISystemTagManager */
 	protected $tagManager;
diff --git a/lib/private/Tags.php b/lib/private/Tags.php
index a176967bd2b0156eca21f84c2c57050284734fb6..6d06b3a48296b30d831a07737c85ca364e43c2ec 100644
--- a/lib/private/Tags.php
+++ b/lib/private/Tags.php
@@ -112,8 +112,8 @@ class Tags implements ITags {
 	 */
 	private $backend;
 
-	const TAG_TABLE = '*PREFIX*vcategory';
-	const RELATION_TABLE = '*PREFIX*vcategory_to_object';
+	public const TAG_TABLE = '*PREFIX*vcategory';
+	public const RELATION_TABLE = '*PREFIX*vcategory_to_object';
 
 	/**
 	 * Constructor.
diff --git a/lib/private/TempManager.php b/lib/private/TempManager.php
index 13735d69d47b9494ff4939a4c3ca473cff1a0e1f..8b47193feaa8ee1eeba055b565723bdd92cdcd33 100644
--- a/lib/private/TempManager.php
+++ b/lib/private/TempManager.php
@@ -45,7 +45,7 @@ class TempManager implements ITempManager {
 	protected $config;
 
 	/** Prefix */
-	const TMP_PREFIX = 'oc_tmp_';
+	public const TMP_PREFIX = 'oc_tmp_';
 
 	/**
 	 * @param \OCP\ILogger $logger
diff --git a/lib/private/Updater/ChangesCheck.php b/lib/private/Updater/ChangesCheck.php
index 8700b9609d2727510e8ffd3c88073d6d480057bc..cde7517d3c564b4d79228e1f04b92330a19de052 100644
--- a/lib/private/Updater/ChangesCheck.php
+++ b/lib/private/Updater/ChangesCheck.php
@@ -40,9 +40,9 @@ class ChangesCheck {
 	/** @var ILogger */
 	private $logger;
 
-	const RESPONSE_NO_CONTENT = 0;
-	const RESPONSE_USE_CACHE = 1;
-	const RESPONSE_HAS_CONTENT = 2;
+	public const RESPONSE_NO_CONTENT = 0;
+	public const RESPONSE_USE_CACHE = 1;
+	public const RESPONSE_HAS_CONTENT = 2;
 
 	public function __construct(IClientService $clientService, ChangesMapper $mapper, ILogger $logger) {
 		$this->clientService = $clientService;
diff --git a/lib/private/Updater/ChangesMapper.php b/lib/private/Updater/ChangesMapper.php
index b79eadbff5831ef82c12d3ea3b9515ccde5c508a..b3b578f61e1ec68d171501c0aa2511d87dfe8ecb 100644
--- a/lib/private/Updater/ChangesMapper.php
+++ b/lib/private/Updater/ChangesMapper.php
@@ -32,7 +32,7 @@ use OCP\DB\QueryBuilder\IQueryBuilder;
 use OCP\IDBConnection;
 
 class ChangesMapper extends QBMapper {
-	const TABLE_NAME = 'whats_new';
+	public const TABLE_NAME = 'whats_new';
 
 	public function __construct(IDBConnection $db) {
 		parent::__construct($db, self::TABLE_NAME);
diff --git a/lib/private/User/Backend.php b/lib/private/User/Backend.php
index 354e1c3fd7107bcf755c4087d6f6cb6025ee9b9c..477448279a5e9cbcce92c33edc4cd91c8c80e0da 100644
--- a/lib/private/User/Backend.php
+++ b/lib/private/User/Backend.php
@@ -34,19 +34,19 @@ abstract class Backend implements UserInterface {
 	/**
 	 * error code for functions not provided by the user backend
 	 */
-	const NOT_IMPLEMENTED = -501;
+	public const NOT_IMPLEMENTED = -501;
 
 	/**
 	 * actions that user backends can define
 	 */
-	const CREATE_USER		= 1;			// 1 << 0
-	const SET_PASSWORD		= 16;			// 1 << 4
-	const CHECK_PASSWORD	= 256;			// 1 << 8
-	const GET_HOME			= 4096;			// 1 << 12
-	const GET_DISPLAYNAME	= 65536;		// 1 << 16
-	const SET_DISPLAYNAME	= 1048576;		// 1 << 20
-	const PROVIDE_AVATAR	= 16777216;		// 1 << 24
-	const COUNT_USERS		= 268435456;	// 1 << 28
+	public const CREATE_USER		= 1;			// 1 << 0
+	public const SET_PASSWORD		= 16;			// 1 << 4
+	public const CHECK_PASSWORD	= 256;			// 1 << 8
+	public const GET_HOME			= 4096;			// 1 << 12
+	public const GET_DISPLAYNAME	= 65536;		// 1 << 16
+	public const SET_DISPLAYNAME	= 1048576;		// 1 << 20
+	public const PROVIDE_AVATAR	= 16777216;		// 1 << 24
+	public const COUNT_USERS		= 268435456;	// 1 << 28
 
 	protected $possibleActions = [
 		self::CREATE_USER => 'createUser',
diff --git a/lib/private/legacy/OC_App.php b/lib/private/legacy/OC_App.php
index 7b67dd3eada3c7ef30590aeb5ec7e0f675a7094e..2454d6be4f0b3b271299c79002c873a719d8efd0 100644
--- a/lib/private/legacy/OC_App.php
+++ b/lib/private/legacy/OC_App.php
@@ -71,8 +71,8 @@ class OC_App {
 	private static $loadedApps = [];
 	private static $altLogin = [];
 	private static $alreadyRegistered = [];
-	const supportedApp = 300;
-	const officialApp = 200;
+	public const supportedApp = 300;
+	public const officialApp = 200;
 
 	/**
 	 * clean the appId
diff --git a/lib/private/legacy/OC_Files.php b/lib/private/legacy/OC_Files.php
index e046a57702675da7fe01fefaba86715f5fe7b5b0..ddb824cd6cd6e5057135ca698a25ceb3742fdc1b 100644
--- a/lib/private/legacy/OC_Files.php
+++ b/lib/private/legacy/OC_Files.php
@@ -50,11 +50,11 @@ use OCP\Lock\ILockingProvider;
  *
  */
 class OC_Files {
-	const FILE = 1;
-	const ZIP_FILES = 2;
-	const ZIP_DIR = 3;
+	public const FILE = 1;
+	public const ZIP_FILES = 2;
+	public const ZIP_DIR = 3;
 
-	const UPLOAD_MIN_LIMIT_BYTES = 1048576; // 1 MiB
+	public const UPLOAD_MIN_LIMIT_BYTES = 1048576; // 1 MiB
 
 
 	private static $multipartBoundary = '';
diff --git a/lib/public/API.php b/lib/public/API.php
index ce09a4349a9d54557feaf1ea7c8968ed7f7ab233..e1ccd3d02a179eda6688c4cfa59717df07dedab7 100644
--- a/lib/public/API.php
+++ b/lib/public/API.php
@@ -44,8 +44,8 @@ class API {
 	 * API Response Codes
 	 * @since 8.1.0
 	 */
-	const RESPOND_UNAUTHORISED = 997;
-	const RESPOND_SERVER_ERROR = 996;
-	const RESPOND_NOT_FOUND = 998;
-	const RESPOND_UNKNOWN_ERROR = 999;
+	public const RESPOND_UNAUTHORISED = 997;
+	public const RESPOND_SERVER_ERROR = 996;
+	public const RESPOND_NOT_FOUND = 998;
+	public const RESPOND_UNKNOWN_ERROR = 999;
 }
diff --git a/lib/public/Accounts/IAccountManager.php b/lib/public/Accounts/IAccountManager.php
index 9d02e0b43c068fc3671e4869c456a74c607adc0b..23af0f8b0b18b4c9a7b90406d733de2238ae78d2 100644
--- a/lib/public/Accounts/IAccountManager.php
+++ b/lib/public/Accounts/IAccountManager.php
@@ -38,23 +38,23 @@ use OCP\IUser;
 interface IAccountManager {
 
 	/** nobody can see my account details */
-	const VISIBILITY_PRIVATE = 'private';
+	public const VISIBILITY_PRIVATE = 'private';
 	/** only contacts, especially trusted servers can see my contact details */
-	const VISIBILITY_CONTACTS_ONLY = 'contacts';
+	public const VISIBILITY_CONTACTS_ONLY = 'contacts';
 	/** every body ca see my contact detail, will be published to the lookup server */
-	const VISIBILITY_PUBLIC = 'public';
+	public const VISIBILITY_PUBLIC = 'public';
 
-	const PROPERTY_AVATAR = 'avatar';
-	const PROPERTY_DISPLAYNAME = 'displayname';
-	const PROPERTY_PHONE = 'phone';
-	const PROPERTY_EMAIL = 'email';
-	const PROPERTY_WEBSITE = 'website';
-	const PROPERTY_ADDRESS = 'address';
-	const PROPERTY_TWITTER = 'twitter';
+	public const PROPERTY_AVATAR = 'avatar';
+	public const PROPERTY_DISPLAYNAME = 'displayname';
+	public const PROPERTY_PHONE = 'phone';
+	public const PROPERTY_EMAIL = 'email';
+	public const PROPERTY_WEBSITE = 'website';
+	public const PROPERTY_ADDRESS = 'address';
+	public const PROPERTY_TWITTER = 'twitter';
 
-	const NOT_VERIFIED = '0';
-	const VERIFICATION_IN_PROGRESS = '1';
-	const VERIFIED = '2';
+	public const NOT_VERIFIED = '0';
+	public const VERIFICATION_IN_PROGRESS = '1';
+	public const VERIFIED = '2';
 
 	/**
 	 * Get the account data for a given user
diff --git a/lib/public/Activity/IExtension.php b/lib/public/Activity/IExtension.php
index c470ef07e0407881dda3d2dbe1bd12f6c0484548..5ba09507cbff043c883d803dd06065c1b959726f 100644
--- a/lib/public/Activity/IExtension.php
+++ b/lib/public/Activity/IExtension.php
@@ -32,12 +32,12 @@ namespace OCP\Activity;
  * @since 8.0.0
  */
 interface IExtension {
-	const METHOD_STREAM = 'stream';
-	const METHOD_MAIL = 'email';
+	public const METHOD_STREAM = 'stream';
+	public const METHOD_MAIL = 'email';
 
-	const PRIORITY_VERYLOW 	= 10;
-	const PRIORITY_LOW	= 20;
-	const PRIORITY_MEDIUM	= 30;
-	const PRIORITY_HIGH	= 40;
-	const PRIORITY_VERYHIGH	= 50;
+	public const PRIORITY_VERYLOW 	= 10;
+	public const PRIORITY_LOW	= 20;
+	public const PRIORITY_MEDIUM	= 30;
+	public const PRIORITY_HIGH	= 40;
+	public const PRIORITY_VERYHIGH	= 50;
 }
diff --git a/lib/public/App/ManagerEvent.php b/lib/public/App/ManagerEvent.php
index e98ada424c662412bc6c3fa75b5d39c2d5e20528..b44cd3a5dcc083ab2c666bb77d6ed916235a4573 100644
--- a/lib/public/App/ManagerEvent.php
+++ b/lib/public/App/ManagerEvent.php
@@ -32,14 +32,14 @@ use OCP\EventDispatcher\Event;
  * @since 9.0.0
  */
 class ManagerEvent extends Event {
-	const EVENT_APP_ENABLE = 'OCP\App\IAppManager::enableApp';
-	const EVENT_APP_ENABLE_FOR_GROUPS = 'OCP\App\IAppManager::enableAppForGroups';
-	const EVENT_APP_DISABLE = 'OCP\App\IAppManager::disableApp';
+	public const EVENT_APP_ENABLE = 'OCP\App\IAppManager::enableApp';
+	public const EVENT_APP_ENABLE_FOR_GROUPS = 'OCP\App\IAppManager::enableAppForGroups';
+	public const EVENT_APP_DISABLE = 'OCP\App\IAppManager::disableApp';
 
 	/**
 	 * @since 9.1.0
 	 */
-	const EVENT_APP_UPDATE = 'OCP\App\IAppManager::updateApp';
+	public const EVENT_APP_UPDATE = 'OCP\App\IAppManager::updateApp';
 
 	/** @var string */
 	protected $event;
diff --git a/lib/public/AppFramework/Http.php b/lib/public/AppFramework/Http.php
index e0b910325a0f048e2ab2cd0af6ccdc0342d7494f..1106c58af857feebd2285c5a702f47f024039bbe 100644
--- a/lib/public/AppFramework/Http.php
+++ b/lib/public/AppFramework/Http.php
@@ -34,63 +34,63 @@ namespace OCP\AppFramework;
  * @since 6.0.0
  */
 class Http {
-	const STATUS_CONTINUE = 100;
-	const STATUS_SWITCHING_PROTOCOLS = 101;
-	const STATUS_PROCESSING = 102;
-	const STATUS_OK = 200;
-	const STATUS_CREATED = 201;
-	const STATUS_ACCEPTED = 202;
-	const STATUS_NON_AUTHORATIVE_INFORMATION = 203;
-	const STATUS_NO_CONTENT = 204;
-	const STATUS_RESET_CONTENT = 205;
-	const STATUS_PARTIAL_CONTENT = 206;
-	const STATUS_MULTI_STATUS = 207;
-	const STATUS_ALREADY_REPORTED = 208;
-	const STATUS_IM_USED = 226;
-	const STATUS_MULTIPLE_CHOICES = 300;
-	const STATUS_MOVED_PERMANENTLY = 301;
-	const STATUS_FOUND = 302;
-	const STATUS_SEE_OTHER = 303;
-	const STATUS_NOT_MODIFIED = 304;
-	const STATUS_USE_PROXY = 305;
-	const STATUS_RESERVED = 306;
-	const STATUS_TEMPORARY_REDIRECT = 307;
-	const STATUS_BAD_REQUEST = 400;
-	const STATUS_UNAUTHORIZED = 401;
-	const STATUS_PAYMENT_REQUIRED = 402;
-	const STATUS_FORBIDDEN = 403;
-	const STATUS_NOT_FOUND = 404;
-	const STATUS_METHOD_NOT_ALLOWED = 405;
-	const STATUS_NOT_ACCEPTABLE = 406;
-	const STATUS_PROXY_AUTHENTICATION_REQUIRED = 407;
-	const STATUS_REQUEST_TIMEOUT = 408;
-	const STATUS_CONFLICT = 409;
-	const STATUS_GONE = 410;
-	const STATUS_LENGTH_REQUIRED = 411;
-	const STATUS_PRECONDITION_FAILED = 412;
-	const STATUS_REQUEST_ENTITY_TOO_LARGE = 413;
-	const STATUS_REQUEST_URI_TOO_LONG = 414;
-	const STATUS_UNSUPPORTED_MEDIA_TYPE = 415;
-	const STATUS_REQUEST_RANGE_NOT_SATISFIABLE = 416;
-	const STATUS_EXPECTATION_FAILED = 417;
-	const STATUS_IM_A_TEAPOT = 418;
-	const STATUS_UNPROCESSABLE_ENTITY = 422;
-	const STATUS_LOCKED = 423;
-	const STATUS_FAILED_DEPENDENCY = 424;
-	const STATUS_UPGRADE_REQUIRED = 426;
-	const STATUS_PRECONDITION_REQUIRED = 428;
-	const STATUS_TOO_MANY_REQUESTS = 429;
-	const STATUS_REQUEST_HEADER_FIELDS_TOO_LARGE = 431;
-	const STATUS_INTERNAL_SERVER_ERROR = 500;
-	const STATUS_NOT_IMPLEMENTED = 501;
-	const STATUS_BAD_GATEWAY = 502;
-	const STATUS_SERVICE_UNAVAILABLE = 503;
-	const STATUS_GATEWAY_TIMEOUT = 504;
-	const STATUS_HTTP_VERSION_NOT_SUPPORTED = 505;
-	const STATUS_VARIANT_ALSO_NEGOTIATES = 506;
-	const STATUS_INSUFFICIENT_STORAGE = 507;
-	const STATUS_LOOP_DETECTED = 508;
-	const STATUS_BANDWIDTH_LIMIT_EXCEEDED = 509;
-	const STATUS_NOT_EXTENDED = 510;
-	const STATUS_NETWORK_AUTHENTICATION_REQUIRED = 511;
+	public const STATUS_CONTINUE = 100;
+	public const STATUS_SWITCHING_PROTOCOLS = 101;
+	public const STATUS_PROCESSING = 102;
+	public const STATUS_OK = 200;
+	public const STATUS_CREATED = 201;
+	public const STATUS_ACCEPTED = 202;
+	public const STATUS_NON_AUTHORATIVE_INFORMATION = 203;
+	public const STATUS_NO_CONTENT = 204;
+	public const STATUS_RESET_CONTENT = 205;
+	public const STATUS_PARTIAL_CONTENT = 206;
+	public const STATUS_MULTI_STATUS = 207;
+	public const STATUS_ALREADY_REPORTED = 208;
+	public const STATUS_IM_USED = 226;
+	public const STATUS_MULTIPLE_CHOICES = 300;
+	public const STATUS_MOVED_PERMANENTLY = 301;
+	public const STATUS_FOUND = 302;
+	public const STATUS_SEE_OTHER = 303;
+	public const STATUS_NOT_MODIFIED = 304;
+	public const STATUS_USE_PROXY = 305;
+	public const STATUS_RESERVED = 306;
+	public const STATUS_TEMPORARY_REDIRECT = 307;
+	public const STATUS_BAD_REQUEST = 400;
+	public const STATUS_UNAUTHORIZED = 401;
+	public const STATUS_PAYMENT_REQUIRED = 402;
+	public const STATUS_FORBIDDEN = 403;
+	public const STATUS_NOT_FOUND = 404;
+	public const STATUS_METHOD_NOT_ALLOWED = 405;
+	public const STATUS_NOT_ACCEPTABLE = 406;
+	public const STATUS_PROXY_AUTHENTICATION_REQUIRED = 407;
+	public const STATUS_REQUEST_TIMEOUT = 408;
+	public const STATUS_CONFLICT = 409;
+	public const STATUS_GONE = 410;
+	public const STATUS_LENGTH_REQUIRED = 411;
+	public const STATUS_PRECONDITION_FAILED = 412;
+	public const STATUS_REQUEST_ENTITY_TOO_LARGE = 413;
+	public const STATUS_REQUEST_URI_TOO_LONG = 414;
+	public const STATUS_UNSUPPORTED_MEDIA_TYPE = 415;
+	public const STATUS_REQUEST_RANGE_NOT_SATISFIABLE = 416;
+	public const STATUS_EXPECTATION_FAILED = 417;
+	public const STATUS_IM_A_TEAPOT = 418;
+	public const STATUS_UNPROCESSABLE_ENTITY = 422;
+	public const STATUS_LOCKED = 423;
+	public const STATUS_FAILED_DEPENDENCY = 424;
+	public const STATUS_UPGRADE_REQUIRED = 426;
+	public const STATUS_PRECONDITION_REQUIRED = 428;
+	public const STATUS_TOO_MANY_REQUESTS = 429;
+	public const STATUS_REQUEST_HEADER_FIELDS_TOO_LARGE = 431;
+	public const STATUS_INTERNAL_SERVER_ERROR = 500;
+	public const STATUS_NOT_IMPLEMENTED = 501;
+	public const STATUS_BAD_GATEWAY = 502;
+	public const STATUS_SERVICE_UNAVAILABLE = 503;
+	public const STATUS_GATEWAY_TIMEOUT = 504;
+	public const STATUS_HTTP_VERSION_NOT_SUPPORTED = 505;
+	public const STATUS_VARIANT_ALSO_NEGOTIATES = 506;
+	public const STATUS_INSUFFICIENT_STORAGE = 507;
+	public const STATUS_LOOP_DETECTED = 508;
+	public const STATUS_BANDWIDTH_LIMIT_EXCEEDED = 509;
+	public const STATUS_NOT_EXTENDED = 510;
+	public const STATUS_NETWORK_AUTHENTICATION_REQUIRED = 511;
 }
diff --git a/lib/public/AppFramework/Http/TemplateResponse.php b/lib/public/AppFramework/Http/TemplateResponse.php
index 283189a774a0bfda3261cb36b02335970353c7ca..d6c4006433cfccba250523b6c77caed712e20ab0 100644
--- a/lib/public/AppFramework/Http/TemplateResponse.php
+++ b/lib/public/AppFramework/Http/TemplateResponse.php
@@ -38,8 +38,8 @@ namespace OCP\AppFramework\Http;
  * @since 6.0.0
  */
 class TemplateResponse extends Response {
-	const EVENT_LOAD_ADDITIONAL_SCRIPTS = self::class . '::loadAdditionalScripts';
-	const EVENT_LOAD_ADDITIONAL_SCRIPTS_LOGGEDIN = self::class . '::loadAdditionalScriptsLoggedIn';
+	public const EVENT_LOAD_ADDITIONAL_SCRIPTS = self::class . '::loadAdditionalScripts';
+	public const EVENT_LOAD_ADDITIONAL_SCRIPTS_LOGGEDIN = self::class . '::loadAdditionalScriptsLoggedIn';
 
 	/**
 	 * name of the template
diff --git a/lib/public/Authentication/TwoFactorAuth/IProvider.php b/lib/public/Authentication/TwoFactorAuth/IProvider.php
index 4de49340b7d1871c43671332c7423fa5b9838436..d2f5df2e3eb77ee5a47697fd015482a6107d90d4 100644
--- a/lib/public/Authentication/TwoFactorAuth/IProvider.php
+++ b/lib/public/Authentication/TwoFactorAuth/IProvider.php
@@ -37,8 +37,8 @@ interface IProvider {
 	/**
 	 * @since 14.0.0
 	 */
-	const EVENT_SUCCESS = self::class . '::success';
-	const EVENT_FAILED  = self::class . '::failed';
+	public const EVENT_SUCCESS = self::class . '::success';
+	public const EVENT_FAILED  = self::class . '::failed';
 
 	/**
 	 * Get unique identifier of this 2FA provider
diff --git a/lib/public/Authentication/TwoFactorAuth/IRegistry.php b/lib/public/Authentication/TwoFactorAuth/IRegistry.php
index 77aad28620b21cd3b7c6d3e9a43022f98237b09e..c98feee25458477dce4b2a36eeb869bdbc8fe1f5 100644
--- a/lib/public/Authentication/TwoFactorAuth/IRegistry.php
+++ b/lib/public/Authentication/TwoFactorAuth/IRegistry.php
@@ -39,8 +39,8 @@ use OCP\IUser;
  * @since 14.0.0
  */
 interface IRegistry {
-	const EVENT_PROVIDER_ENABLED = self::class . '::enable';
-	const EVENT_PROVIDER_DISABLED = self::class . '::disable';
+	public const EVENT_PROVIDER_ENABLED = self::class . '::enable';
+	public const EVENT_PROVIDER_DISABLED = self::class . '::disable';
 
 	/**
 	 * Get a key-value map of providers and their enabled/disabled state for
diff --git a/lib/public/Comments/CommentsEntityEvent.php b/lib/public/Comments/CommentsEntityEvent.php
index 53ccd87f08d67d00df1976f50602b0a8ca8ce9ed..9644c9119a68bda9fbab4f9e1b9772f8f04e676b 100644
--- a/lib/public/Comments/CommentsEntityEvent.php
+++ b/lib/public/Comments/CommentsEntityEvent.php
@@ -32,7 +32,7 @@ use OCP\EventDispatcher\Event;
  * @since 9.1.0
  */
 class CommentsEntityEvent extends Event {
-	const EVENT_ENTITY = 'OCP\Comments\ICommentsManager::registerEntity';
+	public const EVENT_ENTITY = 'OCP\Comments\ICommentsManager::registerEntity';
 
 	/** @var string */
 	protected $event;
diff --git a/lib/public/Comments/CommentsEvent.php b/lib/public/Comments/CommentsEvent.php
index b2116eb51ec544cb288bd501c4ac70261c2b89a4..313df7e2ff79921638b6dc419a3e42580f233394 100644
--- a/lib/public/Comments/CommentsEvent.php
+++ b/lib/public/Comments/CommentsEvent.php
@@ -32,10 +32,10 @@ use OCP\EventDispatcher\Event;
  * @since 9.0.0
  */
 class CommentsEvent extends Event {
-	const EVENT_ADD        = 'OCP\Comments\ICommentsManager::addComment';
-	const EVENT_PRE_UPDATE = 'OCP\Comments\ICommentsManager::preUpdateComment';
-	const EVENT_UPDATE     = 'OCP\Comments\ICommentsManager::updateComment';
-	const EVENT_DELETE     = 'OCP\Comments\ICommentsManager::deleteComment';
+	public const EVENT_ADD        = 'OCP\Comments\ICommentsManager::addComment';
+	public const EVENT_PRE_UPDATE = 'OCP\Comments\ICommentsManager::preUpdateComment';
+	public const EVENT_UPDATE     = 'OCP\Comments\ICommentsManager::updateComment';
+	public const EVENT_DELETE     = 'OCP\Comments\ICommentsManager::deleteComment';
 
 	/** @var string */
 	protected $event;
diff --git a/lib/public/Comments/IComment.php b/lib/public/Comments/IComment.php
index 604aaefd890a1e575f9e3ebd775a01a7adb19e8a..fdf789b6637eab9f459c0ccc8077882fcc67b5f8 100644
--- a/lib/public/Comments/IComment.php
+++ b/lib/public/Comments/IComment.php
@@ -34,7 +34,7 @@ namespace OCP\Comments;
  * @since 9.0.0
  */
 interface IComment {
-	const MAX_MESSAGE_LENGTH = 1000;
+	public const MAX_MESSAGE_LENGTH = 1000;
 
 	/**
 	 * returns the ID of the comment
diff --git a/lib/public/Comments/ICommentsManager.php b/lib/public/Comments/ICommentsManager.php
index bb3a6fe255cee485420dfa869a440c73ba5fdc8a..c49426422e316bc30009c1ce76f8a7d27184ecfa 100644
--- a/lib/public/Comments/ICommentsManager.php
+++ b/lib/public/Comments/ICommentsManager.php
@@ -48,7 +48,7 @@ interface ICommentsManager {
 	 *
 	 * User interfaces shall show "Deleted user" as display name, if needed.
 	 */
-	const DELETED_USER = 'deleted_users';
+	public const DELETED_USER = 'deleted_users';
 
 	/**
 	 * returns a comment instance
diff --git a/lib/public/Console/ConsoleEvent.php b/lib/public/Console/ConsoleEvent.php
index 0c3fa25f54f77964c445d6d480e56d1c8c5f2447..78f7ae5581418c1eeb9efafc11a0248dd82e1f02 100644
--- a/lib/public/Console/ConsoleEvent.php
+++ b/lib/public/Console/ConsoleEvent.php
@@ -32,7 +32,7 @@ use OCP\EventDispatcher\Event;
  * @since 9.0.0
  */
 class ConsoleEvent extends Event {
-	const EVENT_RUN = 'OC\Console\Application::run';
+	public const EVENT_RUN = 'OC\Console\Application::run';
 
 	/** @var string */
 	protected $event;
diff --git a/lib/public/Constants.php b/lib/public/Constants.php
index 7c23745b9355d1fd28d56a88166d01b415258117..b7165768733b4abf55a5614c078902e5a5b51140 100644
--- a/lib/public/Constants.php
+++ b/lib/public/Constants.php
@@ -40,16 +40,16 @@ class Constants {
 	 * CRUDS permissions.
 	 * @since 8.0.0
 	 */
-	const PERMISSION_CREATE = 4;
-	const PERMISSION_READ = 1;
-	const PERMISSION_UPDATE = 2;
-	const PERMISSION_DELETE = 8;
-	const PERMISSION_SHARE = 16;
-	const PERMISSION_ALL = 31;
+	public const PERMISSION_CREATE = 4;
+	public const PERMISSION_READ = 1;
+	public const PERMISSION_UPDATE = 2;
+	public const PERMISSION_DELETE = 8;
+	public const PERMISSION_SHARE = 16;
+	public const PERMISSION_ALL = 31;
 
 	/**
 	 * @since 8.0.0 - Updated in 9.0.0 to allow all POSIX chars since we no
 	 * longer support windows as server platform.
 	 */
-	const FILENAME_INVALID_CHARS = "\\/";
+	public const FILENAME_INVALID_CHARS = "\\/";
 }
diff --git a/lib/public/DB/QueryBuilder/IExpressionBuilder.php b/lib/public/DB/QueryBuilder/IExpressionBuilder.php
index 5f17585a1310e748a88217b3aaa88d3da9ebfe83..9501aabe53a22a63c3ded0feb9d9c8a7102970bc 100644
--- a/lib/public/DB/QueryBuilder/IExpressionBuilder.php
+++ b/lib/public/DB/QueryBuilder/IExpressionBuilder.php
@@ -35,27 +35,27 @@ interface IExpressionBuilder {
 	/**
 	 * @since 9.0.0
 	 */
-	const EQ  = ExpressionBuilder::EQ;
+	public const EQ  = ExpressionBuilder::EQ;
 	/**
 	 * @since 9.0.0
 	 */
-	const NEQ = ExpressionBuilder::NEQ;
+	public const NEQ = ExpressionBuilder::NEQ;
 	/**
 	 * @since 9.0.0
 	 */
-	const LT  = ExpressionBuilder::LT;
+	public const LT  = ExpressionBuilder::LT;
 	/**
 	 * @since 9.0.0
 	 */
-	const LTE = ExpressionBuilder::LTE;
+	public const LTE = ExpressionBuilder::LTE;
 	/**
 	 * @since 9.0.0
 	 */
-	const GT  = ExpressionBuilder::GT;
+	public const GT  = ExpressionBuilder::GT;
 	/**
 	 * @since 9.0.0
 	 */
-	const GTE = ExpressionBuilder::GTE;
+	public const GTE = ExpressionBuilder::GTE;
 
 	/**
 	 * Creates a conjunction of the given boolean expressions.
diff --git a/lib/public/DB/QueryBuilder/IQueryBuilder.php b/lib/public/DB/QueryBuilder/IQueryBuilder.php
index d65872388f97eb84844c369aca8e020fc2dbc2d3..bb0ed6b205cba295fd3bb615c54ef292957612a1 100644
--- a/lib/public/DB/QueryBuilder/IQueryBuilder.php
+++ b/lib/public/DB/QueryBuilder/IQueryBuilder.php
@@ -37,36 +37,36 @@ interface IQueryBuilder {
 	/**
 	 * @since 9.0.0
 	 */
-	const PARAM_NULL = \PDO::PARAM_NULL;
+	public const PARAM_NULL = \PDO::PARAM_NULL;
 	/**
 	 * @since 9.0.0
 	 */
-	const PARAM_BOOL = \PDO::PARAM_BOOL;
+	public const PARAM_BOOL = \PDO::PARAM_BOOL;
 	/**
 	 * @since 9.0.0
 	 */
-	const PARAM_INT = \PDO::PARAM_INT;
+	public const PARAM_INT = \PDO::PARAM_INT;
 	/**
 	 * @since 9.0.0
 	 */
-	const PARAM_STR = \PDO::PARAM_STR;
+	public const PARAM_STR = \PDO::PARAM_STR;
 	/**
 	 * @since 9.0.0
 	 */
-	const PARAM_LOB = \PDO::PARAM_LOB;
+	public const PARAM_LOB = \PDO::PARAM_LOB;
 	/**
 	 * @since 9.0.0
 	 */
-	const PARAM_DATE = 'datetime';
+	public const PARAM_DATE = 'datetime';
 
 	/**
 	 * @since 9.0.0
 	 */
-	const PARAM_INT_ARRAY = Connection::PARAM_INT_ARRAY;
+	public const PARAM_INT_ARRAY = Connection::PARAM_INT_ARRAY;
 	/**
 	 * @since 9.0.0
 	 */
-	const PARAM_STR_ARRAY = Connection::PARAM_STR_ARRAY;
+	public const PARAM_STR_ARRAY = Connection::PARAM_STR_ARRAY;
 
 
 	/**
diff --git a/lib/public/Dashboard/Model/WidgetSetting.php b/lib/public/Dashboard/Model/WidgetSetting.php
index 27daa76cbdf8d5f3fa43f85d0950ef82dbf5d34a..f3586b46fafdc85b3d046c269db7952f52a2a370 100644
--- a/lib/public/Dashboard/Model/WidgetSetting.php
+++ b/lib/public/Dashboard/Model/WidgetSetting.php
@@ -48,8 +48,8 @@ use JsonSerializable;
  * @package OCP\Dashboard\Model
  */
 final class WidgetSetting implements JsonSerializable {
-	const TYPE_INPUT = 'input';
-	const TYPE_CHECKBOX = 'checkbox';
+	public const TYPE_INPUT = 'input';
+	public const TYPE_CHECKBOX = 'checkbox';
 
 
 	/** @var string */
diff --git a/lib/public/Dashboard/Model/WidgetSetup.php b/lib/public/Dashboard/Model/WidgetSetup.php
index 8a502b09e5807a154738731fcd740bab3f8b242b..5440b0cc93ace11750491fe55be7d85acf1be618 100644
--- a/lib/public/Dashboard/Model/WidgetSetup.php
+++ b/lib/public/Dashboard/Model/WidgetSetup.php
@@ -41,9 +41,9 @@ use JsonSerializable;
  * @package OCP\Dashboard\Model
  */
 final class WidgetSetup implements JsonSerializable {
-	const SIZE_TYPE_MIN = 'min';
-	const SIZE_TYPE_MAX = 'max';
-	const SIZE_TYPE_DEFAULT = 'default';
+	public const SIZE_TYPE_MIN = 'min';
+	public const SIZE_TYPE_MAX = 'max';
+	public const SIZE_TYPE_DEFAULT = 'default';
 
 
 	/** @var array */
diff --git a/lib/public/Files/Cache/ICache.php b/lib/public/Files/Cache/ICache.php
index d1388f02b1d6d19be6f1a32e742b9078cb1beed6..643a2bad628e6120a9f428cf7acea232a8a9f10b 100644
--- a/lib/public/Files/Cache/ICache.php
+++ b/lib/public/Files/Cache/ICache.php
@@ -37,10 +37,10 @@ use OCP\Files\Search\ISearchQuery;
  * @since 9.0.0
  */
 interface ICache {
-	const NOT_FOUND = 0;
-	const PARTIAL = 1; //only partial data available, file not cached in the database
-	const SHALLOW = 2; //folder in cache, but not all child files are completely scanned
-	const COMPLETE = 3;
+	public const NOT_FOUND = 0;
+	public const PARTIAL = 1; //only partial data available, file not cached in the database
+	public const SHALLOW = 2; //folder in cache, but not all child files are completely scanned
+	public const COMPLETE = 3;
 
 	/**
 	 * Get the numeric storage id for this cache's storage
diff --git a/lib/public/Files/Cache/ICacheEntry.php b/lib/public/Files/Cache/ICacheEntry.php
index 369c8b69fc1904a0df63945420da35612d1ed500..c9766620885ff45870eeb9a472f1d9d18a2d4dba 100644
--- a/lib/public/Files/Cache/ICacheEntry.php
+++ b/lib/public/Files/Cache/ICacheEntry.php
@@ -28,7 +28,7 @@ namespace OCP\Files\Cache;
  * @since 9.0.0
  */
 interface ICacheEntry {
-	const DIRECTORY_MIMETYPE = 'httpd/unix-directory';
+	public const DIRECTORY_MIMETYPE = 'httpd/unix-directory';
 
 	/**
 	 * Get the numeric id of a file
diff --git a/lib/public/Files/Cache/IScanner.php b/lib/public/Files/Cache/IScanner.php
index e12561eb0c5744cac9f83de20b6936c8d4887e23..c15d42315bf02c86f3bd18e644b1b4e590541ecf 100644
--- a/lib/public/Files/Cache/IScanner.php
+++ b/lib/public/Files/Cache/IScanner.php
@@ -28,13 +28,13 @@ namespace OCP\Files\Cache;
  * @since 9.0.0
  */
 interface IScanner {
-	const SCAN_RECURSIVE_INCOMPLETE = 2; // only recursive into not fully scanned folders
-	const SCAN_RECURSIVE = true;
-	const SCAN_SHALLOW = false;
+	public const SCAN_RECURSIVE_INCOMPLETE = 2; // only recursive into not fully scanned folders
+	public const SCAN_RECURSIVE = true;
+	public const SCAN_SHALLOW = false;
 
-	const REUSE_NONE = 0;
-	const REUSE_ETAG = 1;
-	const REUSE_SIZE = 2;
+	public const REUSE_NONE = 0;
+	public const REUSE_ETAG = 1;
+	public const REUSE_SIZE = 2;
 
 	/**
 	 * scan a single file and store it in the cache
diff --git a/lib/public/Files/Cache/IWatcher.php b/lib/public/Files/Cache/IWatcher.php
index 0c8065828e71c5f291cb8045ad8bb7d840dbb611..e279c8b07e0db023b4e1c8ca5e701ebf8ff2a46f 100644
--- a/lib/public/Files/Cache/IWatcher.php
+++ b/lib/public/Files/Cache/IWatcher.php
@@ -28,9 +28,9 @@ namespace OCP\Files\Cache;
  * @since 9.0.0
  */
 interface IWatcher {
-	const CHECK_NEVER = 0; // never check the underlying filesystem for updates
-	const CHECK_ONCE = 1; // check the underlying filesystem for updates once every request for each file
-	const CHECK_ALWAYS = 2; // always check the underlying filesystem for updates
+	public const CHECK_NEVER = 0; // never check the underlying filesystem for updates
+	public const CHECK_ONCE = 1; // check the underlying filesystem for updates once every request for each file
+	public const CHECK_ALWAYS = 2; // always check the underlying filesystem for updates
 
 	/**
 	 * @param int $policy either IWatcher::CHECK_NEVER, IWatcher::CHECK_ONCE, IWatcher::CHECK_ALWAYS
diff --git a/lib/public/Files/FileInfo.php b/lib/public/Files/FileInfo.php
index f7a36e0542dc8ea4821ea6c53f0cc9477758e1a9..f8b0623c3e48f53c32ba0a2bf151c04c64241bb1 100644
--- a/lib/public/Files/FileInfo.php
+++ b/lib/public/Files/FileInfo.php
@@ -38,38 +38,38 @@ interface FileInfo {
 	/**
 	 * @since 7.0.0
 	 */
-	const TYPE_FILE = 'file';
+	public const TYPE_FILE = 'file';
 	/**
 	 * @since 7.0.0
 	 */
-	const TYPE_FOLDER = 'dir';
+	public const TYPE_FOLDER = 'dir';
 
 	/**
 	 * @const \OCP\Files\FileInfo::SPACE_NOT_COMPUTED Return value for a not computed space value
 	 * @since 8.0.0
 	 */
-	const SPACE_NOT_COMPUTED = -1;
+	public const SPACE_NOT_COMPUTED = -1;
 	/**
 	 * @const \OCP\Files\FileInfo::SPACE_UNKNOWN Return value for unknown space value
 	 * @since 8.0.0
 	 */
-	const SPACE_UNKNOWN = -2;
+	public const SPACE_UNKNOWN = -2;
 	/**
 	 * @const \OCP\Files\FileInfo::SPACE_UNLIMITED Return value for unlimited space
 	 * @since 8.0.0
 	 */
-	const SPACE_UNLIMITED = -3;
+	public const SPACE_UNLIMITED = -3;
 
 	/**
 	 * @since 9.1.0
 	 */
-	const MIMETYPE_FOLDER = 'httpd/unix-directory';
+	public const MIMETYPE_FOLDER = 'httpd/unix-directory';
 
 	/**
 	 * @const \OCP\Files\FileInfo::BLACKLIST_FILES_REGEX Return regular expression to test filenames against (blacklisting)
 	 * @since 12.0.0
 	 */
-	const BLACKLIST_FILES_REGEX = '\.(part|filepart)$';
+	public const BLACKLIST_FILES_REGEX = '\.(part|filepart)$';
 
 	/**
 	 * Get the Etag of the file or folder
diff --git a/lib/public/Files/Notify/IChange.php b/lib/public/Files/Notify/IChange.php
index 762030c738a9185b9e1f6231615749a9b86b07ba..b018be779327222a8532ef26ed5429b64e61cc2a 100644
--- a/lib/public/Files/Notify/IChange.php
+++ b/lib/public/Files/Notify/IChange.php
@@ -29,10 +29,10 @@ namespace OCP\Files\Notify;
  * @since 12.0.0
  */
 interface IChange {
-	const ADDED = 1;
-	const REMOVED = 2;
-	const MODIFIED = 3;
-	const RENAMED = 4;
+	public const ADDED = 1;
+	public const REMOVED = 2;
+	public const MODIFIED = 3;
+	public const RENAMED = 4;
 
 	/**
 	 * Get the type of the change
diff --git a/lib/public/Files/Search/ISearchBinaryOperator.php b/lib/public/Files/Search/ISearchBinaryOperator.php
index a089323c9fc1a9d0b09504031e5781c3ef585102..554108aadf2a15101b261bd99452356f9bf4bfa7 100644
--- a/lib/public/Files/Search/ISearchBinaryOperator.php
+++ b/lib/public/Files/Search/ISearchBinaryOperator.php
@@ -27,9 +27,9 @@ namespace OCP\Files\Search;
  * @since 12.0.0
  */
 interface ISearchBinaryOperator extends ISearchOperator {
-	const OPERATOR_AND = 'and';
-	const OPERATOR_OR = 'or';
-	const OPERATOR_NOT = 'not';
+	public const OPERATOR_AND = 'and';
+	public const OPERATOR_OR = 'or';
+	public const OPERATOR_NOT = 'not';
 
 	/**
 	 * The type of binary operator
diff --git a/lib/public/Files/Search/ISearchComparison.php b/lib/public/Files/Search/ISearchComparison.php
index 6cfbb29ee5449e29126ab462f3022021030c6602..e2e0a705183361a07de3928c1c8449731d225ff2 100644
--- a/lib/public/Files/Search/ISearchComparison.php
+++ b/lib/public/Files/Search/ISearchComparison.php
@@ -27,12 +27,12 @@ namespace OCP\Files\Search;
  * @since 12.0.0
  */
 interface ISearchComparison extends ISearchOperator {
-	const COMPARE_EQUAL = 'eq';
-	const COMPARE_GREATER_THAN = 'gt';
-	const COMPARE_GREATER_THAN_EQUAL = 'gte';
-	const COMPARE_LESS_THAN = 'lt';
-	const COMPARE_LESS_THAN_EQUAL = 'lte';
-	const COMPARE_LIKE = 'like';
+	public const COMPARE_EQUAL = 'eq';
+	public const COMPARE_GREATER_THAN = 'gt';
+	public const COMPARE_GREATER_THAN_EQUAL = 'gte';
+	public const COMPARE_LESS_THAN = 'lt';
+	public const COMPARE_LESS_THAN_EQUAL = 'lte';
+	public const COMPARE_LIKE = 'like';
 
 	/**
 	 * Get the type of comparison, one of the ISearchComparison::COMPARE_* constants
diff --git a/lib/public/Files/Search/ISearchOrder.php b/lib/public/Files/Search/ISearchOrder.php
index 817c7e3b5b49deacf9a54cfd67b0c605ccdd3972..fdcd53447f502ad5fbe41bae921b68f7e85a4569 100644
--- a/lib/public/Files/Search/ISearchOrder.php
+++ b/lib/public/Files/Search/ISearchOrder.php
@@ -27,8 +27,8 @@ namespace OCP\Files\Search;
  * @since 12.0.0
  */
 interface ISearchOrder {
-	const DIRECTION_ASCENDING = 'asc';
-	const DIRECTION_DESCENDING = 'desc';
+	public const DIRECTION_ASCENDING = 'asc';
+	public const DIRECTION_DESCENDING = 'desc';
 
 	/**
 	 * The direction to sort in, either ISearchOrder::DIRECTION_ASCENDING or ISearchOrder::DIRECTION_DESCENDING
diff --git a/lib/public/Files/Storage/INotifyStorage.php b/lib/public/Files/Storage/INotifyStorage.php
index 60893c2f6369fd85779c7df3fcf753127cc0c2e0..f460201becbf0b041e8b0fe591347684017234ec 100644
--- a/lib/public/Files/Storage/INotifyStorage.php
+++ b/lib/public/Files/Storage/INotifyStorage.php
@@ -31,10 +31,10 @@ use OCP\Files\Notify\INotifyHandler;
  * @since 9.1.0
  */
 interface INotifyStorage {
-	const NOTIFY_ADDED = 1;
-	const NOTIFY_REMOVED = 2;
-	const NOTIFY_MODIFIED = 3;
-	const NOTIFY_RENAMED = 4;
+	public const NOTIFY_ADDED = 1;
+	public const NOTIFY_REMOVED = 2;
+	public const NOTIFY_MODIFIED = 3;
+	public const NOTIFY_RENAMED = 4;
 
 	/**
 	 * Start listening for update notifications
diff --git a/lib/public/Files/StorageNotAvailableException.php b/lib/public/Files/StorageNotAvailableException.php
index 1a0465bda13c10f01d7f3d1fe941db23d4473931..c0592cfc5af65a442d642bd9e39f81169eb1b327 100644
--- a/lib/public/Files/StorageNotAvailableException.php
+++ b/lib/public/Files/StorageNotAvailableException.php
@@ -44,13 +44,13 @@ use OC\HintException;
  * @since 6.0.0 - since 8.2.1 based on HintException
  */
 class StorageNotAvailableException extends HintException {
-	const STATUS_SUCCESS = 0;
-	const STATUS_ERROR = 1;
-	const STATUS_INDETERMINATE = 2;
-	const STATUS_INCOMPLETE_CONF = 3;
-	const STATUS_UNAUTHORIZED = 4;
-	const STATUS_TIMEOUT = 5;
-	const STATUS_NETWORK_ERROR = 6;
+	public const STATUS_SUCCESS = 0;
+	public const STATUS_ERROR = 1;
+	public const STATUS_INDETERMINATE = 2;
+	public const STATUS_INCOMPLETE_CONF = 3;
+	public const STATUS_UNAUTHORIZED = 4;
+	public const STATUS_TIMEOUT = 5;
+	public const STATUS_NETWORK_ERROR = 6;
 
 	/**
 	 * StorageNotAvailableException constructor.
diff --git a/lib/public/FullTextSearch/Model/IIndex.php b/lib/public/FullTextSearch/Model/IIndex.php
index fb279336c55f3957a04b199b5f05825acfa09fe3..8272d7e78eb968ed5f5a0299b3aa4e923424d900 100644
--- a/lib/public/FullTextSearch/Model/IIndex.php
+++ b/lib/public/FullTextSearch/Model/IIndex.php
@@ -45,25 +45,25 @@ namespace OCP\FullTextSearch\Model;
  * @package OCP\FullTextSearch\Model
  */
 interface IIndex {
-	const INDEX_OK = 1;
-	const INDEX_IGNORE = 2;
-
-	const INDEX_META = 4;
-	const INDEX_CONTENT = 8;
-	const INDEX_PARTS = 16;
-	const INDEX_FULL = 28;
-	const INDEX_REMOVE = 32;
-	const INDEX_DONE = 64;
-	const INDEX_FAILED = 128;
-
-	const ERROR_FAILED = 1;
-	const ERROR_FAILED2 = 2;
-	const ERROR_FAILED3 = 4;
-
-	const ERROR_SEV_1 = 1;
-	const ERROR_SEV_2 = 2;
-	const ERROR_SEV_3 = 3;
-	const ERROR_SEV_4 = 4;
+	public const INDEX_OK = 1;
+	public const INDEX_IGNORE = 2;
+
+	public const INDEX_META = 4;
+	public const INDEX_CONTENT = 8;
+	public const INDEX_PARTS = 16;
+	public const INDEX_FULL = 28;
+	public const INDEX_REMOVE = 32;
+	public const INDEX_DONE = 64;
+	public const INDEX_FAILED = 128;
+
+	public const ERROR_FAILED = 1;
+	public const ERROR_FAILED2 = 2;
+	public const ERROR_FAILED3 = 4;
+
+	public const ERROR_SEV_1 = 1;
+	public const ERROR_SEV_2 = 2;
+	public const ERROR_SEV_3 = 3;
+	public const ERROR_SEV_4 = 4;
 
 
 	/**
diff --git a/lib/public/FullTextSearch/Model/IIndexDocument.php b/lib/public/FullTextSearch/Model/IIndexDocument.php
index c7af11d74728f077cdae6223ee6eaff78ad8457a..1858e5dc97c91952a61bb8bd25ed89460f1a15da 100644
--- a/lib/public/FullTextSearch/Model/IIndexDocument.php
+++ b/lib/public/FullTextSearch/Model/IIndexDocument.php
@@ -43,8 +43,8 @@ namespace OCP\FullTextSearch\Model;
  * @package OC\FullTextSearch\Model
  */
 interface IIndexDocument {
-	const NOT_ENCODED = 0;
-	const ENCODED_BASE64 = 1;
+	public const NOT_ENCODED = 0;
+	public const ENCODED_BASE64 = 1;
 
 
 
diff --git a/lib/public/FullTextSearch/Model/IRunner.php b/lib/public/FullTextSearch/Model/IRunner.php
index 230e9932c46cbdb76505030f32f754c05c17fd8b..3692400d1dc2b4b16928ad91866d0a2b68a4473d 100644
--- a/lib/public/FullTextSearch/Model/IRunner.php
+++ b/lib/public/FullTextSearch/Model/IRunner.php
@@ -41,9 +41,9 @@ namespace OCP\FullTextSearch\Model;
  * @package OCP\FullTextSearch\Model
  */
 interface IRunner {
-	const RESULT_TYPE_SUCCESS = 1;
-	const RESULT_TYPE_WARNING = 4;
-	const RESULT_TYPE_FAIL = 9;
+	public const RESULT_TYPE_SUCCESS = 1;
+	public const RESULT_TYPE_WARNING = 4;
+	public const RESULT_TYPE_FAIL = 9;
 
 
 	/**
diff --git a/lib/public/FullTextSearch/Model/ISearchOption.php b/lib/public/FullTextSearch/Model/ISearchOption.php
index 7d57f9eb3f9bd8c92a93ef77872f3683057572bd..8e902296ff6afed9640f945042a0cf4cecd4551e 100644
--- a/lib/public/FullTextSearch/Model/ISearchOption.php
+++ b/lib/public/FullTextSearch/Model/ISearchOption.php
@@ -39,17 +39,17 @@ interface ISearchOption {
 	/**
 	 * @since 16.0.0
 	 */
-	const CHECKBOX = 'checkbox';
+	public const CHECKBOX = 'checkbox';
 
 	/**
 	 * @since 16.0.0
 	 */
-	const INPUT = 'input';
+	public const INPUT = 'input';
 
 	/**
 	 * @since 16.0.0
 	 */
-	const INPUT_SMALL = 'small';
+	public const INPUT_SMALL = 'small';
 
 
 	/**
diff --git a/lib/public/FullTextSearch/Model/ISearchRequestSimpleQuery.php b/lib/public/FullTextSearch/Model/ISearchRequestSimpleQuery.php
index f9ddde86a0db4741f704c39b2bf9bf4de9cf8b45..e0868c260c23a2fbf2d50d7592663616d7cff2e6 100644
--- a/lib/public/FullTextSearch/Model/ISearchRequestSimpleQuery.php
+++ b/lib/public/FullTextSearch/Model/ISearchRequestSimpleQuery.php
@@ -39,17 +39,17 @@ namespace OCP\FullTextSearch\Model;
  * @package OCP\FullTextSearch\Model
  */
 interface ISearchRequestSimpleQuery {
-	const COMPARE_TYPE_TEXT = 1;
-	const COMPARE_TYPE_KEYWORD = 2;
-	const COMPARE_TYPE_INT_EQ = 3;
-	const COMPARE_TYPE_INT_GTE = 4;
-	const COMPARE_TYPE_INT_GT = 5;
-	const COMPARE_TYPE_INT_LTE = 6;
-	const COMPARE_TYPE_INT_LT = 7;
-	const COMPARE_TYPE_BOOL = 8;
-	const COMPARE_TYPE_ARRAY = 9;
-	const COMPARE_TYPE_REGEX = 10;
-	const COMPARE_TYPE_WILDCARD = 11;
+	public const COMPARE_TYPE_TEXT = 1;
+	public const COMPARE_TYPE_KEYWORD = 2;
+	public const COMPARE_TYPE_INT_EQ = 3;
+	public const COMPARE_TYPE_INT_GTE = 4;
+	public const COMPARE_TYPE_INT_GT = 5;
+	public const COMPARE_TYPE_INT_LTE = 6;
+	public const COMPARE_TYPE_INT_LT = 7;
+	public const COMPARE_TYPE_BOOL = 8;
+	public const COMPARE_TYPE_ARRAY = 9;
+	public const COMPARE_TYPE_REGEX = 10;
+	public const COMPARE_TYPE_WILDCARD = 11;
 
 
 	/**
diff --git a/lib/public/GroupInterface.php b/lib/public/GroupInterface.php
index 8960a791b839e8e7b40b15f86d5dde1d2440c650..c01b53fcd974fa844b03cc158cbc06740ad8b9f1 100644
--- a/lib/public/GroupInterface.php
+++ b/lib/public/GroupInterface.php
@@ -47,18 +47,18 @@ interface GroupInterface {
 	/**
 	 * actions that user backends can define
 	 */
-	const CREATE_GROUP		= 0x00000001;
-	const DELETE_GROUP		= 0x00000010;
-	const ADD_TO_GROUP		= 0x00000100;
-	const REMOVE_FROM_GOUP	= 0x00001000; // oops
-	const REMOVE_FROM_GROUP	= 0x00001000;
+	public const CREATE_GROUP		= 0x00000001;
+	public const DELETE_GROUP		= 0x00000010;
+	public const ADD_TO_GROUP		= 0x00000100;
+	public const REMOVE_FROM_GOUP	= 0x00001000; // oops
+	public const REMOVE_FROM_GROUP	= 0x00001000;
 	//OBSOLETE const GET_DISPLAYNAME	= 0x00010000;
-	const COUNT_USERS		= 0x00100000;
-	const GROUP_DETAILS		= 0x01000000;
+	public const COUNT_USERS		= 0x00100000;
+	public const GROUP_DETAILS		= 0x01000000;
 	/**
 	 * @since 13.0.0
 	 */
-	const IS_ADMIN  = 0x10000000;
+	public const IS_ADMIN  = 0x10000000;
 
 	/**
 	 * Check if backend implements actions
diff --git a/lib/public/IConfig.php b/lib/public/IConfig.php
index a46dff322c50d555d9f71d3f773db212e951dc8c..780d32d22dda3374882672b3f17c6fa753712f64 100644
--- a/lib/public/IConfig.php
+++ b/lib/public/IConfig.php
@@ -46,7 +46,7 @@ interface IConfig {
 	/**
 	 * @since 8.2.0
 	 */
-	const SENSITIVE_VALUE = '***REMOVED SENSITIVE VALUE***';
+	public const SENSITIVE_VALUE = '***REMOVED SENSITIVE VALUE***';
 
 	/**
 	 * Sets and deletes system wide values
diff --git a/lib/public/IDBConnection.php b/lib/public/IDBConnection.php
index a8822ad7e5c9d20d4112a904f0f0644431871408..5e5543f10cf5524e885b54dc40fd598e3c72f119 100644
--- a/lib/public/IDBConnection.php
+++ b/lib/public/IDBConnection.php
@@ -49,10 +49,10 @@ use OCP\DB\QueryBuilder\IQueryBuilder;
  * @since 6.0.0
  */
 interface IDBConnection {
-	const ADD_MISSING_INDEXES_EVENT = self::class . '::ADD_MISSING_INDEXES';
-	const CHECK_MISSING_INDEXES_EVENT = self::class . '::CHECK_MISSING_INDEXES';
-	const ADD_MISSING_COLUMNS_EVENT = self::class . '::ADD_MISSING_COLUMNS';
-	const CHECK_MISSING_COLUMNS_EVENT = self::class . '::CHECK_MISSING_COLUMNS';
+	public const ADD_MISSING_INDEXES_EVENT = self::class . '::ADD_MISSING_INDEXES';
+	public const CHECK_MISSING_INDEXES_EVENT = self::class . '::CHECK_MISSING_INDEXES';
+	public const ADD_MISSING_COLUMNS_EVENT = self::class . '::ADD_MISSING_COLUMNS';
+	public const CHECK_MISSING_COLUMNS_EVENT = self::class . '::CHECK_MISSING_COLUMNS';
 
 	/**
 	 * Gets the QueryBuilder for the connection.
diff --git a/lib/public/ILogger.php b/lib/public/ILogger.php
index 878f795e1134c3a48de4608323cfe396244292ae..d7f326f1f6d35046dbd8c89135e6fc48459fcee7 100644
--- a/lib/public/ILogger.php
+++ b/lib/public/ILogger.php
@@ -43,23 +43,23 @@ interface ILogger {
 	/**
 	 * @since 14.0.0
 	 */
-	const DEBUG=0;
+	public const DEBUG=0;
 	/**
 	 * @since 14.0.0
 	 */
-	const INFO=1;
+	public const INFO=1;
 	/**
 	 * @since 14.0.0
 	 */
-	const WARN=2;
+	public const WARN=2;
 	/**
 	 * @since 14.0.0
 	 */
-	const ERROR=3;
+	public const ERROR=3;
 	/**
 	 * @since 14.0.0
 	 */
-	const FATAL=4;
+	public const FATAL=4;
 
 	/**
 	 * System is unusable.
diff --git a/lib/public/INavigationManager.php b/lib/public/INavigationManager.php
index 1e8e461341b932e4224716a08ee1fa4b539b7a22..0a5e1890f422a8cad33ac19c5fbaef3e45cfda67 100644
--- a/lib/public/INavigationManager.php
+++ b/lib/public/INavigationManager.php
@@ -47,19 +47,19 @@ interface INavigationManager {
 	 * Navigation entries of the app navigation
 	 * @since 16.0.0
 	 */
-	const TYPE_APPS = 'link';
+	public const TYPE_APPS = 'link';
 
 	/**
 	 * Navigation entries of the settings navigation
 	 * @since 16.0.0
 	 */
-	const TYPE_SETTINGS = 'settings';
+	public const TYPE_SETTINGS = 'settings';
 
 	/**
 	 * Navigation entries for public page footer navigation
 	 * @since 16.0.0
 	 */
-	const TYPE_GUEST = 'guest';
+	public const TYPE_GUEST = 'guest';
 
 	/**
 	 * Creates a new navigation entry
diff --git a/lib/public/IPreview.php b/lib/public/IPreview.php
index 164cbbac2bf9cd340fffa82ea00ec982a4ce8bd2..602a54bea2ea3b2f9abd4a4fc4fb7c79b5da8127 100644
--- a/lib/public/IPreview.php
+++ b/lib/public/IPreview.php
@@ -48,10 +48,10 @@ interface IPreview {
 	/**
 	 * @since 9.2.0
 	 */
-	const EVENT = self::class . ':' . 'PreviewRequested';
+	public const EVENT = self::class . ':' . 'PreviewRequested';
 
-	const MODE_FILL = 'fill';
-	const MODE_COVER = 'cover';
+	public const MODE_FILL = 'fill';
+	public const MODE_COVER = 'cover';
 
 	/**
 	 * In order to improve lazy loading a closure can be registered which will be
diff --git a/lib/public/IRequest.php b/lib/public/IRequest.php
index 05ba1055be37f04a4329952c48c457358c0a3617..bb646c078aabf45c82fa62227c1942a8ad1550ce 100644
--- a/lib/public/IRequest.php
+++ b/lib/public/IRequest.php
@@ -73,37 +73,37 @@ interface IRequest {
 	/**
 	 * @since 9.1.0
 	 */
-	const USER_AGENT_CLIENT_ANDROID = '/^Mozilla\/5\.0 \(Android\) (ownCloud|Nextcloud)\-android.*$/';
+	public const USER_AGENT_CLIENT_ANDROID = '/^Mozilla\/5\.0 \(Android\) (ownCloud|Nextcloud)\-android.*$/';
 
 	/**
 	 * @since 13.0.0
 	 */
-	const USER_AGENT_TALK_ANDROID = '/^Mozilla\/5\.0 \(Android\) Nextcloud\-Talk v.*$/';
+	public const USER_AGENT_TALK_ANDROID = '/^Mozilla\/5\.0 \(Android\) Nextcloud\-Talk v.*$/';
 
 	/**
 	 * @since 9.1.0
 	 */
-	const USER_AGENT_CLIENT_DESKTOP = '/^Mozilla\/5\.0 \([A-Za-z ]+\) (mirall|csyncoC)\/.*$/';
+	public const USER_AGENT_CLIENT_DESKTOP = '/^Mozilla\/5\.0 \([A-Za-z ]+\) (mirall|csyncoC)\/.*$/';
 
 	/**
 	 * @since 9.1.0
 	 */
-	const USER_AGENT_CLIENT_IOS = '/^Mozilla\/5\.0 \(iOS\) (ownCloud|Nextcloud)\-iOS.*$/';
+	public const USER_AGENT_CLIENT_IOS = '/^Mozilla\/5\.0 \(iOS\) (ownCloud|Nextcloud)\-iOS.*$/';
 
 	/**
 	 * @since 13.0.0
 	 */
-	const USER_AGENT_TALK_IOS = '/^Mozilla\/5\.0 \(iOS\) Nextcloud\-Talk v.*$/';
+	public const USER_AGENT_TALK_IOS = '/^Mozilla\/5\.0 \(iOS\) Nextcloud\-Talk v.*$/';
 
 	/**
 	 * @since 13.0.1
 	 */
-	const USER_AGENT_OUTLOOK_ADDON = '/^Mozilla\/5\.0 \([A-Za-z ]+\) Nextcloud\-Outlook v.*$/';
+	public const USER_AGENT_OUTLOOK_ADDON = '/^Mozilla\/5\.0 \([A-Za-z ]+\) Nextcloud\-Outlook v.*$/';
 
 	/**
 	 * @since 13.0.1
 	 */
-	const USER_AGENT_THUNDERBIRD_ADDON = '/^Mozilla\/5\.0 \([A-Za-z ]+\) Nextcloud\-Thunderbird v.*$/';
+	public const USER_AGENT_THUNDERBIRD_ADDON = '/^Mozilla\/5\.0 \([A-Za-z ]+\) Nextcloud\-Thunderbird v.*$/';
 
 	/**
 	 * @param string $name
diff --git a/lib/public/Lock/ILockingProvider.php b/lib/public/Lock/ILockingProvider.php
index 4403b09199398d1b154d29d2b53ae4934359dfea..373a68334a182e8812e620d4467b9c01562a6e1f 100644
--- a/lib/public/Lock/ILockingProvider.php
+++ b/lib/public/Lock/ILockingProvider.php
@@ -37,11 +37,11 @@ interface ILockingProvider {
 	/**
 	 * @since 8.1.0
 	 */
-	const LOCK_SHARED = 1;
+	public const LOCK_SHARED = 1;
 	/**
 	 * @since 8.1.0
 	 */
-	const LOCK_EXCLUSIVE = 2;
+	public const LOCK_EXCLUSIVE = 2;
 
 	/**
 	 * @param string $path
diff --git a/lib/public/Search/PagedProvider.php b/lib/public/Search/PagedProvider.php
index 17e8aef337c220bd417381a66fdf8b066d3d0f09..ee8d1b12508aea2bbbc2bac6c23e067029de0871 100644
--- a/lib/public/Search/PagedProvider.php
+++ b/lib/public/Search/PagedProvider.php
@@ -36,7 +36,7 @@ abstract class PagedProvider extends Provider {
 	 * show all results
 	 * @since 8.0.0
 	 */
-	const SIZE_ALL = 0;
+	public const SIZE_ALL = 0;
 
 	/**
 	 * Constructor
diff --git a/lib/public/Search/Provider.php b/lib/public/Search/Provider.php
index bc6f76a11c2b576b6616909639642dbef53f21bd..18594eefb8fe54f0a11557ea2250794a31211cbe 100644
--- a/lib/public/Search/Provider.php
+++ b/lib/public/Search/Provider.php
@@ -36,7 +36,7 @@ abstract class Provider {
 	/**
 	 * @since 8.0.0
 	 */
-	const OPTION_APPS = 'apps';
+	public const OPTION_APPS = 'apps';
 
 	/**
 	 * List of options
diff --git a/lib/public/Security/ISecureRandom.php b/lib/public/Security/ISecureRandom.php
index 956026bc9e361c09c7faed46a93236a56b07fe20..2268e91289a73b61f63baa03b6d8fa033db0a50f 100644
--- a/lib/public/Security/ISecureRandom.php
+++ b/lib/public/Security/ISecureRandom.php
@@ -44,17 +44,17 @@ interface ISecureRandom {
 	/**
 	 * Flags for characters that can be used for <code>generate($length, $characters)</code>
 	 */
-	const CHAR_UPPER = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ';
-	const CHAR_LOWER = 'abcdefghijklmnopqrstuvwxyz';
-	const CHAR_DIGITS = '0123456789';
-	const CHAR_SYMBOLS = '!\"#$%&\\\'()*+,-./:;<=>?@[\]^_`{|}~';
+	public const CHAR_UPPER = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ';
+	public const CHAR_LOWER = 'abcdefghijklmnopqrstuvwxyz';
+	public const CHAR_DIGITS = '0123456789';
+	public const CHAR_SYMBOLS = '!\"#$%&\\\'()*+,-./:;<=>?@[\]^_`{|}~';
 
 	/**
 	 * Characters that can be used for <code>generate($length, $characters)</code>, to
 	 * generate human readable random strings. Lower- and upper-case characters and digits
 	 * are included. Characters which are ambiguous are excluded, such as I, l, and 1 and so on.
 	 */
-	const CHAR_HUMAN_READABLE = 'abcdefgijkmnopqrstwxyzABCDEFGHJKLMNPQRSTWXYZ23456789';
+	public const CHAR_HUMAN_READABLE = 'abcdefgijkmnopqrstwxyzABCDEFGHJKLMNPQRSTWXYZ23456789';
 
 	/**
 	 * Generate a random string of specified length.
diff --git a/lib/public/Settings/IManager.php b/lib/public/Settings/IManager.php
index 5c7d07120805d139136016583862ac8f3fbfe261..c03c3d588b8fcb8b7ec905af0b7dd1f66d294822 100644
--- a/lib/public/Settings/IManager.php
+++ b/lib/public/Settings/IManager.php
@@ -33,22 +33,22 @@ interface IManager {
 	/**
 	 * @since 9.1.0
 	 */
-	const KEY_ADMIN_SETTINGS = 'admin';
+	public const KEY_ADMIN_SETTINGS = 'admin';
 
 	/**
 	 * @since 9.1.0
 	 */
-	const KEY_ADMIN_SECTION  = 'admin-section';
+	public const KEY_ADMIN_SECTION  = 'admin-section';
 
 	/**
 	 * @since 13.0.0
 	 */
-	const KEY_PERSONAL_SETTINGS = 'personal';
+	public const KEY_PERSONAL_SETTINGS = 'personal';
 
 	/**
 	 * @since 13.0.0
 	 */
-	const KEY_PERSONAL_SECTION  = 'personal-section';
+	public const KEY_PERSONAL_SECTION  = 'personal-section';
 
 	/**
 	 * @param string $type 'admin' or 'personal'
diff --git a/lib/public/SystemTag/ManagerEvent.php b/lib/public/SystemTag/ManagerEvent.php
index 290d4f4c129dfcf86295b42a04e8f7dc1cdb7e1a..816a7585dfca8abb8756438c44842c72a380e88d 100644
--- a/lib/public/SystemTag/ManagerEvent.php
+++ b/lib/public/SystemTag/ManagerEvent.php
@@ -37,9 +37,9 @@ use OCP\EventDispatcher\Event;
  * @since 9.0.0
  */
 class ManagerEvent extends Event {
-	const EVENT_CREATE = 'OCP\SystemTag\ISystemTagManager::createTag';
-	const EVENT_UPDATE = 'OCP\SystemTag\ISystemTagManager::updateTag';
-	const EVENT_DELETE = 'OCP\SystemTag\ISystemTagManager::deleteTag';
+	public const EVENT_CREATE = 'OCP\SystemTag\ISystemTagManager::createTag';
+	public const EVENT_UPDATE = 'OCP\SystemTag\ISystemTagManager::updateTag';
+	public const EVENT_DELETE = 'OCP\SystemTag\ISystemTagManager::deleteTag';
 
 	/** @var string */
 	protected $event;
diff --git a/lib/public/SystemTag/MapperEvent.php b/lib/public/SystemTag/MapperEvent.php
index 38268fed1daee5b6f18590c2c321638d6be46951..a8f04742e900a26069dc946faaa7e3f71cf6c65f 100644
--- a/lib/public/SystemTag/MapperEvent.php
+++ b/lib/public/SystemTag/MapperEvent.php
@@ -36,8 +36,8 @@ use OCP\EventDispatcher\Event;
  * @since 9.0.0
  */
 class MapperEvent extends Event {
-	const EVENT_ASSIGN = 'OCP\SystemTag\ISystemTagObjectMapper::assignTags';
-	const EVENT_UNASSIGN = 'OCP\SystemTag\ISystemTagObjectMapper::unassignTags';
+	public const EVENT_ASSIGN = 'OCP\SystemTag\ISystemTagObjectMapper::assignTags';
+	public const EVENT_UNASSIGN = 'OCP\SystemTag\ISystemTagObjectMapper::unassignTags';
 
 	/** @var string */
 	protected $event;
diff --git a/lib/public/SystemTag/SystemTagsEntityEvent.php b/lib/public/SystemTag/SystemTagsEntityEvent.php
index 011f7d09fc0e644518511aa74442535ea7596ac5..ae49323507bb45b3704c70ebd52695b49713c4d3 100644
--- a/lib/public/SystemTag/SystemTagsEntityEvent.php
+++ b/lib/public/SystemTag/SystemTagsEntityEvent.php
@@ -36,7 +36,7 @@ use OCP\EventDispatcher\Event;
  * @since 9.1.0
  */
 class SystemTagsEntityEvent extends Event {
-	const EVENT_ENTITY = 'OCP\SystemTag\ISystemTagManager::registerEntity';
+	public const EVENT_ENTITY = 'OCP\SystemTag\ISystemTagManager::registerEntity';
 
 	/** @var string */
 	protected $event;
diff --git a/lib/public/Util.php b/lib/public/Util.php
index 5e805af4c40b7827c062804381d244e4d87933bb..72f061afb459c16b7a658fc21928527c7c104e8c 100644
--- a/lib/public/Util.php
+++ b/lib/public/Util.php
@@ -60,23 +60,23 @@ class Util {
 	/**
 	 * @deprecated 14.0.0 use \OCP\ILogger::DEBUG
 	 */
-	const DEBUG=0;
+	public const DEBUG=0;
 	/**
 	 * @deprecated 14.0.0 use \OCP\ILogger::INFO
 	 */
-	const INFO=1;
+	public const INFO=1;
 	/**
 	 * @deprecated 14.0.0 use \OCP\ILogger::WARN
 	 */
-	const WARN=2;
+	public const WARN=2;
 	/**
 	 * @deprecated 14.0.0 use \OCP\ILogger::ERROR
 	 */
-	const ERROR=3;
+	public const ERROR=3;
 	/**
 	 * @deprecated 14.0.0 use \OCP\ILogger::FATAL
 	 */
-	const FATAL=4;
+	public const FATAL=4;
 
 	/** \OCP\Share\IManager */
 	private static $shareManager;
diff --git a/lib/public/WorkflowEngine/IManager.php b/lib/public/WorkflowEngine/IManager.php
index b9ce157c222c08a78a8a2e42d520de9915785f35..6537666ce08ed769803b2ee7f73227db1c3e81d3 100644
--- a/lib/public/WorkflowEngine/IManager.php
+++ b/lib/public/WorkflowEngine/IManager.php
@@ -32,15 +32,15 @@ namespace OCP\WorkflowEngine;
  * @since 9.1
  */
 interface IManager {
-	const SCOPE_ADMIN = 0;
-	const SCOPE_USER = 1;
+	public const SCOPE_ADMIN = 0;
+	public const SCOPE_USER = 1;
 
 	/**
 	 * @depreacted Will be removed in NC19. Use the dedicated events in OCP\WorkflowEngine\Events
 	 */
-	const EVENT_NAME_REG_OPERATION = 'OCP\WorkflowEngine::registerOperations';
-	const EVENT_NAME_REG_ENTITY = 'OCP\WorkflowEngine::registerEntities';
-	const EVENT_NAME_REG_CHECK = 'OCP\WorkflowEngine::registerChecks';
+	public const EVENT_NAME_REG_OPERATION = 'OCP\WorkflowEngine::registerOperations';
+	public const EVENT_NAME_REG_ENTITY = 'OCP\WorkflowEngine::registerEntities';
+	public const EVENT_NAME_REG_CHECK = 'OCP\WorkflowEngine::registerChecks';
 
 	/**
 	 * Listen to `OCP\WorkflowEngine\Events\RegisterEntitiesEvent` at the
diff --git a/tests/Core/Controller/SvgControllerTest.php b/tests/Core/Controller/SvgControllerTest.php
index 684199f5cb6b80850764ba023cd7a55dc90f6206..76d04d1af32ca94cf2384131a51084949f0a6891 100644
--- a/tests/Core/Controller/SvgControllerTest.php
+++ b/tests/Core/Controller/SvgControllerTest.php
@@ -37,11 +37,11 @@ use Test\TestCase;
  * This class provides test cases for the svg controller
  */
 class SvgControllerTest extends TestCase {
-	const TEST_IMAGES_SOURCE_PATH = __DIR__ . '/../../data/svg';
-	const TEST_IMAGES_PATH = __DIR__ . '/../../../core/img/testImages';
-	const TEST_IMAGE_MIXED = 'mixed-source.svg';
-	const TEST_IMAGE_RECT = 'rect-black.svg';
-	const TEST_IMAGES = [
+	public const TEST_IMAGES_SOURCE_PATH = __DIR__ . '/../../data/svg';
+	public const TEST_IMAGES_PATH = __DIR__ . '/../../../core/img/testImages';
+	public const TEST_IMAGE_MIXED = 'mixed-source.svg';
+	public const TEST_IMAGE_RECT = 'rect-black.svg';
+	public const TEST_IMAGES = [
 		self::TEST_IMAGE_MIXED,
 		self::TEST_IMAGE_RECT,
 	];
diff --git a/tests/lib/AppTest.php b/tests/lib/AppTest.php
index a53e3f8e252cd3c9d6a7f30e276bb45e1dca8a9d..7ada4ec746a47fc8fabb4f30d776bebd58e9f355 100644
--- a/tests/lib/AppTest.php
+++ b/tests/lib/AppTest.php
@@ -20,11 +20,11 @@ use OCP\IAppConfig;
  * @group DB
  */
 class AppTest extends \Test\TestCase {
-	const TEST_USER1 = 'user1';
-	const TEST_USER2 = 'user2';
-	const TEST_USER3 = 'user3';
-	const TEST_GROUP1 = 'group1';
-	const TEST_GROUP2 = 'group2';
+	public const TEST_USER1 = 'user1';
+	public const TEST_USER2 = 'user2';
+	public const TEST_USER3 = 'user3';
+	public const TEST_GROUP1 = 'group1';
+	public const TEST_GROUP2 = 'group2';
 
 	public function appVersionsProvider() {
 		return [
diff --git a/tests/lib/ConfigTest.php b/tests/lib/ConfigTest.php
index d5e8bd28bb30870444672d9f5461731cd67174ef..aa6c50528cc199b8b5af6583d8ab53e4895fe543 100644
--- a/tests/lib/ConfigTest.php
+++ b/tests/lib/ConfigTest.php
@@ -9,7 +9,7 @@
 namespace Test;
 
 class ConfigTest extends TestCase {
-	const TESTCONTENT = '<?php $CONFIG=array("foo"=>"bar", "beers" => array("Appenzeller", "Guinness", "Kölsch"), "alcohol_free" => false);';
+	public const TESTCONTENT = '<?php $CONFIG=array("foo"=>"bar", "beers" => array("Appenzeller", "Guinness", "Kölsch"), "alcohol_free" => false);';
 
 	/** @var array */
 	private $initialConfig = ['foo' => 'bar', 'beers' => ['Appenzeller', 'Guinness', 'Kölsch'], 'alcohol_free' => false];
diff --git a/tests/lib/Files/FilesystemTest.php b/tests/lib/Files/FilesystemTest.php
index 9fc3032fa28d3f03f0cfea41871673c375206176..d9e6de898f06c4f13d03ccab3ab76d4700a69e06 100644
--- a/tests/lib/Files/FilesystemTest.php
+++ b/tests/lib/Files/FilesystemTest.php
@@ -59,8 +59,8 @@ class DummyMountProvider implements IMountProvider {
  * @package Test\Files
  */
 class FilesystemTest extends \Test\TestCase {
-	const TEST_FILESYSTEM_USER1 = "test-filesystem-user1";
-	const TEST_FILESYSTEM_USER2 = "test-filesystem-user1";
+	public const TEST_FILESYSTEM_USER1 = "test-filesystem-user1";
+	public const TEST_FILESYSTEM_USER2 = "test-filesystem-user1";
 
 	/**
 	 * @var array tmpDirs
diff --git a/tests/lib/Files/Storage/Wrapper/EncodingTest.php b/tests/lib/Files/Storage/Wrapper/EncodingTest.php
index 1f199239a8e8b844d9434675373ef18b080b1807..498d9f7824811bac00dbb4ea2a6893333f16877a 100644
--- a/tests/lib/Files/Storage/Wrapper/EncodingTest.php
+++ b/tests/lib/Files/Storage/Wrapper/EncodingTest.php
@@ -9,8 +9,8 @@
 namespace Test\Files\Storage\Wrapper;
 
 class EncodingTest extends \Test\Files\Storage\Storage {
-	const NFD_NAME = 'ümlaut';
-	const NFC_NAME = 'ümlaut';
+	public const NFD_NAME = 'ümlaut';
+	public const NFC_NAME = 'ümlaut';
 
 	/**
 	 * @var \OC\Files\Storage\Temporary
diff --git a/tests/lib/Memcache/FactoryTest.php b/tests/lib/Memcache/FactoryTest.php
index cf4da7839c437584a07c72e4b9cb8c2cdd4a6e81..19edf4aa3dd8faec4b054f261289a383461c1c2c 100644
--- a/tests/lib/Memcache/FactoryTest.php
+++ b/tests/lib/Memcache/FactoryTest.php
@@ -61,10 +61,10 @@ class Test_Factory_Unavailable_Cache2 extends NullCache {
 }
 
 class FactoryTest extends \Test\TestCase {
-	const AVAILABLE1 = '\\Test\\Memcache\\Test_Factory_Available_Cache1';
-	const AVAILABLE2 = '\\Test\\Memcache\\Test_Factory_Available_Cache2';
-	const UNAVAILABLE1 = '\\Test\\Memcache\\Test_Factory_Unavailable_Cache1';
-	const UNAVAILABLE2 = '\\Test\\Memcache\\Test_Factory_Unavailable_Cache2';
+	public const AVAILABLE1 = '\\Test\\Memcache\\Test_Factory_Available_Cache1';
+	public const AVAILABLE2 = '\\Test\\Memcache\\Test_Factory_Available_Cache2';
+	public const UNAVAILABLE1 = '\\Test\\Memcache\\Test_Factory_Unavailable_Cache1';
+	public const UNAVAILABLE2 = '\\Test\\Memcache\\Test_Factory_Unavailable_Cache2';
 
 	public function cacheAvailabilityProvider() {
 		return [
diff --git a/tests/lib/Share/Backend.php b/tests/lib/Share/Backend.php
index 661da326e4c3d0e2bcbc0321d007eaba9dbee8cb..18443a4e2478d4a924947a3191020518a3dd8689 100644
--- a/tests/lib/Share/Backend.php
+++ b/tests/lib/Share/Backend.php
@@ -22,9 +22,9 @@
 namespace Test\Share;
 
 class Backend implements \OCP\Share_Backend {
-	const FORMAT_SOURCE = 0;
-	const FORMAT_TARGET = 1;
-	const FORMAT_PERMISSIONS = 2;
+	public const FORMAT_SOURCE = 0;
+	public const FORMAT_TARGET = 1;
+	public const FORMAT_PERMISSIONS = 2;
 
 	private $testItem1 = 'test.txt';
 	private $testItem2 = 'share.txt';