Skip to content

Conversation

@dermatz
Copy link
Collaborator

@dermatz dermatz commented Jan 17, 2026

Description

Restructures the CleanCommand to align with the existing theme command namespace for better consistency.

Changes

Command Restructuring

  • Moved: Console/Command/Static/CleanCommand.phpConsole/Command/Theme/CleanCommand.php
  • Namespace: OpenForgeProject\MageForge\Console\Command\Static...Command\Theme
  • Command name: mageforge:static:cleanmageforge:theme:clean
  • Alias: m:st:cm:t:c (keeps frontend:clean)
  • Description: Shortened to "Clean theme static files and cache directories"

Updated Files

  • src/src/Console/Command/Theme/CleanCommand.php - Namespace, command name, aliases, description
  • src/src/etc/di.xml - Command registration updated
  • src/README.md - Command table updated
  • src/docs/commands.md - Command reference updated
  • src/CHANGELOG.md - Command references updated
  • .github/copilot-instructions.md - Example updated
  • .github/workflows/magento-compatibility.yml - CI/CD tests updated (both Elasticsearch and OpenSearch jobs)

Rationale

All theme-related commands now follow a consistent pattern:

  • mageforge:theme:build (m:t:b)
  • mageforge:theme:watch (m:t:w)
  • mageforge:theme:list (m:t:l)
  • mageforge:theme:clean (m:t:c) ← now consistent
  • mageforge:theme:tokens (m:t:t)

The previous mageforge:static:clean with alias m:st:c broke this pattern.

Testing

  • Command executes successfully: bin/magento mageforge:theme:clean --help
  • Alias works: bin/magento m:t:c --help
  • Legacy alias works: bin/magento frontend:clean --help
  • CI/CD tests pass for all Magento versions

Breaking Changes

⚠️ Yes - Existing scripts using mageforge:static:clean or m:st:c need to be updated to mageforge:theme:clean or m:t:c.

The frontend:clean alias remains for backward compatibility.

…cache, remove old mageforge:static:clean command
@dermatz dermatz merged commit ffd5ec8 into main Jan 17, 2026
8 checks passed
@dermatz dermatz deleted the restructure-theme-clean-command branch January 17, 2026 10:47
@github-actions github-actions bot mentioned this pull request Jan 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants