Since our last release, our focus has been aimed not only at development but also at work with our community, like Shopsys Roadshow, online workshops and most recently preparation for talks at conferences like phpCE in Prague and Symfony Live in Berlin.
Nevertheless, we’ve managed to implement some very interesting features this time around — the biggest highlight is that you can now develop your project in Docker on Windows! We have also written a manual for running Shopsys Framework on Docker in production and created a cookbook for domains and locales settings. It is also worth mentioning that our repository now contains a license overview of included 3rd party libraries.
World of Docker
Docker on Windows
We were aware of the fact that Windows is not a suitable platform when one wants to use Docker for development. In the past, we encountered huge performance restrictions that made Windows development impossible. However, as a significant number of developers in our region use Windows, we did not want to let them down or force them to switch their operating system. We discovered that it is possible to use the same approach as we use for Mac users, i.e. leveraging the docker-sync tool. To that end, we prepared the infrastructure (you can check the particular changes in source codes in pull request #499) and we are happy to report that it is now possible to comfortably develop a project based on Shopsys Framework in Docker on Windows. The whole installation process from scratch now takes roughly 3 hours and is described in the installation guide for Win 10 Pro.
Shopsys Framework on Docker in Production
There have been many discussions about whether it is a good idea to use Docker in production. Shopsys Framework is developed as a containerized application and the recommended production installation will be achieved using Kubernetes orchestration. However, there are many projects that probably won’t need this complex solution but we want to provide them with a helping hand as well. As we are very familiar with all the issues involved with a native server installation, we decided to embrace the Docker approach. As a result, our docs now contain detailed step-by-step instructions for configuring production server and deploying projects based on Shopsys Framework using Docker containers.
Developer Experience
Domains and Locales Settings
The default Shopsys Framework configuration provides two domains, the first one has English localization, and the second one has Czech locale settings. Of course, it is possible to change the domain and locale settings however you want — e.g. you can create a single domain application, add new domains, create a new localization, etc. Recently, we created a cookbook covering various scenarios that will guide you through the process of domains and locales settings so it is now very easy to launch an online store with the desired configuration.
Upgrading Instructions
One of the key qualities of Shopsys Framework is the upgradability of its core and components so your project can use the new features and bug fixes. Even though we sometimes make backward compatibility breaking changes during this stage of development, we want to help you with upgrading as much as possible. We are maintaining all upgrading instructions in the UPGRADE.md file. Following the instructions, we upgraded our demoshop, originally built on the older Shopsys Framework version. If you are interested, you can take a look at all the changes in source codes in pull request #20 in demoshop repository.
During the upgrading process, we discovered a few imperfections in the upgrading guide. Based on our experience, we improved the instructions so other developers do not encounter such problems anymore. We also established processes that ensure that upgrading your project to a new version of Shopsys Framework is as easy as possible and UPGRADE.md provides all the relevant information and instructions.
10x Better Composer Performance
Installing or updating composer dependencies is a part of our installation and everyday development process. Seeing as we run composer quite often, we want it to be as fast as possible. As a first improvement, we started using the hirak/prestissimo composer plugin that enables parallel installation of the dependencies. Secondly, we got rid of dependencies on custom repositories and unreleased branches. Exchanging these for packages that are released properly on packagist.org drastically speeded up the resolution of the dependencies. Before the tweaks, installing composer dependencies was taking upwards of five minutes or longer in some cases. Now it’s only a matter of seconds. If you are interested in implementation details, you can take a look at pull requests #496 and #490.
Čtěte také