Composer "Could not scan for classes" error during update

Aperta
#58 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
30/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
php
Ambito
build-system

Direzione di ricerca

Start by reading the reported .gitignore rules and the included test-composer/composer.json in the installed plugin, then trace how the package is included during Composer installation. Confirm whether those files cause the class-scan warnings and identify the intended installation behavior. Done means the warnings’ cause and a reliable fix are established; the issue does not name tests or implementation files.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

I am receiving this error from Composer:

$  sudo -u www-data php composer.phar update
Could not scan for classes inside "/var/www/mail.<redact>.com/vendor/roundcube/carddav/carddav.php" which does not appear to be a file nor a folder
Could not scan for classes inside "/var/www/mail.<redact>.com/vendor/roundcube/carddav/dbmigrations/" which does not appear to be a file nor a folder
Loading composer repositories with package information
Updating dependencies
Nothing to modify in lock file
Installing dependencies from lock file (including require-dev)
Nothing to install, update or remove
Generating autoload files
30 packages you are using are looking for funding.
Use the `composer fund` command to find out more!
No security vulnerability advisories found.

The directory roundcube/carddav/ does not exist in the vendor directory. I searched the server to delete all of the user composer settings and cleared the composer cache using 'composer clearcache'. I also deleted the lock file and recreated it with an update and then I deleted the vendor folder and ran 'composer install'. None of those fixed the problem.

Next, I searched the vendor folder for 'roundcube/carddav'. This is more complicated because I have the carddav plugin installed and working correctly. I found that string in a file named /var/www/mail.(redact).com/vendor/roundcube/plugin-installer/test-composer/composer.json

The first part of the file contains:

{
"name": "roundcube/plugin-installer-test",
"require": {
"roundcube/carddav": "^4 || ^5"
},

Looking at the .gitignore for the plugin, I see this:

/test-composer/*
!/test-composer/composer.json

So it looks like when I delete the vendor directory and allow composer to re-install it, composer installs /vendor/roundcube/plugin-installer/test-composer/composer.json which it should not. Am I correct and can I just delete this directory to fix the error messages?

Lingua principale
PHP
Stelle
35
Fork
21
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di roundcube/plugin-installer

Tutte le issue di roundcube/plugin-installer

Issue simili

Altre issue su PHP

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.