yireo / magento2-theme-commands
yireo/magento2-theme-commands
CLI commands to manipulate themes
Yireo_ThemeCommands module
Magento 2 module to add CLI commands to manage themes from the command-line
Installation
composer require yireo/magento2-theme-commands
bin/magento module:enable Yireo_ThemeCommands
Usage
List all themes:
bin/magento theme:list
List all assigned themes (aka design configurations):
bin/magento theme:design_config
The theme:design_config output also shows an Override column, which identifies whether a specific value (like, a theme ID for a specific Store View) is indeed overriding the default or not.
Change the current theme to Magento/luma for all scopes:
bin/magento theme:change Magento/luma
Note that the theme:change command also includes a flag --reset (valid only without additional parameters) which resets all stores to the default, so that only 1 theme is active:
bin/magento theme:change --reset -- Magento/luma
Change the current theme to Hyva/default for the StoreView with ID 1:
bin/magento theme:change Hyva/default 1 stores
Create a new theme:
bin/magento theme:create --theme Yireo/example --parent Magento/luma --application frontend
bin/magento theme:change Yireo/example
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.3.4] - 22 October 2025
Fixed
- Wrong imported namespace of Composer, should be Symfony Console
[1.3.3] - 08 October 2025
Fixed
- Add new command "theme:path" to return full path for given theme
[1.3.2] - 23 April 2025
Fixed
- Fix PHP 8.4 deprecation
[1.3.1] - 10 March 2025
Fix
- Wrong regex when creating theme
[1.3.0] - 1 July 2024
Added
- Add
--resetflag totheme:changecommand - Add new command
theme:design_config
[1.2.1] - 6 February 2024
Fixed
- namespace correction for InputOption #3 @meminuygur
[1.2.0] - 3 February 2024
Added
- New command to create a new theme
[1.1.0] - 5 November 2023
Added
- New command to list all themes
Fixed
- Cleanup deps in change command
[1.0.3] - 30 August 2023
Fixed
- Fix issue with grid not being updated for global scope
[1.0.2] - 20 June 2023
Fixed
- Fix scope_id validation when using default scope #2 @lbanka
[1.0.1] - 17 June 2023
Added
- Allow to use scope codes #1 @lbanka
[1.0.0] - 16 June 2023
- Initial release
| Version | Stability | QA Status | Compatibility | Released |
|---|---|---|---|---|
| 1.3.4 | stable | Fail | Magento 2.4.7-2.4.9 Details | 2025-10-22 11:15:39 |
| 1.3.3 | stable | Not tested | Not yet tested Details | 2025-10-08 14:41:17 |
| 1.3.2 | stable | Not tested | Not yet tested Details | 2025-04-23 11:33:52 |
| 1.3.1 | stable | Not tested | Not yet tested Details | 2025-03-10 07:59:19 |
| 1.3.0 | stable | Not tested | Not yet tested Details | 2024-07-01 14:43:14 |
| 1.2.1 | stable | Not tested | Not yet tested Details | 2024-02-06 13:19:08 |
| 1.2.0 | stable | Not tested | Not yet tested Details | 2024-02-03 09:03:15 |
| 1.1.0 | stable | Not tested | Not yet tested Details | 2023-11-05 15:22:40 |
| 1.0.3 | stable | Not tested | Not yet tested Details | 2023-08-30 12:13:28 |
| 1.0.2 | stable | Not tested | Not yet tested Details | 2023-06-21 06:28:31 |
| 1.0.1 | stable | Not tested | Not yet tested Details | 2023-06-17 05:09:20 |
| 1.0.0 | stable | Not tested | Not yet tested Details | 2023-06-16 12:41:07 |
Requires 1
| Package | Constraint |
|---|---|
| magento/framework | ^103.0 |
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.
| Tool | Status | Findings | Summary |
|---|---|---|---|
| PHPCS | Warning | 27 | 27 warnings (ruleset: Magento2) — 6 auto-fixable with phpcbf |
| PHPMD | Warning | 5 | 5 rule violations (UnusedFormalParameter:3, CyclomaticComplexity:1, NPathComplexity:1) |
| Cpd | Pass | 0 | |
| Composer validate | Info | 1 | valid; 1 advisory note (composer validate --strict) |
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 | N/A | N/A | ||
| 2.4.8 | N/A | N/A | ||
| 2.4.9 | N/A | N/A |
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.