Frequently Answered Questions about Joomla 4 for extension developers

Here you can contact the editors of our Extensions site, as well as access infomation relating to this site.

Moderator: JED Team

Forum rules
Forum Rules
READ ME <-- please read before posting, this means YOU.
Post Reply
User avatar
anibal_sanchez
Joomla! Explorer
Joomla! Explorer
Posts: 437
Joined: Sat Mar 17, 2012 3:01 pm
Location: Oviedo, Asturias, Spain
Contact:

Frequently Answered Questions about Joomla 4 for extension developers

Post by anibal_sanchez » Sun May 31, 2020 1:41 pm

This Joomla 4 FAQ for extensions developers is a draft, and we are still collecting the questions. TBD questions are "To Be Defined".

This FAQ is coordinated by the JED Team here: https://github.com/joomla/jed-issues/wi ... t-Joomla-4. Feel free to send us more questions or answers.

A huge Thank You to our volunteers! This is the current Joomla 4 Beta: https://github.com/joomla/joomla-cms/re ... 4.0.0-beta

MAIN QUESTIONS

When Joomla 4 is going be available? When do I have to migrate?

Joomla 4 stable is probably going to be released at the end of 2020. The Beta versions will help to test and plan the process. Please, join the effort, download the Beta, test it and report the issues that you find.

After the release, the last version of Joomla 3.10.x will be supported for two years. Joomla 3.10 will be supported until 2023. So, you can adopt Joomla 4 between 2021 and 2023.

The most up-to-date information regarding this timeline can be found in our project roadmap https://developer.joomla.org/roadmap.html.

Are the extensions for Joomla 3.10 going to work on Joomla 4

Joomla 4 is a major version; it is coming with new features, improvements and deprecations.

Joomla 3.10 is going to be the final version in the 3.x line, and it is going to have a compatibility layer; so, it is the closest version to be ready for the change. The change implies that every part of the installation must be checked before the migration to avoid any surprise. All extension developers must publish updated extensions for Joomla 4.

Which are the Potential backward compatibility issues in Joomla 4?

This article is the official reference of Potential backward compatibility issues in Joomla 4: https://docs.joomla.org/Potential_backw ... n_Joomla_4

On top of the Potential backward compatibility issues, the biggest changeis the new templates based on Bootstrap 4 and other modern front-end tools.

What is Joomla 3.10 compatibility layer?

Joomla 3.10 and Joomla 4 will come with a compatibility layer to easy the transition to Joomla 4. The compatibility layer will be removed on Joomla 5.

For instance, the J-Classes are aliases to the new namespaced classes. `JRegistry` => `\Joomla\Registry\Registry`.

What is the Joomla 3.10 and the Update Checker?

The Update Checker is an extension that will be included on Joomla 3.10 to confirm if:

- The hosting meets the minimum requirements of Joomla 4.x, and
- The installed extensions that use the Update Server have versions compatible with Joomla 4.

For more information:
Does Joomla 4 have a compatibility layer for Bootstrap 2.3?

No. All extensions must drop the use of Bootstrap 2.3 in the migration to Joomla 4.

ABOUT THE FRONT-END DEVELOPMENT

Are Page Builders compatible with Joomla 4?

The Page Builders are regular extensions. So, each extension author must define how the page builder will support Joomla 4. In theory, the Page Builder could ease the transition between Joomla and Bootstrap versions. However, it is not clear yet if the page builder could migration via an automatic process or if the pages would have to be rebuilt.

Are extensions encouraged to be Framework Agnostic?

That would be ideal but supporting the core backend template, and core front-end template should be a good start. As for the front-end, it would be similar to now.

What have changed on the front-end? Bootstrap? jQuery?

Joomla 4 comes by default with Bootstrap 4 and plain JavaScript scripts. Joomla 4 includes jQuery for backwards compatibility and BS4 compatibility. jQuery is not used at Joomla 4 core level.

Is it defined that Joomla 5 will come with Bootstrap 5?

No. There are no plans about the Framework to be used in Joomla 5 yet.

How does the core team build the front-end files? What has changed?

TBD

ABOUT THE DATABASE CHANGES

Will Joomla be "NULL date defaults" going forward everywhere?

Yes. This is what is defined in Potential backward compatibility issues in Joomla 4.

Strict mode has been enabled. The following flags are now active by default in Joomla 4 and you may have to update your database queries accordingly. This will help us with future MySQL version upgrades and also aligns more closely with Postgres to enable easier compatibility with queries in both languages.

Code: Select all

