v4.0.0 has landed!

Published by Christian Münch on

Today we a proud to release a brand new version of the CLI tool. This is the biggest release since years. We added new commands, refactored the complete code base, upgraded components, merged PR with bug fixes and improvements.

Please read carefully this blog post before you decide to upgrade. The new release is a Major Break. That’s why the major version number was increased.

New Features

Webapi Integration Commands

Four new handy commands were added to handle webapi integrations.

integration:createCreates a new integration.
integration:deleteDelete an existing integration.
integration:listList all existing integrations.
integration:showShow details of an existing integration.

The commands are useful if you want to create integrations without the need to login to the Magento admin. That’s very nice if you are a developer or a system administrator.

The integration:create command offers also options to define keys and secrets which are in general automated created.

The command offers the ability to define ACL resources for the new integration.


$> n98-magerun2.phar integration:create

$> n98-magerun2.phar integration:create "My new integration 10" [email protected] https://example.com -r Magento_Catalog::catalog_inventory -r Magento_Backend::system_other_settings

The additional commands are to list, delete and show details.

Integration details

Area support for dev:console

The dev:console command get a new option to specify an area. This is useful to test code e.g. in frontend or webapi_rest area. Any valid are can used. If the option is specified, the config and translations of that application area.

This means that the correct di.xml preferences are respected.

dev:console initalized in webapi_rest area

Mycli support for db:console

If the mysql cli client alternative mycli is installed on yor machine, the new db:console option --use-mycli-instead-of-mysql can be used.

To automatically apply that new option a alias can be defined in your user ~/.n98-magerun2.yaml config file.

    - "db:console": "db:console --use-mycli-instead-of-mysql"   

Under the hood

Symfony Components

All Symfony dependencies are upgraded from 2.3 to 4.4. That is necessary to provide a stable tool which is compatible with upcoming Magento versions.

The event management inside the application was changed. If you have custom modules, please guarantee that the Symfony\Component\EventDispatcher\EventSubscriberInterface interface is implemented.

With the upgrade of the Symfony\Console component, the DialogHelper was removed. Please replace the helper with the QuestionHelper which is much easier to use.


The dependency to PHPUnit was upgraded to v6.5.
All 338 test cases are running successful. We also updated the Travis server config to be comaptible with the latest tool stack.


To increase the security, we added the roave/security-advisories composer package.

Refactoring / Code Quality

The complete code base got a refactoring. Here are some facts:

  • We changed 303 files
  • Scrutinizer Score is now 9.02
  • Code style was updated
  • We added support for Captainhook
  • We removed legacy code
  • We simplified the directory structure
  • The minimum PHP Version is now 7.2
  • We added missing documentation

Support for Magento 2.2 dropped!

As described before, we upgraded all 3rd party libraries. The downside of that is that we are not able to support Magento 2.2 anymore. If you use v4.0.0 in a old (officially unsupported) Magento 2.2, the tool stops with a incompatibility message.

Incompatibility message

Please download a supported version if you still run Magento 2.2.x here: https://files.magerun.net/old_versions.php

The removal of support affects also to the installer command. It is not possible anymore to install Magento versions older than 2.3.0. That is necessary, because the tool cannot call any command anymore due to the incompatibility check.


  • New: New commands to handle webapi integrations (by Christian Münch)
  • New: #374: Add “area” option to dev:console (by Christian Münch)
  • New: #494: Add mycli support (by Christian Münch)
  • Add: roave/security-advisories component for a better security
  • Add: Magento 2.3.3 in installer (by Christian Münch)
  • Add: #503: Captainhook suppport (by Christian Münch)
  • Add: #501: Strip B2B quotes as part of @quotes alias (by Dan Wallis)
  • Imp: Match Magento Code Style (v2.2.10)
  • Imp: Update Symfony Components to 4.4
  • Imp: Update PHPUnit to 6.5
  • Imp: Update php-cs-fixer to 2.16
  • Imp: #504: Enable PHP 7.3 for travis builds (by Christian Münch)
  • Imp: #492: Update readme (by operator888)
  • Fix: Composer package naming (vfsStream)
  • Fix: #488: mcrypt is optional module in Magento 2.3 (by Christian Münch)
  • Fix: #487: Downgrade versions command broken (by Christian Münch)
  • Fix: #490: Wildcard matching of db:dump command (by Dan Wallis)
  • Fix: #244: Cron Job List command sys:cron:list does not merges system config path values
  • Del: Removed official support for Magento 2.2 and Magento 2.1
  • Del: Removed unsupported Magento versions from installer
Categories: Magerun

1 Comment

Atwix MageNews - February 2020 | Atwix · February 14, 2020 at 12:10

[…] – shkoliar/magento-grid-colors – Magento 2 module for colorizing admin grids – redchamps/clean-admin-menu – Magento 2 Extension to cleanup admin menu and Store > Configuration area by arranging third party extension items – fballiano/homebrew-mageutils – a homebrew tap for installing Magento utilities – extdn/installer-m2 – Universal extension installer for Magento 2 – n98-magerun2 – a new version 4.x is out […]

Leave a Reply

Avatar placeholder

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.