-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
[5.0] b/c plugin for deprecation #40664
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 14 commits
Commits
Show all changes
30 commits
Select commit
Hold shift + click to select a range
2c338db
Add compatibility plugin and move classmap
HLeithner 7706768
cs
HLeithner 4722438
remove classmap from unit tests
HLeithner 2365f4e
Use namespace for html helper tests
HLeithner 590718d
PoC for Table::getInstance JTable prefix
HLeithner b940e4f
Revert cache plugin change
HLeithner 6c966ce
PoC HTMLHelper correct namespace
HLeithner f6f7d5b
Merge branch '5.0-dev' into 5/feature/bc-plugin
HLeithner a4bd6d3
revert drone change
HLeithner 22b72a6
Activate the plugin by default on new installations
HLeithner 1ddc987
Fix system plugins ordering in base.sql
richard67 11750a6
Add insert of extension to update SQL
richard67 8b35008
Add to core plugins in ExtensionHelper
richard67 50333f8
Merge pull request #56 from richard67/5.0-dev-hleithner-5-feature-bc-…
HLeithner 484628b
Replace JTable references, revert Table::getInstance logic
HLeithner 7271e1b
Add Table::getInstance JTable logic including explanation
HLeithner 34c6818
Cleanup plugin
HLeithner 1d60853
Disable again for new installations
HLeithner a9bc360
Merge branch '5.0-dev' into 5/feature/bc-plugin
HLeithner dc1eafb
Merge branch '5.0-dev' into 5/feature/bc-plugin
HLeithner 8694f73
Merge branch '5.0-dev' into 5/feature/bc-plugin
HLeithner 6aa1a79
Merge branch '5.0-dev' into 5/feature/bc-plugin
HLeithner baab18a
Merge branch '5.0-dev' into 5/feature/bc-plugin
3c9dc5e
Merge remote-tracking branch 'upstream/5.0-dev' into 5/feature/bc-plugin
HLeithner 2db62d4
Activate B/C plugin on new installation
HLeithner 3b19bfb
Initialise the Extension table with the real database object
HLeithner 0459a3f
Support custom database object on language load
HLeithner c4a2b3f
Fix wrong function usage
HLeithner 4225a05
Add renamed non PascalCase table aliases and fix occurrence
HLeithner d9d1311
Disable plugin on new installations again
HLeithner File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
3 changes: 3 additions & 0 deletions
3
administrator/components/com_admin/sql/updates/mysql/5.0.0-2023-03-11.sql
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1,4 @@ | ||
| DROP TABLE IF EXISTS `#__utf8_conversion`; | ||
|
|
||
| INSERT INTO `#__extensions` (`package_id`, `name`, `type`, `element`, `folder`, `client_id`, `enabled`, `access`, `protected`, `locked`, `manifest_cache`, `params`, `custom_data`, `ordering`, `state`) VALUES | ||
| (0, 'plg_system_compat', 'plugin', 'compat', 'system', 0, 1, 1, 0, 1, '', '{"classes_aliases":"1"}', '', 0, 0); |
3 changes: 3 additions & 0 deletions
3
administrator/components/com_admin/sql/updates/postgresql/5.0.0-2023-03-11.sql
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1,4 @@ | ||
| DROP TABLE IF EXISTS "#__utf8_conversion"; | ||
|
|
||
| INSERT INTO "#__extensions" ("package_id", "name", "type", "element", "folder", "client_id", "enabled", "access", "protected", "locked", "manifest_cache", "params", "custom_data", "ordering", "state") VALUES | ||
| (0, 'plg_system_compat', 'plugin', 'compat', 'system', 0, 1, 1, 0, 1, '', '{"classes_aliases":"1"}', '', 0, 0); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| ; Joomla! Project | ||
| ; (C) 2007 Open Source Matters, Inc. <https://www.joomla.org> | ||
| ; License GNU General Public License version 2 or later; see LICENSE.txt | ||
| ; Note : All ini files need to be saved as UTF-8 | ||
|
|
||
| PLG_COMPAT_FIELD_CLASSES_ALIASES_LABEL="Classes Aliases" | ||
| PLG_COMPAT_FIELD_CLASSES_ALIASES_DESCRIPTION="Add class aliases for classes which have been renamed or moved to a namespace." | ||
| PLG_COMAPT_XML_DESCRIPTION="Provides backward compatibility to the prior major version." | ||
| PLG_SYSTEM_COMAPT="System - Backward Compatibility" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| ; Joomla! Project | ||
| ; (C) 2009 Open Source Matters, Inc. <https://www.joomla.org> | ||
| ; License GNU General Public License version 2 or later; see LICENSE.txt | ||
| ; Note : All ini files need to be saved as UTF-8 | ||
|
|
||
| PLG_COMAPT_XML_DESCRIPTION="Provides backward compatibility to the prior major version." | ||
| PLG_SYSTEM_COMAPT="System - Backward Compatibility" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,39 @@ | ||
| <?xml version="1.0" encoding="UTF-8"?> | ||
| <extension type="plugin" group="system" method="upgrade"> | ||
| <name>plg_system_combat</name> | ||
| <author>Joomla! Project</author> | ||
| <creationDate>2023-03</creationDate> | ||
| <copyright>(C) 2023 Open Source Matters, Inc.</copyright> | ||
| <license>GNU General Public License version 2 or later; see LICENSE.txt</license> | ||
| <authorEmail>[email protected]</authorEmail> | ||
| <authorUrl>www.joomla.org</authorUrl> | ||
| <version>5.0.0</version> | ||
| <description>PLG_COMPAT_XML_DESCRIPTION</description> | ||
| <namespace path="src">Joomla\Plugin\System\Compat</namespace> | ||
| <files> | ||
| <folder plugin="cache">services</folder> | ||
| <folder>src</folder> | ||
| </files> | ||
| <languages> | ||
| <language tag="en-GB">language/en-GB/plg_system_compat.ini</language> | ||
| <language tag="en-GB">language/en-GB/plg_system_compat.sys.ini</language> | ||
| </languages> | ||
| <config> | ||
| <fields name="params"> | ||
| <fieldset name="basic"> | ||
| <field | ||
| name="classes_aliases" | ||
| type="radio" | ||
| layout="joomla.form.field.radio.switcher" | ||
| label="PLG_COMPAT_FIELD_CLASSES_ALIASES_LABEL" | ||
| description="PLG_COMPAT_FIELD_CLASSES_ALIASES_DESCRIPTION" | ||
| default="1" | ||
| filter="integer" | ||
| > | ||
| <option value="1">JYES</option> | ||
| <option value="0">JNO</option> | ||
| </field> | ||
| </fieldset> | ||
| </fields> | ||
| </config> | ||
| </extension> | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,49 @@ | ||
| <?php | ||
|
|
||
| /** | ||
| * @package Joomla.Plugin | ||
| * @subpackage System.combat | ||
| * | ||
| * @copyright (C) 2023 Open Source Matters, Inc. <https://www.joomla.org> | ||
| * @license GNU General Public License version 2 or later; see LICENSE.txt | ||
| */ | ||
|
|
||
| defined('_JEXEC') or die; | ||
|
|
||
| use Joomla\CMS\Extension\PluginInterface; | ||
| use Joomla\CMS\Factory; | ||
| use Joomla\CMS\Plugin\PluginHelper; | ||
| use Joomla\CMS\Profiler\Profiler; | ||
| use Joomla\CMS\Router\SiteRouter; | ||
| use Joomla\DI\Container; | ||
| use Joomla\DI\ServiceProviderInterface; | ||
| use Joomla\Event\DispatcherInterface; | ||
| use Joomla\Plugin\System\Compat\Extension\Compat; | ||
|
|
||
| return new class () implements ServiceProviderInterface { | ||
| /** | ||
| * Registers the service provider with a DI container. | ||
| * | ||
| * @param Container $container The DI container. | ||
| * | ||
| * @return void | ||
| * @since 5.0.0 | ||
| */ | ||
| public function register(Container $container) | ||
| { | ||
| $container->set( | ||
| PluginInterface::class, | ||
| function (Container $container) { | ||
| $plugin = PluginHelper::getPlugin('system', 'compat'); | ||
| $dispatcher = $container->get(DispatcherInterface::class); | ||
| $profiler = (defined('JDEBUG') && JDEBUG) ? Profiler::getInstance('Application') : null; | ||
| $router = $container->has(SiteRouter::class) ? $container->get(SiteRouter::class) : null; | ||
|
|
||
| $plugin = new Compat($dispatcher, (array) $plugin, $profiler, $router); | ||
| $plugin->setApplication(Factory::getApplication()); | ||
|
|
||
| return $plugin; | ||
| } | ||
| ); | ||
| } | ||
| }; |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.