Remove vendor directory and composer.lock from project repository

Created on 13 September 2022, almost 2 years ago
Updated 8 February 2024, 5 months ago

Problem/Motivation

Having composer.lock file and vendor directory at project repository is not needed and not according to Drupal's best practices.

📌 Task
Status

Active

Version

2.0

Component

Code

Created by

🇫🇮Finland sokru

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • 🇬🇧United Kingdom catch

    Bumping this to major because it means that fully updating to H5P 1.25 requires an update to the vendor directory. I've committed an issue that allows update via composer, but that makes the app vendor directory out of sync with the module one 📌 Allow update to H5P editor/core 1.25 Fixed .

    H5P uses some css/js from this directory though, so it's not as easy as deleting it, those would have to be included another way. A possible solution would be a build step for the module to extract those files from h5p core and add them in a css/js vendor directory without any of the PHP code though. Maybe just be deleting the PHP files from /vendor?

  • 🇨🇦Canada ShaunDychko

    The /h5p/vendor/ directory can't really be deleted since not only are so many CSS and JS files referenced in code, but it's also in the resize JS link in embeds, so removing it would somewhat break other sites that have embedded an H5P. Also, the composer.json needs to lock down a specific version of the dependencies in order to have a match between the dependencies included in the module's /vendor and the dependencies installed by composer in the project's root /vendor. The merge request in 🐛 Support h5p/h5p-core:1.26 and h5p/h5p-editor:1.25 Needs work deletes the autoloader and all php files included in the module, and keeps the composer.lock file in order for the version installed in the project /vendor to match the CSS and JS shipped with the module's /vendor directory.

Production build 0.69.0 2024