We released a new version of n98-magerun for Magento 1 (for Magento 2 have a look at https://github.com/netz98/n98-magerun2).
There are some features and improvements which we are try to explain.
Alternative project config
Many of you don’t use the standard project structure where the root folder of the project is also the webroot of the virtual host.
In the last releases we added support for a “stop file” which stops n98-magerun’s Magento root detection. If the file is found it contains a relative path to the webroot like “www” or “htdocs”.
In this release we added support to place a project config in the project root folder. If a “stop” file was found we search for a “n98-magerun.yaml” in the same folder.
An example structure could be like this:
├── n98-magerun.yaml (will be loaded if .n98-magerun stop file exists)
- #444 Added support to place .n98-magerun.yaml file in the same folder as “n98-magerun” stop file. (by Christian Münch)
PSR-4 support for modules
It’s now possible to use PSR-4 compatible autoloader of embedded composer.
This can reduce the numbers of sub-folders inside a module.
The autoloader definition in n98-magerun.yaml is nearly the same.
The only thing we changed was to change “autoloaders” to “autoloaders_psr4”. The trailing “\” at the namespace definition is required.
If psr-4 autoloader is used we don’t need to create empty “Foo\Bar\Zoz\” folders. The autoloaders will load directly from defined target folder (in this case “src”).
- Added support for PSR-4 autoloading. (by Christian Münch)
New dev:console !!!
With release 1.56.0 we added the dev:console command which was a greate feature. The problem with the dev:console command was that we used the PHP internal interactive console which shows a different behaviour on some systems.
We was not able to fix that. Now we replaced the dev:console command with psych a userland code PHP shell.
You can run the dev:console with
- Added new Psy\Console. Replaced dev:console command. (by Christian Münch)
Fixes and Improvements
- #465 checking for presence of Mage.php file in list of files searched for since Magento 2 no longer has a god class (by David Alger)
- #466 Configuration loader fatal error (by Tom Klingenberg)
- #472 Allow setting unix socket in host component (by Melvyn Sopacua)
- #474474 Add index event tables to @ids table group of the db:dump command (by Aad [Mathijssen)
- #475 Add importexporttemp table group for db:dump command (by Aad Mathijssen)
- #478 Improve sys:cron:run input handling (by Aad Mathijssen)
- #482 Infinite loop on n98-magerun script:repo:run –no-interaction (by Tom Klingenberg)
- #483 Cache clean “race” condition (by Jason Potkanski)
- #488 Fix wording (by will-b)
- #496 Upgrade PhpStorm (by Rafael Corrêa Gomes)
- #506 backend_type in eav:attribute:list (by Steve Robbins)
- Added debug logging if project config file is loaded. (by Christian Münch)
- Fixed magento detection. Try every command if Magento was found. (by Christian Münch)
- Removed Magento 2 installation source. (by Christian Münch)