7. Jul 2022 |

Composer notes

composer init – to create composer.json (not needed if you just run composer require {package}

composer dump-autoload – to regenerate namespaces in dependencies list (if composer.json is modified)

composer dump-autoload -o – generates optimised autoloading. Not actually needed in development.

Working with composer

Commit composer.lock but run composer update locally, composer install on server (ref).

composer outdated – checks if all packages are up to date
composer update – updates (installs) all outdated packages based on packagist.org.
composer install – installs packages based on composer.lock file

Version notation – Caret, Tilde, or Asterisk?

PHP version

Changing php version in Zone.

  • mkdir -p ~/bin && ln -sf /usr/bin/php74-cli ~/bin/php
  • mkdir -p ~/bin && ln -sf /usr/bin/php80-cli ~/bin/php

Leave a Reply

Your email address will not be published. Required fields are marked *

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

The reCAPTCHA verification period has expired. Please reload the page.