Download the PHP package magicsunday/webtrees-module-installer-plugin without Composer
On this page you can find all versions of the php package magicsunday/webtrees-module-installer-plugin. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download magicsunday/webtrees-module-installer-plugin
More information about magicsunday/webtrees-module-installer-plugin
Files in magicsunday/webtrees-module-installer-plugin
Package webtrees-module-installer-plugin
Short Description Composer plugin for the webtrees genealogy application โ auto-installs webtrees-module packages into the modules_v4 directory during composer install and update.
License GPL-3.0-or-later
Informations about the package webtrees-module-installer-plugin
Webtrees Module Installer Plugin
A powerful Composer plugin that simplifies the installation of modules for the webtrees genealogy application by automatically placing them in the correct directory structure.
๐ Seamless Integration
Automatically installs webtrees modules to the correct modules_v4 directory without manual file copying.
โ๏ธ Easy Configuration
Simple setup with minimal configuration required in your composer.json file.
๐ Why Use This Plugin?
When developing or using modules for webtrees, managing the installation process can be cumbersome. This plugin solves that problem by:
- Automatically detecting and installing packages of type
webtrees-moduleandwebtrees-theme - Placing modules and themes in the correct
modules_v4directory structure - Supporting both direct installation and installation via a separate composer.json
- Eliminating the need for manual file copying or symlink creation
๐ Requirements
System Requirements
- PHP 8.3 โ 8.5
- Composer 2.6 or higher
๐ง Installation
Add this plugin to the require or require-dev section of your composer.json file:
Or install it using Composer:
Make sure to allow the plugin in your composer.json:
๐ฆ Usage
For Module Users
To install a webtrees module with composer, simply require the module in your composer.json:
The plugin will automatically install the module to the modules_v4 directory.
For Module Developers
When creating a webtrees module, set the package type to webtrees-module in your module's composer.json:
Pro Tip
The module name in the composer.json file will determine the directory name in the modules_v4 directory.
Themes
Themes are installed exactly like modules. Since a webtrees theme is a module as well, set the package type to webtrees-theme and it will be placed in the same modules_v4 directory:
Installing from GitHub
If your module is not listed on Packagist, you can install it directly from GitHub:
For example, to install the dev-main branch:
๐งช Testing
The quality tooling comes from magicsunday/coding-standard (^3.0): the php-cs-fixer, PHPStan (level max, checked exceptions) and Rector configs are the shared ones, and Deptrac enforces the layer rules in deptrac.yaml.
๐ How It Works
The plugin works by:
- Registering a custom installer with Composer's installation manager
- Subscribing to package-level events (
PRE_PACKAGE_*/POST_PACKAGE_*) to queuewebtrees-moduleandwebtrees-themeoperations - Determining the correct installation path in the
modules_v4directory, whetherfisharebest/webtreesis installed as a dependency or as the root package - Re-installing all
webtrees-moduleandwebtrees-themepackages whenfisharebest/webtreesitself is updated, so the modules and themes survive the core upgrade
The main components are:
ModuleInstallerPlugin: Implements Composer'sPluginInterfaceand wires up the event listenersModuleInstaller: Extends Composer'sLibraryInstaller; resolves the install path and delegates the actual install/update/uninstall operation
๐ฅ Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
Please make sure your code follows the project's coding standards by running the tests before submitting.
๐ License
This project is licensed under the GNU General Public License v3.0 - see the LICENSE file for details.
๐ Acknowledgements
All versions of webtrees-module-installer-plugin with dependencies
composer-plugin-api Version ^2.6