yireo / magento2-hyva-theme-auto-registration
yireo/magento2-hyva-theme-auto-registration
Automatically include modules in the Hyvä Theme registration
Yireo HyvaThemeAutoRegistration
Magento 2 module to make it easier to register a custom tailwind.config.js file of your own module in the global Hyvä Themes Tailwind configuration
Background
Hyvä Themes offers a Magento 2 CLI command hyva:config:generate to allow building a file app/etc/hyva-themes.json that again is used in modern-day Tailwind configuration of Hyvä-based themes. However, to extend this, one must add a custom observer to the module, which leads to a lot of code duplication across your modules. This module aims to simplify this. It offers an observer following the official Hyvä documentation.
However, this observer automatically registers any module that has a prefix Yireo_ or YireoTraining_ (it works for me). And it allows for extending things with a DI plugin.
Usage
Add this module as a dependency to your composer.json file and etc/module.xml file.
Next, add the following DI configuration to your module its etc/di.xml file (assuming here that Foo_Bar is the name of your own module):
<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
<type name="Yireo\HyvaThemeAutoRegistration\Observer\RegisterModuleForHyvaConfig">
<arguments>
<argument name="moduleNames" xsi:type="array">
<item name="Foo_Bar" xsi:type="string">Foo_Bar</item>
</argument>
</arguments>
</type>
</config>
Alternatively, you can include all your modules by configuring a module prefix:
<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
<type name="Yireo\HyvaThemeAutoRegistration\Observer\RegisterModuleForHyvaConfig">
<arguments>
<argument name="modulePrefixes" xsi:type="array">
<item name="Foo_" xsi:type="string">Foo_</item>
</argument>
</arguments>
</type>
</config>
Changelog
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog,
and this project adheres to Semantic Versioning.
[Unreleased]
[1.0.7] - 22 October 2025
Fixed
- Copy generic CI/CD files
- Add support for base-folder
- Add PHP 8.4
[1.0.6]
- Initial releases
| Version | Stability | QA Status | Compatibility | Released |
|---|---|---|---|---|
| 1.0.7 | stable | Fail | Magento 2.4.7-2.4.9 Details | 2025-10-22 11:26:43 |
| 1.0.6 | stable | Not tested | Not yet tested Details | 2025-02-13 18:59:02 |
| 1.0.5 | stable | Not tested | Not yet tested Details | 2024-12-01 18:45:33 |
| 1.0.4 | stable | Not tested | Not yet tested Details | 2024-11-18 13:45:06 |
| 1.0.3 | stable | Not tested | Not yet tested Details | 2024-10-08 08:49:39 |
| 1.0.2 | stable | Not tested | Not yet tested Details | 2024-10-04 08:26:28 |
| 1.0.1 | stable | Not tested | Not yet tested Details | 2023-11-20 11:14:37 |
| 1.0.0 | stable | Not tested | Not yet tested Details | 2023-10-30 07:48:44 |
Requires 2
| Package | Constraint |
|---|---|
| magento/framework | ^102.0|^103.0 |
| php | ^8.1 |
Compatibility
Each Magento release line is installed on its supported PHP versions, then the module is built (DI compilation + static-content deploy) and its unit and integration suites are run. The matrix shows the lines and PHP versions the module is confirmed to install and run on. Code-quality results further down (phpstan, phpcs, …) are reported separately and never affect compatibility.
Code Quality
Advisory checks against the module's source. Static analysis runs once across the whole module; PHPStan re-runs per Magento + PHP version because resolvable symbols differ between releases. These NEVER affect the Compatibility badge — a phpcs finding can't make a module incompatible.
Static analysis
Coding standards (phpcs), mess detection (phpmd), copy-pasted code (cpd), PHP cross-version compatibility, composer.json validity. Each runs once for the whole module.
PHPStan
Type-checks the module's PHP against a real Magento install at the configured gate level. Re-runs per Magento and PHP version because resolvable symbols differ between releases. Cell → details modal.
Tests
Unit and integration suites, run for each applicable Magento and PHP version. A test failure speaks to the module's behaviour, not its compatibility with a Magento line, so it is reported here separately and never reddens the compatibility matrix.
Unit tests
| Magento | PHP 8.2 | PHP 8.3 | PHP 8.4 | PHP 8.5 |
|---|---|---|---|---|
| 2.4.7 | N/A | N/A | ||
| 2.4.8 | N/A | N/A | ||
| 2.4.9 | N/A | N/A |
Integration tests
| Magento | PHP 8.2 | PHP 8.3 | PHP 8.4 | PHP 8.5 |
|---|---|---|---|---|
| 2.4.7 | not tested | not tested | ||
| 2.4.8 | not tested | Error | ||
| 2.4.9 | not tested | not tested |
Security
Security checks run directly against the module: an audit of its declared dependencies for known vulnerabilities (composer audit) and a scan of its source for malware and web-shell signatures. Each runs once. A malware detection fails the version outright.
More from yireo
View vendorTurn an existing module into recurring revenue.
If you already maintain a Magento 2 module on GitHub or GitLab, listing it on Packagento takes about five minutes. We mirror your tags, handle distribution signing, and route paid licenses through Stripe Connect, so you can keep shipping the way you already do.