Composer "Could not scan for classes" error during update

Offen
#58 1 Kommentar 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
2/5
Geschätzter Aufwand
1-3 Stunden
Anfängerfreundlichkeit
30/100
Issue-Typ
Bug
Klarheit
Größtenteils klar
Aktivitätsstatus
Veraltet
Tech-Stack
php
Bereich
build-system

Rechercherichtung

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.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

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?

Vorherrschende Sprache
PHP
Sterne
35
Forks
21
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Entwicklungsumgebung

Dieses Projekt bietet weder Dev-Container noch Dockerfile noch Beitragsleitfaden – die Einrichtung liegt bei Ihnen. Beginnen Sie mit der README; die allgemeinen Schritte stehen in unserem Leitfaden für den ersten Beitrag.

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus roundcube/plugin-installer

Alle Issues in roundcube/plugin-installer

Ähnliche Issues

Weitere Issues zu PHP

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.