As I have written before, we are big fans of Mark Shust's Docker Configuration for Magento project. Even though we customized the setup a bit for our needs, it comes with a lot of good stuff out of the box, like Xdebug support.
Besides being big fans of Mark Shust's Docker Configuration for Magento project as I already blogged about, we also love Traefik, the Cloud Native Edge Router. I discovered Traefik years ago and try to use it wherever we can. Depending on the project's goals we either use the open-source version or the enterprise edition. Disclaimer: I am Traefik Ambassador, so I might be a bit biased :)
We are big fans of Mark Shust's Docker Configuration for Magento project. We use a lot of our projects, the ones we start from scratch as well for ones that we have taken over and have some weird setup in place that we simply cannot get to work.
A few days ago Jordi announced the first dev build of Composer 2.0. I immediately went and downloaded it. Since version 2.x should be a lot faster, I thought it is a good idea to test it against a current Magento 2 project I am working on. I was a bit disappointed first because Composer failed with quite a few errors like that:
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.