Skip to content

Commit 890d25e

Browse files
authored
migrations/54-60/compat-plugin update (#548)
* migrations/54-60/compat-plugin update Update is caused by [joomla-cms/pull/46324](joomla/joomla-cms#46324) which links to `migrations/54-60/compat-plugin`. * Removed four times 'not been released yet' as Joomla 6.0 is released * Changes title from singular to plural, but not the file name, as it used as link in the PR above. * Rewritten the main content (the two b/c plugins) from Joomla 6 view. * Named exactly 'Behaviour - Backward Compatibility 6', as we have also 'Behaviour - Backward Compatibility' plugin. * Moved DEVELOPER NOTE to the end, as it is a secondary information. * Added list of PRs for the 'Behaviour - Backward Compatibility 6'. * Is this list complete? * Is the list useful? * Added a note for NEW INSTALLATION as we saw the question multiple times, even it is not direct related to the migration. * Merged the given infos from the three deleted and to b/c plugin moved functionality into 'Removed and Backward Incompatibility' and linked this page. * Is the merge correct? * Line breaks at 120 chars. * Fixing "during the upgrade process" * Fixed link
1 parent a3a3937 commit 890d25e

File tree

4 files changed

+69
-63
lines changed

4 files changed

+69
-63
lines changed

migrations/54-60/compat-plugin.md

Lines changed: 41 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -2,56 +2,55 @@
22
sidebar_position: 5
33
---
44

5-
Compatibility Plugin
6-
====================
7-
8-
:::tip[Developer Note]
9-
Since this version of Joomla has not been released yet, this page can change anytime.
10-
:::
11-
12-
:::warning[Developer Note]
13-
Heads-up, don't create a plugin as `behaviour` plugin because it's possible that this group get removed at some point.
14-
:::
15-
16-
## Joomla 5 Compatibility Plugin
17-
18-
As part of Joomla! 5.0 a plugin was introduced which enhance backward compatibility between Joomla 5 and 4.
19-
Please check the [Backward Compatibility Plugin](https://manual.joomla.org/migrations/44-50/compat-plugin.md) for more details.
20-
21-
For more detail check [Compatibility Plugin Joomla! 5.0](https://manual.joomla.org/migrations/44-50/compat-plugin).
5+
Compatibility Plugins
6+
=====================
227

238
## Joomla 6 Compatibility Plugin
249

25-
In Joomla! 6.0 the Compatibility Plugin introduced in Joomla! 5.0 will be replaced by a new plugin
26-
called "Behaviour - Backward Compatibility 6".
10+
The **‘Behaviour – Backward Compatibility 6’** plugin is essential for the migration from Joomla! 5.4 to 6.x.
11+
12+
In Joomla 5.4, this plugin is installed and enabled by default, but it does not perform any actions.
13+
Its presence ensures that when the site is upgraded to Joomla 6, the updated code can run immediately,
14+
and any third-party extensions requiring the plugin to be enabled in Joomla 6 will not cause the update to fail.
2715

28-
Despite the warning about the potential removal of the `behaviour` plugin type, this compatibility plugin still uses
29-
this type to ensure it loads before any other plugin, as this is critical for backward compatibility functionality.
16+
As a `behaviour`-type plugin, it loads before any other plugin —
17+
a critical requirement for ensuring backward compatibility.
3018

31-
### CMS BaseApplication and CLI Classes
19+
For upgrades from Joomla! 5.4 to Joomla! 6.x, it is mandatory that this plugin is both installed and enabled.
20+
To review which backward compatibility cases have been removed, see
21+
[Removed and Backward Incompatibility](../removed-backward-incompatibility).
3222

33-
- PR's:
34-
- https://github.com/joomla/joomla-cms/pull/42884
35-
- https://github.com/joomla/joomla-cms/pull/44926
36-
- Description: Any reference to the class `\Joomla\CMS\Application\BaseApplication` and `\Joomla\CMS\Application\CliApplication` with the respective CLI input classes should be replaced with the namespace `\Joomla\Application`. Cli apps should be replaced by console plugins.
23+
:::tip NEW INSTALLATIONS
24+
For new Joomla! 6.0 installations, the **‘Behaviour – Backward Compatibility 6’**
25+
plugin is installed but disabled by default.
26+
:::
3727

38-
### `JPATH_PLATFORM` Constant
28+
Related PRs are:
29+
* [45336](https://github.com/joomla/joomla-cms/pull/45336)
30+
Introduce Joomla 6.0 compatibility plugin
31+
* [45371](https://github.com/joomla/joomla-cms/pull/45371)
32+
Add compat6 behaviour plugin to 5.4 so it is available and enabled when updating to 6.x.
33+
* [45480](https://github.com/joomla/joomla-cms/pull/45480)
34+
Introduce Joomla 6.0 compatibility plugin
35+
* [45493](https://github.com/joomla/joomla-cms/pull/45493)
36+
Add pre-update checks for backward compatibility plugins for update to Joomla 6
37+
* [45525](https://github.com/joomla/joomla-cms/pull/45525)
38+
Add compat6 behaviour plugin to 5.4 with enabled options
39+
* [45973](https://github.com/joomla/joomla-cms/pull/45973)
40+
Don't insert duplicate records in update SQL scripts when they are executed multiple times
41+
42+
:::warning DEVELOPER NOTE
43+
Avoid creating your own plugin within the *Behaviour* group, as this group may be removed in a future release.
44+
:::
3945

40-
- PR: https://github.com/joomla/joomla-cms/pull/44638
41-
- File: All bootstrapping files
42-
- Description: The `JPATH_PLATFORM` is an old constant and should not be used if the Joomla core got correctly bootstrapped. Change your checks to `_JEXEC`
43-
```php
44-
// Old:
45-
\defined('JPATH_PLATFORM') or die;
46+
## Joomla 5 Compatibility Plugin
4647

47-
// New:
48-
\defined('_JEXEC') or die;
49-
```
48+
Introduced in Joomla! 5.0, the **‘Behaviour – Backward Compatibility’**
49+
plugin improves compatibility between Joomla 5 and 4.
5050

51-
### CMS Input Package
51+
When upgrading from Joomla! 5.4 to Joomla! 6.x, this plugin must be disabled before starting the upgrade.
52+
If the site fails to load after disabling it in Joomla 5.4, simply re-enable the plugin to restore functionality.
53+
The errors should then be investigated and resolved while still running Joomla 5.4, before attempting the upgrade again.
5254

53-
- PR's:
54-
- https://github.com/joomla/joomla-cms/pull/42805
55-
- https://github.com/joomla/joomla-cms/pull/42890
56-
- https://github.com/joomla/joomla-cms/pull/44925
57-
- Description: Any reference to the class `\Joomla\CMS\Input\Input` or the other classes in that namespace should be replaced with the [framework `Input`](https://github.com/joomla-framework/input) package and the namespace `\Joomla\Input`. The packages can be used nearly interchangeably.
55+
This approach ensures that any incompatibilities are detected and fixed safely in the Joomla 5.4 environment,
56+
avoiding partial or corrupted upgrades that may occur if the site crashes during the upgrade process.

migrations/54-60/new-deprecations.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,6 @@ sidebar_position: 2
55
# New deprecations
66
================
77

8-
:::tip[Developer Note]
9-
Since this version of Joomla has not been released yet, this page can change anytime.
10-
:::
11-
128
All the new deprecations that should be aware of and what you should now be using instead.
139

1410
## Class Deprecations

migrations/54-60/new-features.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,6 @@ sidebar_position: 1
55
New Features
66
============
77

8-
:::tip[Developer Note]
9-
Since this version of Joomla has not been released yet, this page can change anytime.
10-
:::
11-
128
All the new features that have been added to this version.
139
Any changes in best practice.
1410

migrations/54-60/removed-backward-incompatibility.md

Lines changed: 28 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,6 @@ sidebar_position: 3
55
Removed and Backward Incompatibility
66
====================================
77

8-
:::tip[Developer Note]
9-
Since this version of Joomla has not been released yet, this page can change anytime.
10-
:::
11-
128
All the deprecated features than have now been removed and any backward incompatibilities.
139
There should be an explanation of how to mitigate the removals / changes.
1410

@@ -67,7 +63,13 @@ echo $article->title;
6763
- PR's:
6864
- https://github.com/joomla/joomla-cms/pull/42805
6965
- https://github.com/joomla/joomla-cms/pull/42890
70-
- Description: The CMS Input namespace `\Joomla\CMS\Input` has been removed. The CMS core code has switched the code to the Framework Input library with the namespace `\Joomla\Input`, which is very much a drop-in replacement. This is especially of relevance if you are using the MVC classes, which now use the framework class. Make sure that your code imports the correct class.
66+
- https://github.com/joomla/joomla-cms/pull/44925
67+
- Description: The CMS Input namespace `\Joomla\CMS\Input` has been removed.
68+
It is only available if the 'Behaviour - Backward Compatibility 6' plugin is enabled.
69+
The CMS core code has switched the code to the Framework Input
70+
[framework `Input`](https://github.com/joomla-framework/input) package with the namespace `\Joomla\Input`,
71+
which is very much a drop-in replacement. This is especially of relevance if you are using the MVC classes,
72+
which now use the framework class. Make sure that your code imports the correct class.
7173

7274
## UTC Used Instead of GMT
7375

@@ -190,7 +192,7 @@ if ($app instanceof \Joomla\CMS\Application\ConsoleApplication) {
190192
- File moved from `media/legacy/js` to `media/vendor/jquery/js`
191193
- PR: https://github.com/joomla/joomla-cms/pull/45020
192194

193-
## CMS Filesystem Package Moved to the Backward Compatibility Plugin
195+
## CMS Filesystem Package Moved to the 'Behaviour - Backward Compatibility 6' Plugin
194196

195197
- PR: https://github.com/joomla/joomla-cms/pull/44240
196198
- Folder: libraries/src/Filesystem
@@ -279,19 +281,32 @@ Factory::getApplication()->bootComponent('actionlogs')->getMVCFactory()
279281
- PR: https://github.com/joomla/joomla-cms/pull/43794
280282
- Description: The classes `\Joomla\CMS\Adapter\Adapter` and `\Joomla\CMS\Adapter\AdapterInstance` have been removed without replacement.
281283

282-
## Remove deprecated BaseApplication and CLI classes
283-
- PR: https://github.com/joomla/joomla-cms/pull/42884
284+
## Remove CMS BaseApplication and CLI classes
285+
- PRs
286+
- https://github.com/joomla/joomla-cms/pull/42884
287+
- https://github.com/joomla/joomla-cms/pull/44926
284288
- Files: `libraries/src/Application/BaseApplication.php`, `libraries/src/Application/CLI.php`
285289
- Description: These legacy classes have been removed.
286-
Use `\Joomla\CMS\Application\ConsoleApplication` or framework equivalents instead.
290+
Any reference to the class `\Joomla\CMS\Application\BaseApplication` and `\Joomla\CMS\Application\CliApplication`
291+
with the respective CLI input classes should be replaced with the namespace `\Joomla\Application`.
292+
Cli apps should be replaced by console plugins.
293+
Use `\Joomla\CMS\Application\ConsoleApplication` or framework equivalents instead.
287294
**(more detail needed: migration examples)**
288295

289-
## Move JPATH_PLATFORM constant to compat plugin
296+
## Remove JPATH_PLATFORM Constant
290297
- PR: https://github.com/joomla/joomla-cms/pull/44638
298+
- Files: All bootstrapping files
291299
- Description: The `JPATH_PLATFORM` constant is no longer globally defined.
292-
It is only available if the Backward Compatibility plugin is enabled.
293-
Extensions should avoid using this constant.
294-
**(more detail needed: code examples and alternatives)**
300+
It is only available if the 'Behaviour - Backward Compatibility 6' plugin is enabled.
301+
Extensions should avoid using this constant.
302+
Change your checks to `_JEXEC`:
303+
```php
304+
// Old:
305+
\defined('JPATH_PLATFORM') or die;
306+
307+
// New:
308+
\defined('_JEXEC') or die;
309+
```
295310

296311
## Remove fetchExtensionCompatibility in UpdateController
297312
- PR: https://github.com/joomla/joomla-cms/pull/45436

0 commit comments

Comments
 (0)