Releases: scandipwa/create-magento-app
v2.0.0-alpha.0 - v2.0.0-alpha.10
PHP containers are here and no more MySQL!
This version brings a significant change in how magento-scripts
operates.
We removed PHPBrew and MySQL in favour of our custom docker PHP image and MariaDB.
Why was PHPBrew removed?
PHPBrew is a great utility for building multiple PHP versions on your system, but unfortunately it has a major design flaw - it needs PHP to build PHP. And not just any PHP, PHPBrew requires PHP 7.4 to run.
Another major problem is that it relies on system packages, that's why we have a lot of dependencies on prerequisites page in our documentation as well as a ton of logic to validate and install missing dependencies on each start of the project.
Recently Ubuntu released major LTS version 22.04 with a change from OpenSSL 1 to OpenSSL 3 which broke compilation for all PHP versions older than PHP 8.1.
And at this point, we decided to move back to PHP container.
This change will greatly reduce installation time for CMA on a new system since instead of compiling PHP we will just download images will PHP and all basic PHP extensions and run it right away.
Will this affect speed on macOS?
For the best experience on macOS, it is recommended to enable VirtioFS in the Docker Desktop settings > Experimental Features section.
See blog post from the Docker team introducing VirtioFS.
Why was MySQL removed?
We observed a very strange behaviour with MySQL 5.7 on Linux systems with Docker Engine. When started container will consume all resources given to the system and basically freeze the computer.
In addition to that, we already have MariaDB in our setup for macOS on ARM64 chips (M1) because MariaDB actually has ARM64 images that can run on those systems.
So we decided to bring more consistency to our setup and move everyone to MariaDB.
Since existing setups are still running on MySQL we developed a migration script that will run if it detects that you have MySQL volume in your project. The process is automated, the user just needs to press ENTER a few times to get a new working setup.
How the version 2 will behave compared to the version 1?
When magento-scripts
starts, it will just check if you have Docker on your system, it is running and you have permission to access docker.socket (/var/run/docker.sock
). That is it for Requirements check step.
In the next step, it will make sure that the project is stopped, as it was previously, and then begin configuring it.
The configuration step includes converting the setup from MySQL to MariaDB, pulling container images, creating a docker network, creating volumes and building project images.
During the build of project images magento-scripts
will create 2 new images for your project. We need 2 images because one is a standard PHP container image and the second one includes the XDebug PHP extension, so we can change to debug image on-the-fly with one command option (-d).
After the project image is built we start running Magento right away.
No more broken dependencies, mess in your system dependencies and hours wasted on PHP compilations (finally!).
What else?
- Dead Varnish instance will now be handled during the Waiting for Varnish step for Magento 2.3.x versions. 3593e7a
- Added fix for collation issue in the
import-db
command. 4c13c68 --import-db
option was removed fromstart
command. aa36b7e- Composer in the project image will store packages in separate volume for the cache. 114172d
- Added ElasticSearch 6.8 image for X86/ARM64 architectures.
magento-scripts
will be able to run Magento 2.3.0-2.3.4 on ARM64 systems (and M1 macs). 9905605 62e9ad4 - Make env overridable for ElasticSearch. 3fa8a2a
- Added Magento 2.4.5, 2.4.4-p1, 2.4.3-p3, 2.3.7-p4 support. b69f200
- Fixed running of
php
,composer
andmagento
"binaries" fromcli
. All options (likephp --version
, orcomposer --version
) will be processed correctly now. 4016465 - If the PHP container is not running start a new container instead. (affected commands:
exec
,cli
) 1e8358e 98acf61
Final notes
All our PHP & Elasticsearh 6.8 images are hosted in ScandiPWA repo packages and the source code of all images is located in ./container-images folder.
v1.16.1
v1.16.0
Bug Fixes
- Fixed checking for the process running as root on Windows. 10b808c
- Fixed an issue with parsing and building of
workspace.xml
configuration for PHPStorm. eaefa83 - Fixed retrieval of disabled PHP extensions. This will resolve issues with the XDebug extension being installed every time it is disabled instead of just enabling it. c28833d
- Added
keepalive
setting in Nginx container configuration files to resolve possible issues with running Varnish on some projects. 29812c0 - Check for installing Rosetta 2 has been moved before installing MacOS dependencies. 508468c
- PHP-FPM start has been moved before starting Docker services. 57c203b
- Added Magento setup in database after running Magento project setup if
setup:db:status
returns code 1. 09e5986 - Added check for if a user with username admin exists in the database before running
setup:install
. ebf8660
Improvements
- Added ssl-terminator to
exec
andlogs
command description. 61568bf c71d5ef - Persisted Query setup has been moved to update-env-php task. 2328851
- Added updating of adminuri setting from
cma.js
toenv.php
in update-env-php task. 2328851 - Added a prompt to disable or remove prestissimo Composer plugin in your project if you have it installed. 4cecab9 b2be66e
- Resolved memory leak issue in
execAsyncCommand
utility. a40a876 status
command will now also print port forwarding information for containers that are connected to host network. eceeefc- Refactored container image pulling logic to eliminate race conditions. a40b533
- Added check for if docker containers have started or not. f628da6
- Refactored database dump import logic, added option to choose user to use in MySQL client during database import. c24f6bf
-
- Added prompt to drop database
magento
before importing dump to eliminate possible interference with old data in database. 00f9495
- Added prompt to drop database
v1.15.7
Bug Fixes
- Removed
xmlrpc
PHP extension from the extension list as it was redundant for the setup. Also, it was removed from PHP 8.0 and moved to PECL, but ATM on PECL only beta versions are available. 1b00d02 - Added correct proxy timeouts in
ssl-terminator
Nginx container to prevent 504 errors. 4b1822a - Fixed
missing cache folder
forssl-terminator
. 8880b08
Improvements
- Database migration changes! #70 (Thanks @aleksandrsm)
- Magento
setup:install
will not remove the database if the installation of it was unsuccessful. 2db6851 magento-scripts
will check itenv.php
andconfig.php
files exists and if they don't, or database is empty, will install fresh database usingsetup:install
- Magento
- Added automatic installation of Brew using the native path as well as using Rosetta 2 on M1 macs. PHPBrew dependencies were moved to general dependency list. 50588e2