Categories
Magerun

n98-magerun2 version 1.3.1 is out

Recent Magento 2 releases and the longer list of fixes demanded a new stable release of Magerun 2.

Jürgen Thelen kindly ported the admin:notifications and design:demo-notice commands, so each time you see the COW warning in the backend there is a relief now. So a warm welcome to Jürgen, we still have PRs from him in the pipe.

More dedicate cron control is available with sys:cron:schedule. Thanks to Pieter Hoste not only for his contributions to Magerun but also for his good work keeping track of Magento 2 upstream issue progress which is easy to get lost with. I really appreciate it, it’s always good to have some feedback when working with the rough edges we see day-to-day with Magento 2.

There is even more. A longer list of fixes (we keep them at the top of the change log), if you run into an issue, file it on Github. Also if you’re interested, grab an issue from the list – preferable one of the bugs – and give it a little love.

The config:set and config:get commands now support NULL values, this was a missing link for more special configuration requirements. Support has been backported to Magerun 1 as well (it’s in current stable 1.97.28, no release announcement yet).

Recent changes to the phar build have established reproducible builds. This means, that the same revision of the code-base will create the same phar file. This is a huge security and integration improvement as the checksum of the phar file won’t change when the file is re-build. For Magerun this is since this version 1.3.1 (1.97.28 for Magerun 1). So to all brew users: Even if we change the build system on magerun.net, from now on the hashes of the versioned releases won’t change any longer.

For bash lovers we now have a static completion file in the res/autocompletion folder, you can find more information in the added Autocompletion section in the readme. This feature was earlier available in Magerun 1 and we have streamlined it between both editions. With static autocompletion you will see a faster response and auto-completion for parameters is available, too.

Downloads are available as usual on files.magerun.net, direct link to this release: n98-magerun2-1.3.1.phar.

Happy developing and run the Magerun.

