ComposerRequireChecker
ComposerRequireChecker copied to clipboard
There were no symbols found Error
Just installed this and tried it, but I get the following Error:
composer-require-checker check
ComposerRequireChecker 2.1.0@0c66698d487fcb5c66cf07108e2180c818fb2e72
In CheckCommand.php line 99:
There were no symbols found, please check your configuration.
check [--config-file CONFIG-FILE] [--ignore-parse-errors] [--] [<composer-json>]
I have also tried it with a config file. Same result. Any ideas?
@landwire do you have a composer.json
with an "autoload"
section?
No, I don't have an autoload section. How do I know what to put in there?
How are classes loaded in your project?
As for "what to put in there", see https://getcomposer.org/doc/01-basic-usage.md#autoloading
I also have this question. What if composer.json
does not have autoload
section? In the framework I'm using web requests are routed to index.php
that require __DIR__ . '/../../vendor/autoload.php';
and console scripts are started with console app that also require __DIR__ . '/vendor/autoload.php';
This library is about detecting issues within your sources: no autoload
section means "no sources".
It's a relatively healthy assumption.
Closing here, since there was no further feedback.
The easiest way would be to add a "classmap" autoloading definition with all the paths that contain your production code. But using "PSR-4" or maybe "PSR-0" would be the preferred way. See the details in https://getcomposer.org/doc/01-basic-usage.md#autoloading and https://getcomposer.org/doc/04-schema.md#autoload