README.md

November 19, 2024 ยท View on GitHub

Installation

git clone git@github.com:zepgram/magento2-code-maker.git
cd magento2-code-maker
composer install
chmod +x bin/maker
sudo ln -sfn {absloute_path}/magento2-code-maker/bin/maker /usr/local/bin/maker

To execute maker, you must be in a Magento project directory and run:

maker

Available commands

CommandDescription
create:blockCreate block
create:commandCreate console command
create:configCreate system config
create:controllerCreate controller
create:controller-viewCreate controller with view
create:cronCreate cron
create:graph-qlCreate resolver GraphQL
create:loggerCreate logger
create:modelCreate model
create:model:service-contractCreate model with service contract
create:moduleCreate new module
create:observerCreate observer
create:patch-dataCreate patch data
create:patch-schemaCreate patch schema
create:pluginCreate plugin
create:service-contractCreate service contract
create:view-modelCreate view model
create:webapiCreate WebAPI REST or SOAP

Todo

  • Generator issue:
    • Resolve specific case of xml merge
    • Add basic front source model selection for core_config
    • Make correct implementation of controllers with interface

  • Improvements:
    • Generator add configurator with a ".maker" file: one shot, then must be updated with CLI - set current project: set project path + user name + user email + declare strict types one shot, then must be updated with CLI - assign module
    • Generator with magento versioning with a "x.y.z.json" file: declare and load config for specific project version

  • Missing component:
    • Create form ui component