Skip to content

Releases: scandipwa/create-magento-app

v2.0.0-alpha.0 - v2.0.0-alpha.10

01 Sep 12:15
Compare
Choose a tag to compare
Pre-release

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 from start 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 and magento "binaries" from cli. All options (like php --version, or composer --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

08 Jul 17:24
Compare
Choose a tag to compare
  • Fixed an issue with missing admin_user table on empty database. 5d0a682
  • Moved waiting for varnish to return code 200 task to run after theme setup. 96efa57

v1.16.0

08 Jul 12:44
Compare
Choose a tag to compare

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 and logs command description. 61568bf c71d5ef
  • Persisted Query setup has been moved to update-env-php task. 2328851
  • Added updating of adminuri setting from cma.js to env.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

v1.15.7

09 Jun 15:25
Compare
Choose a tag to compare

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 for ssl-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 it env.php and config.php files exists and if they don't, or database is empty, will install fresh database using setup:install
  • 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

v1.15.6

07 Jun 15:28
Compare
Choose a tag to compare

Bug Fixes

  • Fixed issue with connection to MariaDB on MacOS with M1. fe0710c

Improvements

  • Removed the second prompt after confirming to enable composer plugins. 3d4d336

v1.15.5

07 Jun 13:43
Compare
Choose a tag to compare

Bug Fixes

  • Fixed an issue for older Magento versions that don't have 2FA module installed. 138d486

v1.15.4

07 Jun 13:30
Compare
Choose a tag to compare

Bug Fixes

v1.15.3

06 Jun 15:20
Compare
Choose a tag to compare

Bug Fixes

  • Fixed a few places where type errors can occur during creation of phpstorm configuration. a540e1b 70ecb8b e69649d
  • Fixed an issue with connecting to MySQL if the magento database does not exist. 2f1f156

Improvements

  • Added handling of the error during Magento installation to the database if the encryption key is not valid. (The default website isn't defined. Set the website and try again.). c795410
  • Added gd to dependency list on macOS for compiling PHP for PHPBrew. d10fd5b

v1.15.2

03 Jun 15:45
Compare
Choose a tag to compare

Bug Fixes

  • Fixed an issue Cannot read property repositories of null. e423f6a

v1.15.1

03 Jun 15:16
Compare
Choose a tag to compare

Small but important Bug Fixes!

Bug Fixes

  • Added Magento edition retrieval for config file generation, as sometimes cma.js does not exist, but composer.json does and magento-scripts are still asking for edition to choose. 1ba846d
  • Added logging for analytics errors in GA_DEBUG mode. 4d82c0a
  • Bumped smol-request to 2.1.2. dbc6fbf