Drupal Composer package code example
Example 1: drupal composer update
composer update drupal/core 'drupal/core-*' --with-all-dependencies
Example 2: composer drupal install
composer create-project drupal/recommended-project my_site_name_dir
composer update drupal/core 'drupal/core-*' --with-all-dependencies
composer create-project drupal/recommended-project my_site_name_dir