From 85cbb60fe77bb0d200ec9c637f86f5e5f092c606 Mon Sep 17 00:00:00 2001 From: Carl Schwan Date: Tue, 11 Aug 2026 11:43:24 +0200 Subject: [PATCH] feat: document change to dbal wrapper Signed-off-by: Carl Schwan --- .../release_notes/critical_changes.rst | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/developer_manual/release_notes/critical_changes.rst b/developer_manual/release_notes/critical_changes.rst index db91d82ed6e..a60388e2c4f 100644 --- a/developer_manual/release_notes/critical_changes.rst +++ b/developer_manual/release_notes/critical_changes.rst @@ -85,7 +85,7 @@ they have been deprecated since Nextcloud 17 and scheduled for removal since Nex - ``oc_appswebroots`` use ``OC.appswebroots`` instead - ``oc_config`` use ``OC.config`` instead - ``oc_current_user`` use ``OC.getCurrentUser().uid`` instead -- ``oc_debug`` use ``OC.debug`` instead +- ``oc_debug`` use ``OC.debug`` instead8 - ``oc_defaults`` use ``OC.theme`` instead - ``oc_isadmin`` use ``OC.isUserAdmin()`` instead - ``oc_requesttoken`` use ``OC.requestToken`` instead @@ -95,6 +95,23 @@ they have been deprecated since Nextcloud 17 and scheduled for removal since Nex Please keep in mind that ``OC`` is considered a private namespace for which our stability rules do not fully apply. Its recommended to use the :ref:`Nextcloud frontend libraries` instead if possible. +Modified back-end APIs +---------------------- + +Nextcloud now provides a wrapper for the DBAL/migration classes from ``doctrine/dbal``. This will allow +us in the future to more easily update this dependency without breaking your applications and make it +easier for the static analyser to analyse this part of your code without providing stubs. + +There are a few hard breaking changes: + +- ``Type::lookupName($column->getType())`` will have to be replaced with ``$column->getType()->getName()`` +- Methods taking a ``Doctrine\DBAL`` classes, will have to be changed to take a ``OCP\DB\Schema`` instead + +Additionally, some part of the public API were removed and are now only available in the private API for runtime compatibility reason. + +- ``Column->setOptions(array $options)`` is no longer available in the public API and you will have to use the typed setters instead like ``Column->setLength`` +- ``Column->setType(DBAL\Type $type)`` is no longer available in the public API and you will have to provide one of the constants available in ``\OCP\DB\Types`` instead. + Removed back-end APIs ---------------------