This extension replaces the existing Extension Management with these improved services.
Current Version: 1.0.3 DEV
Requires: 3.2.0 or later
1.0.0 DEV - Initial version
- Uses service decoration to replace/expand the core extension manager object from phpbb in a 100% compatible way.
- Uses service inheritance to replace/expand the core extension metadata manager object from phpbb in a 100% compatible way.
- Uses a combination of launcher module/listener/controller to replace/expand the core ACP extensions page in a 100% compatible way.
- Encapsulates Metadata mgr y Extension classes into the Extension Mgr, making it unneeded to use them directly. A number of methods allow access to these facilities where needed.
- Metadata for extensions is only read (at most) once per extension, and cached in the Extension Mgr.
- Refactors all components for consistency and code reuse.
- Makes the use of some functions coherent (before, they were misaligned) such as is_available/all_available.
- Most of the changes available here (but not all) have been submitted for inclusion into the core, but while they are evaluated and discussed, here they are
- Refactor ACP extension template files, using a single template file for all extension actions, both on a single extension and on multiple extensions
- Operate on multiple extensions at the same time (multi-enable, disable, delete-data), allowing to select extensions from the extension list, and executing an action on all of them (sequentially)
- All metadata validation methods now have the option to throw exceptions or return boolean false on error, selected by a method parameter; the default behaviour is keeping backward compatibility; this is also exposed through the extension manager validation proxy method
- Improved Extension Mgr may be disabled within a multi-operation, by doing it last
- Trying to perform multi-operations on an empty list now triggers an error
- Other minor fixes and code improvements
- Improve visuals and form behaviours in extension list for actions on multiple extensions
- Allow selecting all extensions that support an specific action
- Enable only the multi actions that are relevant for the selected extensions
- Out of the selected extensions, only those supporting an specific action are taken into consideration when executing multi action
- Implement methods in
extension/manager.phpto check if an action may be executed on a given extension
With the version 1.0.1, the first visible improvement to the core Extension Manager is now available, with the option to perform actions on multiple extensions with a single operation. Version 1.0.2 fixes some minor issues and improvements with this implementation. Version 1.0.3 adds more visual capabilities to the above.
I have mainly done this as an exercise for myself, trying to learn and understand better how to extend and replace existing services, using several methods. As mentioned before, this is using SERVICE DECORATION, so it is not possible to make it work in 3.1 (an equivalent based on service replacement could be done, but I do not think it is worth the while).
Another reason for this is the need for some of these changes that I myself have suffered when trying to complete some extension(s) without them (mostly due to inconsistencies, and significant extra file accesses). That is why I have proposed these as core improvements, but I wanted to make them available to the community in a relatively safe way while that happens. This is also a way to test these further, and to make use of the functionality in the development of new extensions that might need it before it is released in the core (if it is I should say...).
You may take a look at the documents that I have provided, including the list of CORE changes (updated to 2017-04-01) that this extension implements and a description of the new API methods/parameters and functionality (updated to 1.0.3).
This extension works AS IS in a 3.2.0 (or higher when available) system.
This extension is currently under development, so it might have errors or malfunctions:
DO NOT INSTALL ON LIVE BOARDS.
- Solve/mitigate the inconsistency between all_available and all_enabled: an enabled extension might not be available, and yet make your forum crash
- Perform combined actions in a single extension (reenable=disable+enable, uninstall=disable+delete_data...)
If you have ideas for improvements or new functionality, let me know. I will evaluate them and see if they are feasible to be implemented.
[DEV] Version 1.0.3: https://github.com/javiexin/extension/r ... tag/v1.0.3
Github Repository: https://github.com/javiexin/extension
[DEV] Version 1.0.2: https://github.com/javiexin/extension/r ... tag/v1.0.2
[DEV] Version 1.0.1: removed, use at least 1.0.2 instead
[DEV] Version 1.0.0: https://github.com/javiexin/extension/r ... tag/v1.0.0
- Unzip the downloaded file.
- Copy the whole contents of the unzipped folder in the
ext/javiexin/extensiondirectory of your phpBB board, where you should see the main JSON file at (your forum root)/ext/javiexin/extension/composer.json.
- Navigate in the ACP to
Customise -> Manage extensions.
- Look for
Improved Extension Managementunder the Disabled Extensions list, and click its
Enablelink. If you are in 3.2.0, you will be asked if you want to be redirected to the new ACP module.
- You are done!.
Important: Only official release versions validated by phpBB should be installed on a live forum. Pre-release (beta, RC) versions are only to be used for testing on offline/development forums.