J3.x:Joomla 3.10 Backports
From Joomla! Documentation
This document tracks backports implemented in 3.10 to have a better integration for extension developers with Joomla! 4.
Add support for non prefixed language files
This PR adds support for non prefixed language files to Joomla 3.10. This means you can now use prefixed as well as non-prefixed language files the same as you can do that in 4.0.
Example (prefixed language files)
Example (non-prefixed language files)
Switcher field transition
With 4.0 a new layout for the radio button has been implemented. With this change in 3.10 we backported the layoutfile, while keeping the original layout, so you can use the same layout definition (`layout="joomla.form.field.radio.switcher"`) in 3.10 and 4.x
<field name="switchertest" type="radio" label="switcher test" class="btn-group btn-group-yesno" layout="joomla.form.field.radio.switcher" default="1" > <option value="1">JYES</option> <option value="0">JNO</option> </field>
Backport Categories Classes
With the changes from that PR you now can use the same classnames in 3.10 and 4.x. An example how to use it can be found here: https://github.com/joomla/joomla-cms/pull/30346#issuecomment-685424752
Table _supportNullValue handling
With that change to the Joomla\CMS\Table class you can use the `$_supportNullValue` option from 4.x to indicate that the columns fully support the NULL value in the database.
Preparing 3.10 for 4.0 content versioning
This PR backports a few classes that would be necessary to implement versioning of content items in the same code for extensions in 3.x and 4.0. To support both 3.x-style and 4.0-style versioning, you'd have to implement the 3.x-style first. To get 4.0-style working, simply let your table class implement the interface VersionableTableInterface (and the method that that defines) and let your item controller and model use the respective Versionable trait. In 3.x, these traits are empty, in 4.0 they contain all the logic necessary for versioning.