Extract from Changelog.md

  • Fix: Install command using wrong php binary and eating installer errors (report by David Lambauer, fix by Tom Klingenberg, #267)
  • Fix: Minor PHP version for Magento 2 extensions (by Alexander Turiak, #269)
  • Fix: Magento object manager usage in production mode (by Tom Klingenberg, #241)
  • Fix: Support for db-setting arrays (e.g. driver_options) (by Tom Klingenberg)
  • Fix: Class names in data setup twig template (by Jurgisl, #262)
  • Fix: Regex in VariablesCommandTest (by Jürgen Thelen, #255)
  • Imp: Build phar reproduceable and from dev requirements (by Tom Klingenberg)
  • Imp: Support NULL values in config:set and config:get (by Tom Klingenberg, #208)
  • Imp: Better handle incomplete Magento 2 installments (by Tom Klingenberg)
  • Imp: Dispatch adminhtml_cache_flush_all with cache:flush (report by Viktor Steinwand, #263)
  • New: Compilation of the bash autocomplete-file (by Tom Klingenberg)
  • New: Add current Magento2 versions (thanks Pieter Hoste, #270)
  • New: Add current Magento2 versions (by Tom Klingenberg)
  • New: Add sys:cron:schedule command (by Pieter Hoste, #257)
  • New: Port of design:demo-notice command (by Jürgen Thelen, #69)
  • New: Build with PHP 7.1 for some jobs (by Tom Klingenberg, #256)
  • New: Port of admin:notifications command (by Jürgen Thelen, #29)
Categories
Magerun

n98-magerun2 version 1.3.0 is out

Long time no stable releases, Magerun 2 Version 1.3.0 opens up a new release cycle incorporating more and more stability fixes and improved commands for the new Magento platform.

This ones coming from SymfonyCon which reminded us for the upcoming cloud based setups we need to ship new features for which we need to ship the current version first.

We recommend to upgrade the version for everyone. Magento 2 is still an emerging field and Magerun still has some rough corners. So stay current.

Extract from Changelog.md

  • Fix: Fatal error when running Magerun 2 inside a Magento 1 tree (by Tom KLingenberg, #253)
  • Fix: Add missing areas to the observer list (by Pieter Hoste, #249)
  • Fix: Do not drop all sales_order_status* tables (report by Brent Jameson, fix by Tom KLingenberg, #239)
  • Fix: Prevent Mysql deadlock on admin password change (by Tom KLingenberg, #242)
  • New: Add Magento CE 2.1.2 (by Raul E Watson, #252)
  • New: Debug output on –skip-root-check option (by Tom Klingenberg)
  • New: Interactive console: Support for initial code argument (by Christian Münch)
  • New: Introduced test framework (by Christian Münch)
Categories
Magerun

n98-magerun2 version 1.1.7 is out

This is just a quick notice about the immediate release of N98-Magerun2 which updates the installer for the latest and greatest Magerun 2 Community Edition 2.0.5.

You can learn more about the updates of Magento itself in the Magento CE 2.0.5 Release Notes.

Next to that it ships with some fixes and maintenance updates to keep things fresh.

We also followed suit to stabilize composer after it went gold in the beginning of April.

Composer goes Gold: The great Composer 1.0.0 release which also marks its 5th anniversary

After its initial 1.0.0 release we can now require it in a stable manner following semantic versioning. Reminds me now to add some checks before pushing out a release – or now then afterwards:

We also keep upstream projects like composer in the loop when we run over a Magerun 2 or Magento 2 induced issue. As some of you have already noticed, there were some patches in the latest Composer version that now allow Satis to archive Magento 2 zip (and a few days later tar) packages. This shows again how Magento 2 developers can more and more benefit from using and contributing to Magerun 2 as it’s part of a greater eco-system.

I hopefully can blog about some development changes soon, this will include combined development between Magerun 1 + 2 and another topic will be on how to locally have a development version of Magerun fully integrated with a Magento version incl. tests and building the phar file.

So keep on running Magerun and thanks for all the your feedback and contributions.

Categories
Magerun Uncategorized

Sunny Weather Double Feature Magerun Release

The weather is splendid over here and so that it keeps that way on your servers, after the latest stable releases it came to our attention that a little less used feature (home-directory based modules) was broken.

Yesterdays release of n98-magerun2 version 1.1.6 and todays release of n98-magerun version 1.97.17 address this issue.

The development now aims towards more sharing of code between the Magerun repositories so that we can better handle maintenance for Magerun 1 and the development of new features in Magerun 2 with a benefit in both projects.

That being said, it could be we’re seeing more and more releases of both projects close to each other. Also you’ll see some more code-improvements in Magerun 1 + 2.

Categories
Magerun

Released n98-magerun2 version 1.1.5

With the release of Magento CE 2.0.4 out the door, a new maintenance release of N98-Magerun2 is available.

Next to offering a new Magento 2 package, there was probably one noteworthy bug patched for the URL sys-check. The rest of the changelog is merely improvements of the code-base and testing. All Changes are:

  • Fix: #172 Base-URL check on IP addresses (TK)
  • Fix: Whitespace and code-style (TK)
  • Feature: Install command: magento-ce-2.0.4 version (TK)
  • Feature: Extract config-loader (TK)
  • Feature: Add dry-run mode for db:dump (TK)

Some legwork for upcoming features.

Categories
Magerun

Released n98-magerun2 version 1.1.4

Magerun 2 - Best run with Magento 2

You might have already noticed we were a bit late with the Magerun releases for the new Magento releases. It’s busy times in the office with all the new and shiny Magento 2 to teach, learn, read and tinker around. And so many new and shiny things to develop for Magerun 2 🙂 – So finally I can announce we shipped out Magerun 2 version 1.0.4 today which now offers the setup for Magento CE 2.0.1 and 2.0.2.

Categories
Magerun

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.

Example:

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.

Example:

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.

Categories
Videos

Magento 2 installation

Downloads all… Magento source, composer, …

Categories
Magerun

n98-magerun2 – Project Update 2015-01

n98-magerun2 Updated

After some busy days and a intermediate update of n98-magerun V1 i ha time to give the code base a little bit love.
In the meantime i got help from EliasZ who ported a lot of n98-magerun commands to V2.

Newly ported commands

This command were ported in the last 30 days:

  • cache:clean
  • cache:enable
  • cache:disable
  • cache:flush
  • cache:list
  • config:get
  • config:set
  • config:delete
  • dev:symlinks
  • dev:template-hints-blocks
  • dev:template-hints
  • sys:maintenance
  • sys:setup:compare-versions
  • sys:setup:run
  • dev:module:list
  • dev:module:observer:list
  • script
  • shell
  • self-update

Feel free to test the command in your Magento 2 installation and send us pull requests/issues if
you find a problem.

Automatic dependecy injection

As we started one of the first things was to fetch the Magento 2 ObjectManager which is needed
to create instances of Magento 2 objects.
In n98-magerun we can use the object manager (inside a command) as service locator.

Example:

Now we improved the system a little bit and implemeted a new system for automatic dependecy injection.
It’s very simple and simiar to constructor injection in Magento 2 modules.
We introduced a new magic method inject. If this method is defined in a command class we automatic
parse the arguments and try to inject all objects.
Another side effect is that Magento is initialized and no manual “initMagento” call is needed anymore.

Example:

Use the inject method if you need some Magento objects in your command. If the method is not available
the command behavior is like before.

We don’t removed the getObjcetManager method.

Statistics

As written in previous post we first try to port all commands from Version 2. The milestone progress has reached 30%.

Categories
Magerun

n98-magerun2 – Project Update 2014-12

n98-magerun2 Updated

Last month we started the development of Version 2 of n98-magerun which will only run with Magento 2.
After the official release of Magento 2 Dev-Beta 1 we must change some parts of the tool according to some refactored stuff in Magento 2.
If you checkout the code on github please note that we port any command one at a time.
This is why we don’t only add the same features, we also refactor all the code we put into the n98-magerun2 code base.

As one of the first thing we did a complete refactor of the “install” command.

Installer

The new installer got a big refactoring. All the code is now organized in sub-commands. Sub-Commands are a new feature which should help us to cluster code of big commands (like the installer) into peaces of small code which is much better to extend and maintain.

The sub-command classes can be found in new namespace N98\Magento\Command\SubCommand.
There is an interface which must be implemented and a Abstract class which does the most the of work for you.

n98-magerun2-subcommands

The main installer commands like like this now:

Is that great? I hope you can see the difference.

The new installer command works like in Version 1 with one big difference. The main repository will be cloned and
all depencies are now fetched by composer. If you have composer installed on your system and n98-magerun2 can find
it we use the existing composer to install packages. If composer cannot be found we download and install composer
automatically in the new created Magento 2 root folder. So you can use composer after the installation.

Currently we found an issue in the sample data composer package. We hope the issue will be resolved soon.

Test System

We setup Travis for our QA. Like Magento 2 we dropped support for 5.3 and test only PHP 5.4 and PHP 5.5.
Magento 2 requires also at least MySQL 5.6. This is not available on Travis servers. How can we test now with Travis?
We looked at Magento 2 Travis file and found the solution. Travis supports installing 3rd party packages on testing platform.
This can be done, because after every build a snapshot of the system (before the test) will be restored.
So we copied the travis file code into ours and now we are able to test the complete n98-magerun installation.
Thanks to the Magento 2 core developers for the great setup.

The unit test framework is now also up to date to start test driven development.

https://travis-ci.org/netz98/n98-magerun2/builds/45283372

DB Commands

We already ported all DB related commands from Version 1.

  • db:console
  • db:create
  • db:drop
  • db:dump
  • db:import
  • db:info
  • db:maintain:check-tables
  • db:query
  • db:status
  • db:variables

There are some changes from Magento 1 to Magento 2. The first thing we investigated was the removed app/etc/local.xml file.
The config is now saved in the new file app/etc/config.php. This change to PHP offers us some new capabilities. The config can now contain ENV vars which is great in combination with i.e. docker.
The bad part is that other systems cannot process them like the old XML file.

In n98-magerun2 we changed the DatabaseHelper. The base config is now loaded in MagentoHelper.
If you need the base config you can load the config array in a command without Magento initalization.

The DB part could be refactored so that no code-change is needed.
The DB settings can be loaded like in “n98-magerun 1”.

If you are wondering where the tests are located… we added a new “dev” folder in the project root.

Please help us to test the n98-magerun2 code. We also accept pull requests for the develop branch. Please don’t update
the phar file. The phar file only exists in the master branch. We don’t build it in the develop branch.

If you search for the new features in master branch… We have not merged it yet. The phar file is not up to date.
Please use the develop branch to test the new features.