laminas / laminas-stdlib

SPL extensions, array utilities, error handlers, and more
https://docs.laminas.dev/laminas-stdlib/
BSD 3-Clause "New" or "Revised" License
190 stars 40 forks source link

The .git directory is missing #76

Closed mohammadzo closed 1 year ago

mohammadzo commented 1 year ago

Bug Report

It looks like Drupal 9.4.8 is using this project. During my update process. I am seeing the following prompt:

  - Upgrading laminas/laminas-stdlib (3.10.1 => 3.13.0):     Update failed (The .git directory is missing from /Users/mohammad.zomorodian/clients/stfx1/vendor/laminas/laminas-stdlib, see https://getcomposer.org/commit-deps for more information)
    Would you like to try reinstalling the package instead [yes]? yes

This is not a dev version can you please let me know why the project contains a .git. folder? This is causing issue for us for our composer/automation because there is no any ways to respond to this prompt without typing yes.

Could you please fix this issue?

gsteel commented 1 year ago

Sorry @mohammadzo - this is an issue with Drupal, one of its dependencies, or how you are installing your dependencies.

Composer will install dist packages by default, excluding the .git directory (Which is the source of the error message you provided). I would first start by figuring out why composer is trying to install dependencies from source, and perhaps investigate where this library is required by using composer why laminas/laminas-stdlib

Have you committed your vendor directory?

Please also read the the linked composer documentation here

I'm closing this issue as invalid because the source of your problem is not here and we are unable to help you further with your problem.

mohammadzo commented 1 year ago

Thank you very much for your reply. Yes vendor committed. The issue is my our hosting platform doe not let to commit repository in a repository. I am not installing the source. I am running$ composer update drupal/core -W then it prompt me to the following:

  - Upgrading masterminds/html5 (2.7.5 => 2.7.6): Extracting archive
  - Upgrading laminas/laminas-stdlib (3.10.1 => 3.13.0):     Update failed (The .git directory is missing from /Users/mohammad.zomorodian/clients/stfx1/vendor/laminas/laminas-stdlib, see https://getcomposer.org/commit-deps for more information)
    Would you like to try reinstalling the package instead [yes]?

the laminas/laminas-feed has required by drupal core and laminas/laminas-stdlib by laminas/laminas-feed:

$ composer why laminas/laminas-stdlib
laminas/laminas-feed           2.17.0 requires laminas/laminas-stdlib (^3.6)
laminas/laminas-servicemanager 3.12.0 requires laminas/laminas-stdlib (^3.2.1)
laminas/laminas-text           2.9.0  requires laminas/laminas-stdlib (^3.6)

$ composer why laminas/laminas-feed
drupal/core 9.4.1 requires laminas/laminas-feed (^2.17)

Even I have the following in the composer.json:

"preferred-install": "dist"

and

"prefer-stable": true

It is interesting why I am getting this prompt.