Answer the question
In order to leave comments, you need to log in
Why doesn't autoloading my classes through composer work?
There is a project on which composer successfully works with connected libraries. I also wanted to use it to autoload my own classes. I used this manual for the most part .
In the main composer folder (where composer.json) I created a control folder, moved the classes there. For example, in control/Standart/MyCrypt.php:
<?php namespace Control\Standart;
class MyCrypt {
use Control\Standart\MyCrypt;
...
"autoload": {
"psr-4": {"Control\\": "control"}
}
}
'Control\\' => array($baseDir . '/control'),
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question