grasmash / composerize-drupal

Convert a non-Composer-managed Drupal application (e.g., one created via tarball) to a Composer-managed Drupal application.
MIT License
125 stars 20 forks source link

Handling drupal-scaffold and drupal/core-recommended #28

Closed mohammadzo closed 3 years ago

mohammadzo commented 4 years ago

I have two recommendation to improve this project: 1- As of Drupal 8.8, Drupal introduce drupal/core-composer-scaffold. It would be nice to make Composerize smarter to add drupal/core-recommended and drupal/core-composer-scaffold if user has 8.8 and greater. If less than 8.8 we should recommend to use drupal-composer/drupal-scaffold.

In addition to add drupal/core-composer-scaffold we also need add following to extra otherwise composer install will not install the core in the docroot or web folder.

  "extra": {
    "drupal-scaffold": {
      "locations": {
        "web-root": "./docroot"
      },
      ...
    }
  }

Also to follow best practices, I recommend to add drupal/core-vendor-hardening.

2- Since drupal-scaffold regenerates autoload.php file, Composerize should remove this file and let drupal-scaffold regenerate it to have the correct path to vendor folder.

I will create a pr to resolve this issues.

Thank you,

mohammadzo commented 4 years ago

@grasmash I have created a pr. Thank you. https://github.com/grasmash/composerize-drupal/pull/29

grasmash commented 3 years ago

Resolved.