When working with Magento you will find a lot of challenges to tackle, the Magento community prepared a lot of tools to streamline those challenges and make development more productive. Here is a list of tools that can be helpful when working with Magento.
n98-magerun2
n98-magerun2 (https://github.com/netz98/n98-magerun2) – is everything you miss in the core Magneto bin/console (or maybe you didn’t know that you are missing it). It extends Magento’s built-in CLI with additional commands that help with various development and maintenance tasks.
The key features:
- Database Management – powerful commands to dump, import, and query databases.
- Admin User Management – more commands to manage admin users like password change.
- Cron Management – advanced features to run and debug cron, you can run specific cron without executing others.
- Cache Management – commands to debug and flush specific cache entries.
- Config Management – commands to explore and make configs faster.
- Commands to manage things from the admin panel in CLI – a handy option to change or do some actions without leaving the console.
- Additional commands for development like enabling template hints, and exporting translation files.
And many more… n98-magerun2 adds over 100 new commands.
There is more… there are a lot of third-party modules that add additional comments to n98-magerun2. These extensions tackle various needs that you can encounter during Magento development. You can find it here:
https://github.com/netz98/n98-magerun2/wiki/3rd-party-n98-magerun2-modules
Magento 2 Cache Clean with a file watcher
This simple but powerful tool can end the nightmare of flushing caches during Magento development. File watcher looks for files you edit and then flushes necessary caches, so you can stop thinking about flushing cache and just develop stuff. It also helps with the known-to-everyone issue when you look at why something is not working, and in the end, it turns out to be just a cache. Check it out: https://github.com/mage2tv/magento-cache-clean
Upgrade / Patch helper
This handy script helps you with upgrading Magento and third-party modules to newer versions by detecting overrides of core files. It helps you find out what was updated and how, what impact it has, and suggest what to check.
https://github.com/AmpersandHQ/ampersand-magento2-upgrade-patch-helper
Anonymized Database Dumps
Working on a local or stage environment with a database with data that is as close as possible is beneficial. You can prepare your solution on similar data as they will be used in production, you can also test the performance and check other things before the code goes to production. But as the production database contains customer data we cannot just use it like this. We need to take care of privacy and proper processing of customer data. You can export dump without customer data or you can easily dump the database and anonymize the customer data there. So you can use it with peace of mind. This tool prepared by Smile can help you prepare GDPR-ready dumps:
https://github.com/Smile-SA/gdpr-dump
Magento PhpStorm Plugin
When developing Magento modules, debugging code, etc you need to jump between multiple files, from core classes through XML declarations to plugins or other types of extensions. You also need to create a lot of boilerplate code to make simple things work. This plugin for PhpStorm helps you navigate through the codebase and develop new Magento code.
https://plugins.jetbrains.com/plugin/8024-magento-phpstorm
Ray
In one sentence I can describe this tool as an xdebug for those who like to put var_dump things. It comes from the Laravel ecosystem, but it can be used with PHP and not only PHP. It’s a powerful tool to debug your application. You can do remote debugging with it. On a free license, you can only print 10 logs at once but it’s worth considering the full license.
https://myray.app
Docker for the development of Magneto
This is one of the most popular Magento-related projects that you can find on GitHub. Full docker setup for Magento 2 that helps you set up your local environment quickly. It comes also with handy tools to boost Magneto development. Some of the tools mentioned in this article are already included in this repository.
https://github.com/markshust/docker-magento
Code generators
While researching this article I tried a lot of code generator tools that help you create boilerplate for Magento modules or even the full implementation of common things like admin grids. There are a lot of problems with such tools. Firstly, a lot of them are outdated, they propose using some way of doing things from an early version of Magento 2. Secondly, even if they have the current way of doing things, they still can not quite well much your way of doing things, or just have some code style mismatch that fixing takes more time than just writing it from scratch or just copy-pasting it from another module. Finally, some generators require a lot of different inputs, variables, etc which are hard to name without context. The best tool to generate boilerplate is mentioned in Plugin for PhpStorm but still generating UI components grid or form is a nightmare as there are a lot of inputs to fill.
I believe that the future here will be Copilot which we can ask to generate a specific boilerplate and it can name things from context or ask for specific things when context is needed. It will match the code style of other code in your project and it will make sure that it fits the codebase.
If you want to explore more and check other tools, please check this repository: https://github.com/run-as-root/awesome-magento2?tab=readme-ov-file#tools
It contains a list of resources related to Magento, unfortunately some of them are already outdated.
Be First to Comment