Closed RK311y closed 1 year ago
PS: I haven't actually tested to see if extension hook data from the $methods
property of a Module Installer class actually does anything... I am typically using an ext.addon.php
class/file. This is just something I noticed in the documentation.
Problem Overview
ExpressionEngine
6.0
introduced the Add-on Installer which helps improve Module and Extensions installation.The documentation for the Module Installer class includes a
$methods
(array) property.This exact same property is also defined for Extension Installer.
I believe that in order to maintain the separation of functionality during installation, only the Extention installer should have the ability to install extension hooks through
ExpressionEngine\Service\Addon\Installer
class inheritance. That is, unless Extension Hooks and Methods can be related to classes that do not follow the file/class name schema (./addon/ext.addon.php
::class Addon_ext
) - But I have yet to see this.What Likely Happened
This snippet of code was accidentally copied into the Module Installer code example.
If this is not true, the above concern should be addressed. (i.e. the ability of Module Installers to handle extension hooks/methods installation)
Solution
Check out the pull request I have made in my own fork to see the changes I am suggesting: https://github.com/RK311y/ExpressionEngine-User-Guide/pull/1/files