Skip to content

Commit 85cbb60

Browse files
committed
feat: document change to dbal wrapper
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
1 parent 20a10ac commit 85cbb60

1 file changed

Lines changed: 18 additions & 1 deletion

File tree

developer_manual/release_notes/critical_changes.rst

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ they have been deprecated since Nextcloud 17 and scheduled for removal since Nex
8585
- ``oc_appswebroots`` use ``OC.appswebroots`` instead
8686
- ``oc_config`` use ``OC.config`` instead
8787
- ``oc_current_user`` use ``OC.getCurrentUser().uid`` instead
88-
- ``oc_debug`` use ``OC.debug`` instead
88+
- ``oc_debug`` use ``OC.debug`` instead8
8989
- ``oc_defaults`` use ``OC.theme`` instead
9090
- ``oc_isadmin`` use ``OC.isUserAdmin()`` instead
9191
- ``oc_requesttoken`` use ``OC.requestToken`` instead
@@ -95,6 +95,23 @@ they have been deprecated since Nextcloud 17 and scheduled for removal since Nex
9595
Please keep in mind that ``OC`` is considered a private namespace for which our stability rules do not fully apply.
9696
Its recommended to use the :ref:`Nextcloud frontend libraries<js-libraries>` instead if possible.
9797

98+
Modified back-end APIs
99+
----------------------
100+
101+
Nextcloud now provides a wrapper for the DBAL/migration classes from ``doctrine/dbal``. This will allow
102+
us in the future to more easily update this dependency without breaking your applications and make it
103+
easier for the static analyser to analyse this part of your code without providing stubs.
104+
105+
There are a few hard breaking changes:
106+
107+
- ``Type::lookupName($column->getType())`` will have to be replaced with ``$column->getType()->getName()``
108+
- Methods taking a ``Doctrine\DBAL`` classes, will have to be changed to take a ``OCP\DB\Schema`` instead
109+
110+
Additionally, some part of the public API were removed and are now only available in the private API for runtime compatibility reason.
111+
112+
- ``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``
113+
- ``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.
114+
98115
Removed back-end APIs
99116
---------------------
100117

0 commit comments

Comments
 (0)