Categories
Magerun

Released n98-magerun version 1.97.0

version_1_97_0

A new version of n98-magerun spreads the world. This release focus software refactorings.
To check the improvements we added our project to scrutinizer.

scrutinizer_n98_magerun_201507

As you can see in the list out team and the community did a lot of work during the last weeks.

Features

The release contains also some functionality improvements like a correcred cookie domain check in sys:check command or checksums for installer download sources.

One big advantage for command developers is the new “soft init” mode. Some commands need only the Magento autoloading and not a fully initialized store.
A new parameter “$soft” was added to initMagento method.

Example command code:

Magento CE 1.9.2.0

The official Magento CE 1.9.2.0 is currently not available as simple download. You need to login at magentocommerce.com to download the source code.
So we are not able to provide you an official download.
As alternative the “magento-mirror-1.9.2.0” (https://github.com/LokeyCoding/magento-mirror/archive/1.9.2.0.zip) was added to the list of downloads.

If the official download url will be published we will add it n98-magerun.

Changelog

  • #549 general code cleanup (by Simon Bräuer)
  • #564 Print only magento version -> sys:info command (by David Alger)
  • #572 fixes and improvements (by Tom Klingenberg)
  • #573 Improve observer list accuracy (by Peter O’Callaghan)
  • #574 reduced complexity observer list command (by Tom Klingenberg)
  • #580 reset magento root folder in N98\Magento\Application::reinit (by Claudio Kressibucher)
  • #590 Bugfix/Bash Completion on OS X (by Joey Hoer)
  • #591 Bugfix/Configuration Agnostic ZSH Completion (by Joey Hoer)
  • #593 n98-magerun.phar dev:module:create –add-all does not create setup scripts (by Michael Lühr)
  • #599 Excluding wishlist tables (by Aaron Edmonds)
  • #600 Update lookup command (by Tomas Liubinas)
  • #602 Update Travis configuration (by Tom Klingenberg)
  • #603 Feature/autoload restorer (by Tom Klingenberg)
  • #604 Fix Cookie Domain validation (by Tom Klingenberg)
  • #610 Checksum for package downloads (by Tom Klingenberg)
  • #614 Package magento-mirror-1.9.2.0 (by Achim Rosenhagen)
  • #618 CommandTester normalization of Display (by Tom Klingenberg)

Update to latest version

Please note that we changed the download path of all phar files with the last release. This means that We don’t update the phar file at github anymore.
If you are updating and fetch version 1.96.1 you should run “self-update” again.

To directly download the phar file from our server please visit http://files.magerun.net.

Categories
Magerun

Changed download URLs for phar version

download_url_changed

Please note that the download of the phar version of n98-magerun from github is now deprecated.
We created a new file hub to deliver phar files of each version.

The new website will provide nightly builds of the development version.
Our goal is to remove the phar to reduce the repository size (i.e. for a faster composer installation) file from main repository in the next half year.

If n98-magerun is used in any automatization you should replace the download url to the new one.

Old URL

https://raw.githubusercontent.com/netz98/n98-magerun/master/n98-magerun.phar

New URL

http://files.magerun.net/n98-magerun-latest.phar

Download Hub

If you visit the new download page http://files.magerun.net you will see a list of links to the generated phar files.
The new site lists version of n98-magerun for Magento 1 and n98-magerun2 for Magento 2 on the same page.

files_magerun_net

The new phar file creation service will give us more speed to provide new versions of n98-magerun and n98-magerun2.
We hope you like the new service.

Categories
Magerun

Released n98-magerun version 1.96.0

magerun_1_96_0

We release a new version of our Magento CLI tool.

The changelog in this release is a little bit longer. Thats the result of the great community which supports the tool with great new features and many bug fixes to stabilize it in every new release.
The new release adds many new features (admin:user:change-status, dev:theme:info) or extends existing commands like db:dump or the installer.

If you created some issues in the last weeks you should be noticed that two developers of netz98 are now maintaining the issues beside me. They also develop new features and do QA for the project.
You can identify them on github by there usernames redshark1802 and tkn98.
I hope you like that good news. With the bigger core team we try to solve all the incoming issues with shorter response times.

Changelog

  • #505 new command admin:user:change-status (by Cristian Quiroz)
  • #514 Some small database connection & db:info improvements (by Pieter Hoste)
  • #515 Autocompletion for oh-my-zsh (by Johannes Klein)
  • #517 Update ordering of compare-versions so that output is alphabetised (by Luke Rodgers)
  • #518 PhpStorm autocompletion / Mac folde (by Rafael Correa Gomes)
  • #522 Add db_prefix support to installer command. (by Peter O’Callaghan)
  • #524 Update readme.rst (by Mehdi Chaouch)
  • #526 Hide password when creating admin account. (by Peter O’Callaghan)
  • #527 Fix global options swallowing arguments. (by Peter O’Callaghan)
  • #532 Optimization fixes and improvements (by Alexander Menk)
  • #533 Unattended install fail when unable to access database, but still produce clean exit code. (by Simon Bräuer)
  • #535 Added display current design settings on particular store (by Lucas Olucha)
  • #537 Fixing plurality language in rewrite conflict detection (by Steve Robbins)
  • #538 dev:console disappeared (by Christian Münch)
  • #542 Add tests for some of the admin:user commands. (by Peter O’Callaghan)
  • #544 Fixing travis integration (by Steve Robbins)
  • #553 Add option to dump binary columns using hexadecimal notation (by David Moises Paz Reyes)
  • Added windows system utilities (by Tom Klingenberg)
  • Support for git bash (by Tom Klingenberg)
  • Added Magento 1.9.1.1 to installer (by Christian Münch)
  • Added –only-download option to Magento installer
  • Updated 3rd party components
Categories
Magerun

Released n98-magerun Version 1.95.0

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:

  • #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 n98-magerun.phar dev:console.

Init Magento

dev_console_initialization

PHPDoc

dev_console_doc

Local Variables

dev_console_dump_variables

dev_console_local_variables

Show Code

dev_console_show

  • 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)
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 Tips

