Skip to content

[WIP] Add bin/openmage #2955

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 11 commits into from
Closed

[WIP] Add bin/openmage #2955

wants to merge 11 commits into from

Conversation

sreichel
Copy link
Contributor

@sreichel sreichel commented Jan 17, 2023

Description (*)

Just an idea to add support for symfony/console commands ... reused some code from shell/absract.php and n98/magerun for module list.

This PR adds bin/openmage to run shell commands ...

... "log" is converted code from shell/log.php
... "modules" enable/disable changes files in app/etc/modules

Available commands

  • log
    • log:clean Clean Logs
    • log:status Display statistics per log tables
  • module
    • module:disable Diasble module
    • module:enable Enable module
    • module:list List modules

Notes

  • atm you can only disable modules w/o dependencies

Add custom commands

  1. register command in config.xml within default section (may change)

         <console>
             <core>
                 <module_disable>core/console_modules_disable</module_disable>
                 <module_enable>core/console_modules_enable</module_enable>
                 <module_list>core/console_modules_list</module_list>
             </core>
         </console>
    
  2. add command code to corrosponding modules model ...

Manual testing scenarios (*)

  1. run bin/openmage to see the list with available commands
  2. ...

Questions or comments

Work in progress.

Contribution checklist (*)

  • Pull request has a meaningful description of its purpose
  • All commits are accompanied by meaningful commit messages
  • All automated tests passed successfully (all builds are green)
  • Add yourself to contributors list

@sreichel sreichel marked this pull request as draft January 17, 2023 06:33
@github-actions github-actions bot added Component: Core Relates to Mage_Core Component: Log Relates to Mage_Log composer Relates to composer.json ddev labels Jan 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: Core Relates to Mage_Core Component: Log Relates to Mage_Log composer Relates to composer.json new feature phpstan
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants