I last updated a drupal module in late October 2019.
I have Drupal Core 8.8 installed.
I have GDPR 2.0.0. Alpha 7 installed.
When I try to update a module now (Dec 25th ) I get the following message (regardless of the module I want to update):
Quote
bash-3.2$ php -d memory_limit=-1 /usr/local/bin/composer require 'drupal/admin_toolbar:^2.0'
./composer.json has been updated
> DrupalProject\composer\ScriptHandler::checkComposerVersion
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.
Problem 1
- drupal/gdpr 2.0.0-alpha7 requires ext-zip * -> the requested PHP extension zip is missing from your system.
- drupal/gdpr 2.0.0-alpha7 requires ext-zip * -> the requested PHP extension zip is missing from your system.
- drupal/gdpr 2.0.0-alpha7 requires ext-zip * -> the requested PHP extension zip is missing from your system.
- Installation request for drupal/gdpr (locked at 2.0.0-alpha7, required as ^2.0) -> satisfiable by drupal/gdpr[2.0.0-alpha7].
Installation failed, reverting ./composer.json to its original content.
bash-3.2$
Unquote
Can anyone help - my whole system has become non-updateable!
Many thanks
Andy
| Comment | File | Size | Author |
|---|---|---|---|
| #10 | 3103098-10.patch | 3.72 KB | kevinfunk |
| #6 | 3103098-README-ext-lib-macos-dependency.patch | 949 bytes | philosurfer |
Comments
Comment #2
Andy-vv commentedI manged to solve this by making the alpha-7 version of GDPR explicit in my .json file and also setting the minimum stability requirement as "alpha". There must have been some conflict going on with other dependencies tht was creating an open loop.
Comment #3
philosurfer commentedComment #4
philosurfer commentedUpdated ticket to bug report added tags and changed version to 8.x-2.x-dev as it is happening at the tip of the development branch as well.
Comment #5
philosurfer commentedIt seems that the issue is appearing for some because macOS Catalina no longer installs this php library locally by default people will get this error when composer installing on their local without it.
Noting: that many would argue running composer locally on your macOS is not a good idea. You should be running it in a VM or container that matches your production environment's stack configuration.
2 things need to be done here:
1) for people compiling composer locally on macOS Catalina, add the library see: Stackexchange topic
2) Update README that reflects the dependency and link out on how to meet the requirement.
Comment #6
philosurfer commentedTo fix the problem on macOS the following worked for me:
- update xCode
- then run the following:
Note: Use at your own risk as this will now make brew the manager of your PHP executable and could potentially break other PHP applications on your local machine. *not likely, but possible.
attached is a patch to the README.md on the topic.
Comment #7
philosurfer commentedAdditional note, I had to update my *new* php.ini file to increase memory allocation for composer to run properly (previously did this in my native macOS php version as well.
Updated title for people running into the same issue.
Comment #8
james.williamsHow much is the zip extension *really* needed for this project? Perhaps its use could simply be disabled when the extension is not available, and then the dependency could be removed (replaced as a package 'suggestion' instead)?
Comment #9
philosurfer commentedSeems to be that GdprTasksSarWorker.php has all the deets!
Comment #10
kevinfunkPatch removes the need for
ext-zipby usingDrupal\Core\Archiver\Zip.Comment #11
golddragon007 commentedThe #10 patch doesn't solve anything. Here's why:
1. Drupal\Core\Archiver\Zip using the same library like the original code (ZipArchive) ergo the `ext-zip` is still needed.
2.
Useless, the original constructor code does the same in a much simpler way.
3.
This has two issues:
a/ Useless, the original add() code does the same in a much simpler way (in this form).
b/ Later on this code is fed by two parameters instead of one, and the second parameters is not necessary just the file name as you implemented and totally ignored.
For me on some Linux distributions, it's also wasn't install these composer dependencies. But at least it catching if you missing something.
Comment #12
mhavelant commentedAs suggested by @james.williams ext-zip should be moved to suggested packages. Additionally, gdpr_tasks should check for this in hook_requirements.
Comment #14
mhavelant commented