Problem/Motivation
Based on https://github.com/drud/ddev/issues/1929, there seems to be a few things we can do to improve notification that this module doesn't support full Composer based workflows.
Proposed resolution
- Read only filesystem for vendor
- Vendor insufficient space
- /core" is read only" is just incorrect
And lastly, add a "requirements" check to module's .install file for location of vendor folder in relation to core folder. If the site is a fully composer based install, don't allow module to be installed.
Remaining tasks
User interface changes
API changes
Data model changes
Release notes snippet
| Comment | File | Size | Author |
|---|---|---|---|
| #6 | interdiff_2-6.txt | 714 bytes | heddn |
| #6 | 3093700-6.patch | 14.74 KB | heddn |
Comments
Comment #2
heddnComment #5
heddnAdding credit.
Comment #6
heddnComment #7
ressaI have also recently seen messages like
Drupal core filesystem at "/var/www/html/web/core" is read onlyandThere must be at least 10 megabytes free.mentioned in Readiness Check for Drupal Automatic Update returns errors running on DDEV testing the module in Drupal 8 via Composer installation in Lando.I have tested the patch (#6) with a Composer install in Lando, and it works as expected, showing this text after clicking "run the readiness checks":
Comment #8
ressaAlso, I get this message if I try to enable the module from
admin/modules, so that works fine as well:I am able to enable it via Drush, though:
Comment #9
heddnThere's not much we can do about #8. I noticed the same thing. But we have it plastered all over everywhere in README.md, project page, official documentation and a hook_requirements, which will show up on the site status. I think that is about as good as we can do.
Comment #10
ressaI agree. Checkboxes probably can't be disabled on the module install page, like they can on on the uninstall page ... Also, it is stated very prominently that the installation fails the readiness checks.
Comment #11
ressa... and thanks for all your good work on the module, like adding this feature :-)
Comment #13
heddnAnd thanks for all the great testing and feedback from the community. Pushed to 8.x. Working on a backport to 7.x.
Comment #14
heddnThere's nothing in here that needs backporting to 7.x from what I can tell. There's no default vendor folder.
Comment #15
ressaI just tested the latest dev-version with a Drupal tar-ball in Lando, but get an error ("The website encountered an unexpected error.") if I try to enable the module ... The code in #6 patch looks different than the code which got committed in the
automatic_updates.installfile:https://git.drupalcode.org/project/automatic_updates/blob/a5952429359dab...
The same bit in #6 patch:
if (!is_dir(\Drupal::root() . DIRECTORY_SEPARATOR . 'vendor')) {If I change the two lines of code in the module to the single line from patch in #6, I can install the module. (It fails if I try the experimental upgrade from 8.4.7 to 8.8.0-beta, but that's another issue ...)
The error:
My Lando install process, for my own documentation:
Comment #17
heddnAnd fixed once again. Using the checker was an attempt to keep code simple. But apparently class loading isn't available at at that point... so I brought back the procedural approach that essentially clones the checker.
Comment #18
ressaCool, thanks. Latest version works as expected, refusing in Composer-based installation with "Error message: This module does not currently support relocated vendor folder ..." and no errors in tar-ball install, when enabling the module.