For quite a while I wanted to upgrade the Docker setup for the open-source Force Login module we develop for Magento 2. We were using a very old version of Mark Shust's Docker Configuration for Magento setup. Since there were a lot of changes how things work nowadays, the upgrade was not simple and came with a few side-effects. The latest version of the setup requires Magento to be checkout out locally and to be mounted in the container. If you develop a Magento application that totally makes sense, but for our module, it felt it makes more sense to have the Magento application code in the container as it used to be in the old setup. This led to a bunch of changes that I'll cover below.
A few weeks back at MageTestFest 2019 in Florence, I gave a presentation on QA tools I like and gave some insights how they can be used in a Magento project. One of the tools I mentioned was PHPStan - a static analysis tool. PHPStan helps you to detect a lot of problems in your code due to using wrong types, calling methods that might not exist, passing the wrong number or types of arguments to methods and so on. PHPStan is also able to create your own rule sets of what behavior you want to check for.
One of our customers asked us to remove the delete option from the mass action element for the product grid. What sounded like a simple task evolved into a lot of debugging and testing. Apparently removing the mass action option from the xml configuration does not work even though a lot of StackOverflow posts say so. The only way that worked for me, was to do it programmatically like this:
In a recent project the client asked us to remove a few of the defined dataproviders for the autocomplete functionality. The consolidated DI configuration of the autocomplete element looks like this:
Sometimes you run into this situation when a git pull will responds with `Merge conflict in config.php`. How to solve this issue in a proper way? Let's have a look how other people solve similar issues, namely my friend Mr. Rafael Dohms. Quite a while ago he blogged about a similar problem on how to solve conflicts in Composer's lock file. This is what I learned from his blog post:
We have just released the first version of our magerun2 plugin "bitexpert/magerun2-list-api-endpoints". The plugin will print out a list of all defined webapi endpoints including their routes and defined resources. You are able to filter those routes by their respective HTTP method and name as well.
Last week we released version 1.2.0 of our Magento 2 Force Frontend Customer Login module which is compatible now with the latest 2.1 version of Magento. You can download the release on Github or require it via Composer:
Today, we release version 1.1.0 of our Magento 2 Force Frontend Customer Login module. Thanks to the feedback of some users, we could improve the module setup.
The administrative view of Magento 2 forces you to login, but in the website view the visitor can navigate as a guest through the pages. But if you do not wish to allow guest visitors to see your page without registration a valid login, Magento 2 leaves you on your own.
If you run the command: