Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Using https://github.com/drupal/recommended-project as recommended at https://www.drupal.org/docs/develop/using-composer/using-composer-to-ins... works fine for me with Drupal 8.8.0, however with 8.8.1 I am getting:
Uncaught Error: Class 'Drupal\Composer\Plugin\VendorHardening\FileSecurity' not found
Possibly related to #3079481: Fix problems Vendor Hardening Plugin has with using the File Security component
This is fixed for me by adding:
"drupal/core-vendor-hardening": "^8.8",
to the "require" section of https://github.com/drupal/recommended-project
Comment | File | Size | Author |
---|---|---|---|
#5 | composer.json_.txt | 2.93 KB | Peter Buchanan |
#5 | Composer update log for 8.8.4.txt | 7.98 KB | Peter Buchanan |
Comments
Comment #2
maxilein CreditAttribution: maxilein commenteddoing this before upgrading to D 8.8.1 gives me:
Comment #3
Peter Buchanan CreditAttribution: Peter Buchanan commentedI'm now getting the same error:
Fatal error: Uncaught Error: Class 'Drupal\Composer\Plugin\Scaffold\ScaffoldOptions' not found in /Users/ThinkGov/Documents/Websites/MAMPpro_test_sites/teijaeilola2/vendor/drupal/core-composer-scaffold/ManageOptions.php:57
Stack trace:
#0 /Users/ThinkGov/Documents/Websites/MAMPpro_test_sites/teijaeilola2/vendor/drupal/core-composer-scaffold/ManageOptions.php(44): Drupal\Composer\Plugin\Scaffold\ManageOptions->packageOptions(Object(Composer\Package\RootPackage))
#1 /Users/ThinkGov/Documents/Websites/MAMPpro_test_sites/teijaeilola2/vendor/drupal/core-composer-scaffold/AllowedPackages.php(122): Drupal\Composer\Plugin\Scaffold\ManageOptions->getOptions()
#2 /Users/ThinkGov/Documents/Websites/MAMPpro_test_sites/teijaeilola2/vendor/drupal/core-composer-scaffold/AllowedPackages.php(80): Drupal\Composer\Plugin\Scaffold\AllowedPackages->getTopLevelAllowedPackages()
#3 /Users/ThinkGov/Documents/Websites/MAMPpro_test_sites/teijaeilola2/vendor/drupal/core-composer-scaffold/Handler.php(145): Drupal\Composer\Plugin\Scaffold\AllowedPack in /Users/ThinkGov/Documents/Websites/MAMPpro_test_sites/teijaeilola2/vendor/drupal/core-composer-scaffold/ManageOptions.php on line 57
Any thoughts, I'm unable to implement the security update to Drupal 8.8.4 where I'm using composer
Comment #4
cilefen CreditAttribution: cilefen as a volunteer commentedWhenever there are Composer bugs or questions, it is helpful to post composer.json files and to tell us the Composer commands that have been executed.
Comment #5
Peter Buchanan CreditAttribution: Peter Buchanan commentedThanks cilefen, terminal log and composer.json files attached. json files not accepted for upload so converted to txt
Comment #6
ashwinr13 CreditAttribution: ashwinr13 commentedHas there been any movement on this issue? Im currently into the same issues as @peter.
Comment #8
fgmI noticed this issue today on a machine which used an old composer 1.7. Composer 2.0.8 broke due to plugin issues, but upgrading to 1.10.19 fixed the issue for me.
Comment #9
mmjvb CreditAttribution: mmjvb as a volunteer commentedThe json provided is drupal/drupal, not drupal/recommended-project. It is using the merge plugin to introduce drupal/core. The project needs to be composerized to fix the issue.
Comment #13
quietone CreditAttribution: quietone at PreviousNext commentedThe vendor hardening was fixed in Drupal 8.8.1 in #3079481: Fix problems Vendor Hardening Plugin has with using the File Security component.
I am closing this as outdated (Drupal 8 is EOL). If anyone is still have this problem, add a comment explaining what actions you took and change the status to 'Active'.
Thanks.