composer require autoload code example
Example 1: composer autoload dump
composer dump-autoload
Example 2: composer autoload
require __DIR__ . '/vendor/autoload.php';
$log = new Monolog\Logger('name');
$log->pushHandler(new Monolog\Handler\StreamHandler('app.log', Monolog\Logger::WARNING));
$log->addWarning('Foo');
Example 3: composer don't load class
composer dumpautoload -o
Example 4: php composer update
php composer.phar update
Example 5: composer add package
composer require name-of-package