Currently in D7, people can download core and modules as zip files and upload them to a cheap hosting via FTP.
(They can also use the module downloader, but I think I never used this myself, so no idea if this even works :) Afaik you need to give write permissions to www-data which I like to avoid.)

In Drupal 8, if you have modules that introduce composer dependencies in addition to those in core, you need to run composer update with the CLI. This is going to be difficult for the cheap hosting + FTP scenario. Especially with #2380389: Use a single vendor directory in the root.

One solution is to run Composer locally and copy the changes to the server with FTP. But some people might not even be comfortable with that.

Other considerations:

  • We don't want to ask for extensive file write permissions for www-data, if we can avoid it.
  • Module upload with zip in D7 is not a comfortable thing, let's be honest about that. Those poor souls have a hard life already now. I think they even need to work with zip files for module *updates*. Ouch.

Proposed solution

Let core require composer, so it can download composer libraries.

Create a module with a UI to configure a "contrib module download wishlist". This can be used for new modules, and also for module updates.

Once you are happy with the wishlist, the module can:

  • Determine the combined Composer dependencies for core + the wishlist modules.
  • Warn about conflicts.
  • Maybe this means to generate (*) a combined composer.json file.
  • Download (*) the modules and the Composer packages.
  • Reduce the downloaded stuff to those files that are modified.

(*) The composer.json and the downloaded stuff can go into on of:

  • The private files directory.
  • A separate web-writable download directory.
  • A zip file to download.

So far this leaves the existing site completely untouched.

Now the user can copy this stuff over the existing source files manually, and take responsibility for any permission changes.

This workflow enables Composer, and is more comfortable (imo) than what those people currently do in D7.

The module could be introduced in core in 8.1.*, or it could even live in contrib.. although for this we would need a core version with Composer included.
But we might want a proof-of-concept implementation soon, to reduce the fear factor of issues like #2380389: Use a single vendor directory in the root

Caveat: Afaik, in some cases Composer needs stuff like git to download dependencies that are not on Packagist. But we might find a way to work around that.

Comments

donquixote created an issue. See original summary.

donquixote’s picture

One problem here could be that this functionality depends on a working Drupal installation.
If you mess that up, you can no longer use it for downloading anything.

Maybe we could work around this by making this somewhere lower level where it does not depend on the database or so.

geek-merlin’s picture

This sounds to me like a good combination of both worlds: leveraging composer while still supporting ftp-only users.
Indeed this tool need not be in drupal core. It may be a cross-platform desktop tool.

hestenet’s picture

geek-merlin’s picture

Another idea: We could extend the installer to do such stuff.

Version: 8.1.x-dev » 8.2.x-dev

Drupal 8.1.0-beta1 was released on March 2, 2016, which means new developments and disruptive changes should now be targeted against the 8.2.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.2.x-dev » 8.3.x-dev

Drupal 8.2.0-beta1 was released on August 3, 2016, which means new developments and disruptive changes should now be targeted against the 8.3.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.3.x-dev » 8.4.x-dev

Drupal 8.3.0-alpha1 will be released the week of January 30, 2017, which means new developments and disruptive changes should now be targeted against the 8.4.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.4.x-dev » 8.5.x-dev

Drupal 8.4.0-alpha1 will be released the week of July 31, 2017, which means new developments and disruptive changes should now be targeted against the 8.5.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.5.x-dev » 8.6.x-dev

Drupal 8.5.0-alpha1 will be released the week of January 17, 2018, which means new developments and disruptive changes should now be targeted against the 8.6.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Mixologic’s picture

Issue tags: +Composer

adding some findability

Version: 8.6.x-dev » 8.7.x-dev

Drupal 8.6.0-alpha1 will be released the week of July 16, 2018, which means new developments and disruptive changes should now be targeted against the 8.7.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.7.x-dev » 8.8.x-dev

Drupal 8.7.0-alpha1 will be released the week of March 11, 2019, which means new developments and disruptive changes should now be targeted against the 8.8.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.8.x-dev » 8.9.x-dev

Drupal 8.8.0-alpha1 will be released the week of October 14th, 2019, which means new developments and disruptive changes should now be targeted against the 8.9.x-dev branch. (Any changes to 8.9.x will also be committed to 9.0.x in preparation for Drupal 9’s release, but some changes like significant feature additions will be deferred to 9.1.x.). For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

Version: 8.9.x-dev » 9.1.x-dev

Drupal 8.9.0-beta1 was released on March 20, 2020. 8.9.x is the final, long-term support (LTS) minor release of Drupal 8, which means new developments and disruptive changes should now be targeted against the 9.1.x-dev branch. For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

Version: 9.1.x-dev » 9.2.x-dev

Drupal 9.1.0-alpha1 will be released the week of October 19, 2020, which means new developments and disruptive changes should now be targeted for the 9.2.x-dev branch. For more information see the Drupal 9 minor version schedule and the Allowed changes during the Drupal 9 release cycle.

Version: 9.2.x-dev » 9.3.x-dev

Drupal 9.2.0-alpha1 will be released the week of May 3, 2021, which means new developments and disruptive changes should now be targeted for the 9.3.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.3.x-dev » 9.4.x-dev

Drupal 9.3.0-rc1 was released on November 26, 2021, which means new developments and disruptive changes should now be targeted for the 9.4.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.4.x-dev » 9.5.x-dev

Drupal 9.4.0-alpha1 was released on May 6, 2022, which means new developments and disruptive changes should now be targeted for the 9.5.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.5.x-dev » 10.1.x-dev

Drupal 9.5.0-beta2 and Drupal 10.0.0-beta2 were released on September 29, 2022, which means new developments and disruptive changes should now be targeted for the 10.1.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

cilefen’s picture

I am marking this a duplicate of the project browser and automatic updates initiatives.