superpms / extend-plugins
pms plugins extend
Requires
- php: >=8.1
Requires (Dev)
- superpms/basic: ^1.0.0
- superpms/interpreter-terminal: ^1.0.0
This package is auto-updated.
Last update: 2026-05-21 05:34:37 UTC
README
superpms/extend-plugins is the plugin loader package for PMSPHP. It mounts the project plugin root during framework boot, loads enabled plugin autoload.php files from plugins/installed.php, registers the plugin-install terminal command, and provides the PluginsApp trait used by plugin classes to read their own config and paths.
Runtime Position
In the current server project, this package is required by server/composer.json and participates in boot through Composer autoload.files:
bin/autoload.phprequiresbin/autorun.php.bin/autorun.phpmountspms\extend\plugins\SetuponLIFECYCLE_BOOTwhenLifecycleHookis available.bin/autorun.phpmountspms\extend\plugins\PluginInstallCommandwhenTerminalCommandHookis available.Setupreadsboot.jsonextend.plugins, mountspluginsRoot, then loads enabled plugin autoload files.
The package does not scan every plugin directory automatically. Runtime loading is controlled by plugins/installed.php.
Main Capabilities
- Mount the plugin root path with
Path::mount('pluginsRoot', ...). - Create a default
plugins/installed.phpif it is missing. - Include each enabled plugin's
autoload.php. - Validate and install a plugin name through the
plugin-installterminal command. - Expose plugin-local
config()andpath()helpers through thePluginsApptrait. - Add IDE-helper metadata for
Path::getPluginsRoot(...).
Documentation
Detailed developer documentation lives under docs/README.md.
Install
composer require superpms/extend-plugins
Requirements
- PHP
>=8.1 - Runtime integration with
superpms/basic - Terminal command integration requires
superpms/interpreter-terminal
The current server project requires PHP >=8.2, but this package's own Composer constraint is PHP >=8.1.
Development Notes
- Keep plugin runtime behavior in this package separate from plugin business implementation.
- Treat
installed.phpas the loading whitelist. - Treat
plugin.jsonas install-time metadata and validation input. - Do not add business-specific behavior to this package; concrete plugins live under the consuming project's
plugins/directory.
License
Apache-2.0. See LICENSE.txt.