'STRICT_TRANS_TABLES',
'ERROR_FOR_DIVISION_BY_ZERO',
'NO_AUTO_CREATE_USER',
'NO_ENGINE_SUBSTITUTION',
Will the Joomla 3 to Joomla 4 Updater convert all of the core tables to use "NULL date defaults"?

The Joomla 4 Updater will handle the change of "NULL date defaults" to the new schema of Joomla 4 core tables. Please, note that the way of how NULL values are managed changes.

These are the upcoming changes:

1. The 0000-Null conversion
1. The Null-Mandatory field type conversion, fields that are null on J3 and now they are Mandatory.

For instance, check the following table of field changes:

J3 Table | J3 Field name | J3 Field type | => |J4 Table | J4 Field name | J4 Field type
---------|----------|---------|---------|---------|---------|---------
User | registerDate | datetime No 0000-00-00 00:00:00 | => |User | registerDate | datetime No None
User | lastvisitDate | datetime No 0000-00-00 00:00:00 | => |User | lastvisitDate | datetime Yes NULL
Content | created | datetime No 0000-00-00 00:00:00 | => |Content | created | datetime No None
Content | modified | datetime No 0000-00-00 00:00:00 | => |User | registerDate | modified datetime No None

Please, check the following PR for the Weblinks extension: Fix default value for datetime columns and make some nullable to adapt to CMS 4.0-dev and remove sqlsrv

Will older extensions that still use the "0000-00-00 date defaults" will break?

It depends.

The core upgrade is going to convert only the core tables, and the core upgrade isn't going to convert schema or content for tables which belong to 3rd-party extensions.

The 3rd-party extension upgrade for Joomla 4 can convert the tables to NULL dates. The extensions will continue to work if using the API for writing into core tables in the right way.

Will the Update Checker check all tables for invalid date defaults?

No, the Update Checker checks the hosting support for Joomla 4 and the availability of extensions for Joomla 4. It will not check individually the tables, only the availability of extensions versions for Joomla 4. Indirectly, the result will be the same.

ABOUT PHP NAMESPACES AND AUTOLOADERS

Is the namespacing of extensions mandatory or recommended on Joomla 4?

It is recommended. The use of namespaces will be mandatory for Joomla 5.

Can we use still use the current J classes and J helpers in Joomla 4? For instance, JText

Yes. Please, take into account that the J-Classes will be removed on Joomla 5.

Is mandatory the use of namespaces in Joomla 4?

No

Can an extension without namespaces run on Joomla 4?

Yes

Is Joomla 4 organized by PSR4 autoloading?

Yes, the core extensions have a new `src` folder following the PSR4 namespace organization. However, the autoloader is not driven by a `composer.json` file.

Ref: [PSR-4: Autoloader](https://www.php-fig.org/psr/psr-4/)

Do the legacy autoloaders (`jimport` and `JLoader`) work in Joomla 4?

Yes

Is Joomla 4 compatible with Composer and Packagist libraries?

Yes, an extension can be developed with Composer libraries, using PSR0, PSR2 or PSR4. Take into account that name and versions collisions can occur between extensions, so techniques to avoid conflicts must be implemened.

What is going to be deprecated on Joomla 5?

Please, check the list of classes that will be deprecated in `libraries/classmap.php`.

How many autoloaders are active in Joomla 4 by default?

TDB

ABOUT THE EXTENSION DEVELOPMENT

Does Joomla 4 support MySQL 8 and prepared statements?

Yes

Will Joomla 4 support PHP 8 at the end of 2020?

Yes

Is there a new recommended extension directory organization?

Yes, this is the new extension organization:

- forms
- helpers
- src
-- Controller
-- Dispatcher
-- Helper
-- Model
-- Service
-- View
- tmpl

Can an extension follow the Joomla 3 extension organization?

Yes

What are the official reference extensions for Joomla 4?
Is there a new priority of view overrides?

TBD. Reference: https://docs.joomla.org/Understanding_Output_Overrides

What are the services and providers in Joomla 4?

TBD

Does Joomla 4 have Container?

TDB

Does Joomla 4 have Dependency Injection?

TDB

ABOUT THE SECURITY FEATURES

What is Joomla 4.0 Content Security Policy (CSP)'s?

Tobias talked about Content Security Policy (CSP) yesterday at JAB 2020. We'll link the video

How to securely use the Joomla secret

TBD

Best Regards
@anibal_sanchez - http://blog.anibalhsanchez.com

JED Team Leader

 
 
Post Reply

Return to “extensions.joomla.org - Feedback/Information”