Introducing n98-magerun2 v7.1.0 with a lot of new commands
We are excited to announce the release of n98-magerun2 v7.1.0 (Codename New York – Home of Meet Magento NY), which brings a host of new features and improvements to the Magento community. This release includes several new commands and enhancements that will streamline your Magento development and management tasks. Let’s dive into the details.
Manage Sales Sequences
Contributor Jeroen Boersma has added two new commands to manage sales sequences. These commands allow you to add and remove sequences. This feature is particularly useful when the store_add trigger is not always triggered for whatever reason, allowing you to manually create them. You can find more details about this feature in the pull request.
n98-magerun2.phar sales:sequence:add [The store code or ID]
n98-magerun2.phar sales:sequence:remove [The store code or ID]
The command fixes the issue described here: https://github.com/magento/magento2/issues/12318
Redeploy Base Packages
We have introduced a new command to redeploy base packages.
Background of the command: If there are changes in the base packages (e.g. magento2-base) the Composer installer does not copy them again because all the main projects files are only copied once.
More information about this command can be found in the pull request.
The config.yaml shipped in the n98-magerun2.phar defines a list of packages. The package list can be extended by an custom config file.
Extract of the output:
This command is a backport of netz98 internal Composer Plugin which is now available in n98-magerun2 for the public.
Kill Running Cron Jobs
Another new command introduced by us is
sys:cron:kill. This command is designed to kill running cron jobs intelligently, only affecting jobs on the machine where the PID exists. The command also includes interaction if no job code is provided. More details can be found in the issue.
n98-magerun2.phar sys:cron:kill <job_code>
If there are several jobs running and no job code is specified a user can select a job to terminate.
New Github PR Command
We have added a new command to work with Github PRs. The
github:pr command allows you to dump info of the PR, supports Mage-OS, and creates a patch file from PR number which can be applied to Magento. This command is particularly useful for developers who want to quickly apply changes from a Github PR to their Magento installation. More details can be found in the pull request.
n98-magerun2.phar github:pr <number>
n98-magerun2.phar github:pr --patch <number>
n98-magerun2.phar github:pr --mage-os --patch <number>
Do Less Compatibility Checks
We have also made an improvement to reduce the number of compatibility checks. The update skips the Magento Core Command in the Magerun Compatibility check and also skips the install and self-update command in the check as they are not Magento related. More details can be found in the pull request.
Debug Output for Magento Core Commands
In this release, we have also added a way to debug errors of
bin/magento. This feature is useful when
bin/magento is broken and you need to understand why. It provides debug output to help you diagnose and fix the issue. More details can be found in the pull request.
Error Example Output:
- Add: #1177: New commands to manage sales sequences (by Jeroen Boersma)
- Add: #1176: New command to redeploy base packages (by Christian Münch)
- Add: #1226: New sys:cron:kill command (by Christian Münch)
- Imp: #1179: New github:pr command (by Christian Münch)
- Imp: #1182: Add debug output if Magento Core Commands cannot be used (by Christian Münch)
- Imp: #1185: Do less compatibility checks (by Christian Münch)
- Imp: Print an error if generation:flush command cannot delete a directory (by Christian Münch)
- Imp: Update 3rd party dependencies (php-cs-fixer, psysh, phpstan, phpunit, requests, symfony)