Posts

Showing posts with the label oprimize

Composer life hacks

Image
Composer life hacks Switching between composer 1 & 2: composer  self-update --1   --> switch to composer 1 composer  self-update --2   -->  switch to composer 2 If you only want to install, upgrade or remove one dependency, you can explicitly list it as an argument: php composer.phar update monolog/monolog [...] composer dump-env dev - will generate .env.local.php (which you can change with your needs) Installing tools globally: php composer.phar global require friendsofphp/php-cs-fixer or just  composer global require friendsofphp/php-cs-fixer To clear the Composer cache, the standard command is: composer clear-cache Rebuild Autoloader : If you added new classes and they aren't being found, use: composer dump-autoload This rebuilds the class map and files needed for autoloading. Optimize Autoloader : To speed up your application (common for production), use: composer dump-autoload -o Ignore Cache During Install: To install or upda...