magento / magento-cloud

Magento Cloud
Open Software License 3.0
206 stars 237 forks source link

Improving the installation process of the magento Cloud template #529

Open guvra opened 2 years ago

guvra commented 2 years ago

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 git@github.com: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: