L
L
lotrop2016-12-18 20:12:05
PHP
lotrop, 2016-12-18 20:12:05

Can you clarify the composer autoload issue?

I downloaded the library https://packagist.org/packages/dakota/pchart to my project using composer .
When I try to call the class, it gives the error "Class not found". How do I load this class, shouldn't Composer do it automatically? Plus, in my project I use namespaces. And in this library they don’t exist at all, what to do in such a situation? Explain, please, since I use composer only for the second day.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
C
Cat Anton, 2016-12-18
@lotrop

1. Have you included vendor/autoload.php?
2. If you are talking about this library, then autoload is not configured at all in composer.json.

A
amorphine, 2016-12-18
@amorphine

composer dump-autoload -o

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question