d8-contrib-modules / cloudflare

Cloudflare Module for Drupal
16 stars 14 forks source link

Free tier setup instructions include modifying Drupal core's composer.json #59

Open markdorison opened 7 years ago

markdorison commented 7 years ago

Description

The freetier_setup.md documentation specifies:

From the root of your site run install composer dependencies: composer require d8-contrib-modules/cloudflarephpsdk "1.0.0-alpha5"

When this command is run, Drupal core's composer.json is modified to add the new dependency. When a user then subsequently updates Drupal core; best case scenario they have to mentally account for that change and be sure it is not overwritten, worst case, they will unintentionally remove the dependency with the next core update. Is it not possible to add this dependency in a way that does not modify core?

Expected Result

I would expect the core-provided composer.json to not be modified.

Actual Result

Drupal core's composer.json is modified.

Proposed Resolution

Is it possible to include the dependency via a composer.json within the module itself?

greggles commented 5 years ago

I think the instructions are just wrong. I ran: composer require 'drupal/cloudflare:^1.0' in the root of my site to add this module and it pulled in the cloudflarephpsdk just fine. I think this section of the docs could just be removed.