magento-cloud icon indicating copy to clipboard operation
magento-cloud copied to clipboard

Improving the installation process of the magento Cloud template

Open guvra opened this issue 2 years ago • 0 comments

Hi,

The installation process of this cloud template has multiple pain points compared to community/enterprise edition. As a consequence, it is quite complex to maintain a dev tool chain that automates the creation of a Magento project.

Here are the main issues:

  1. This repository is not hosted on packagist:

    • Initializing a Magento community/enterprise project: composer create-project.
    • Initializing a Magento cloud project: git clone -b 2.4.4 --depth 1 [email protected]:magento/magento-cloud.git .
  2. In composer.json, the require-dev section is missing. So in our boilerplate, we have to create a temporary Magento enterprise project (with --no-install option), get the dev packages list with composer show -s (involves using sed and grep to filter the output...), and add them to the Magento cloud project with composer require...

    It's standard practice to include dev packages by default. On a production environment, you are supposed to run composer with the --no-dev option.

  3. The autoload-dev section is not up to date. The following entry is missing:

    "autoload-dev": {
        "psr-4": {
            "Magento\\PhpStan\\": "dev/tests/static/framework/Magento/PhpStan/"
        }
    }
    

    This missing entry cannot be added with the composer command-line, so the only way to add this missing entry is to edit the file manually.

edit: I would also suggest the following improvements:

  • Removing the composer.lock file from this repository.
  • Settting the min stability to "stable".

guvra avatar May 15 '22 12:05 guvra