n98-magerun2 – Project Update 2015-02

n98-magerun2 Updated

This is short project update about the current progress of n98-magerun for Magento 2.
We ported some commands and backported features planned for next n98-magerun1 release like the PSR-4 namespace support or the alternative project config.

Compatibility to lastest M2 Beta6

The latest Magento 2 develop version comes with some code refactorings.
One was to move the interface \Magento\Store\Model\StoreManagerInterface to Magento\Framework\Store\StoreManagerInterface which broke some n98-magetun2 code. The fix was easy to find because all store/website command unit tests failed. So we could
find an fix the commands.
This means that you should update your Magento 2 Test-Installation to Beta 6 if you use the latest n98-magerun version.

After writing this blog post Magento published Beta 7. It seems that latest n98-magerun2 version is already compatible.

PSR-4 support for modules

If you create n98-magerun2 modules you can now use PSR-4 autoloading.


   Acme\Foo\Bar\: %module%/src

Please note that PSR-4 namespaces must end with a slash.

Ported commands

We ported the following commands:

  • sys:repo:run
  • script:repo:list
  • sys:cron:list
  • sys:cron:run
  • sys:cron:history

Alternative project config

You can now place an alternative project config file in the project root folder. This was an often requested feature for n98-magerun. We will have this features also in the next n98-magerun1 version.

It’s now possible to place a new config file .n98-magerun2.yaml in the project root. Please note that project root can be different to your Magento root.
The .n98-magerun2.yaml file will only be loaded if “stop file” .n98-magerun2 (the file with relative path to the Magento root folder) was found.


.                        <-- Project root folder
├── .n98-magerun2        <-- "Stop file"
├── .n98-magerun2.yaml   <-- Alternative project config
└── www                  <-- Magento root folder

Installer fixes

The installer can now import and install the sample data. We fixed a problem with minimum-stability settings.
Now you should be able to install Magento 2 with pleasure.

Total progress

The first milestone (port all commands from version 1 to version 2) is now 34% completed.

One Pingback/Trackback

    08 February 2015 at 5:02pm
    […] wurde für die aktuelle Magento-2-Beta-Version angepasst und beherrscht bereits ...
  • Magento-Neuigkeiten #31
  • Pingback: Magento-Neuigkeiten #31()

  • Magento Developer

    When should we expect the self-update for magerun2?

    • The self-update command was integrated in the last version of the phar file. The latest version should contain it.