Creating a local Magento repository for n98-magerun

Milan Simek created a blog post about creating your own local repository of sample-data and Magento installers.

http://plugin.company/blog/creating-local-magento-repository-n98-magerun/

Categories
Magerun Tips

Send all queued emails

mail_cron

Since Magento CE 1.9.1 all “new order emails” are queued. A new defined cronjob core_email_queue_send_all is now processing the queued emails.
During development it’s not very handy to run the job by a minute based scheduler. In this case you can use n98-magerun to start the cronjob manually.

Categories
Magerun

Released n98-magerun Version 1.94.0

n98-magerun-1-94-0

Today we released a new version of n98-magerun (1). This is the first stable release of 2015.
Most of the time we spent in development n98-magerun2 but this don’t mean that 1.x branch will get no new features.

Giftcard management

Steve Robbins created a list of commands to work with EE Giftcards

Before any creation of new gifcards you need a generated giftcard pool. This can be done in Magento Admin system configuration (System -> Configuration -> Giftcards -> Gift Card Account General Settings) where you can define i.e. the format of the generated codes.
If you don’t like to change the defaults or have configured the giftcard pool already a handy new command gitcard:pool:generate can be used.

If a pool is available you can create new cards with the giftcard:create command by passing the amount as argument.

Informations about an existing giftcard can be obtained with giftcard:info command.

  • #443 Create, view, and remove gift cards (by Steve Robbins)

Show Cronjobs history in your timezone

With new –timezone option it’s now possible to see the cronjob history in another timezone than UTC+0.

Examples:

  • #416 Convertstimes to local or specified timezone (by Steve Robbin)

Disable commands by config.

In some cases it’s possible to have a command conflict. One case is if you have two 3rd party modules which define the same
command name (not PHP namespace).
In such cases you are now able to disable a command by it’s fully qualified class name over any config.
This is also useful for providers which install n98-magerun and like to disable some commands.

Example:

This will disable the db:drop command.

Smaller fixes and improvements

  • #428 Add newsletter table group for db:dump command (by Christoph Aßmann)
  • #441 config:dump produces invalid xml (Andrew Stayart)
  • #452 Added .DS_Store to .gitignore (by Hervé Guétin)
  • #462 dbHost not respected #462 (by Achim Rosenhagen)
  • #463 Fixed missing sprintf when creating Exception in sys:cron:run command (by Tim Eydamos)
  • #464 SampleData in Version 1.9 are not downloading (by Rafael Corrêa Gomes)
  • #453 Add store parameter to template hints commands (by Hadrien Collongues)
  • Removed Magento 2 bootstrapping -> Moved into n98-magerun2