.git repository should not be included with composer package

Created on 24 January 2018, over 6 years ago
Updated 4 March 2023, over 1 year ago

When installing Coder via composer, it appears to be bundled with its' .git repository folder. This results in git attempting to track the vendor/drupal/coder folder as a submodule, and leaves "dirty" working directories when no other changes are present. This is sub-optimal.
Please remove the .git folder from the composer package.

Output of git status after composer require drupal/coder:

Changes not staged for commit:
  (use "git add ..." to update what will be committed)
  (use "git checkout -- ..." to discard changes in working directory)
  (commit or discard the untracked or modified content in submodules)

        modified:   docroot/vendor/drupal/coder (modified content)

no changes added to commit (use "git add" and/or "git commit -a")

It seems this is happening because drupal.org git repositories don't have a nice dist integration with packagist. We could switch packagist to use our Github repo at https://github.com/pfrenssen/coder , but it is tied to a personal Github account from pfrenssen.

We did this before in the past until klausi took a break from Coder maintenance, handed over the repository and wanted to archive/delete it. This caused a critical cascade for Drupal core and thousands of Drupal sites having this repository referenced in their composer.lock files. See #2919773: Fail to download drupal/coder because github.com/klausi/coder has gone missing β†’ for all the fun.

It is a bit unfortunate that packagist only really works with Github repositories and not other repositories like drupal.org for us.

Proposed solution

Maybe we can move https://github.com/pfrenssen/coder under the official drupal organization on Github https://github.com/drupal ? Then it would be a bit safer from deletion than in a personal account and we could use that.

Then we can set Github again as repository on packagist and composer will install a dist version of Coder without a .git folder.

πŸ› Bug report
Status

Fixed

Version

3.0

Component

Coder Sniffer

Created by

πŸ‡ΊπŸ‡ΈUnited States AdamBernstein

Live updates comments and jobs are added and updated live.
  • git

    Used in Documentation issues for documentation related to Git

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.

Production build 0.69.0 2024