lando / pantheon

The Official Lando Pantheon plugin.
https://docs.lando.dev/pantheon
GNU General Public License v3.0
11 stars 18 forks source link

Add composer install build step to php recipes. #76

Closed serundeputy closed 2 years ago

serundeputy commented 6 years ago

Currently the Pantheon recipe runs composer install as part of the build process. Let's move it from that recipe upstream to all PHPy recipes that inherit from lamp/lemp.

This will solve lando/lando#381 and users can now gain there own control over running composer automatically or not by setting the composerSwitch disableAutoComposerInstall key to true.

pirog commented 6 years ago

@serundeputy as a FYI i changed the name of the key so its SUPER CLEAR what it does https://github.com/lando/lando/blob/master/examples/pantheon/.lando.yml#L39

serundeputy commented 6 years ago

Yep; I saw that thanks! #namingthingsishard;

jbertoen commented 6 years ago

As an addition, wouldn't it be sweet if we could include some "global" libraries from the configuration of the .lando.yml to the build? Which would make sure that tools like drush or console that someone might want globally is available on the service. We often are "tired of waiting" for composer install to be finished. http://jackmcdade.com/blog/tired-of-waiting They for instance recommend to globally require prestissimo to speed up the composer install process. Works like a charm for our drupal setup btw. something like

composerGlobalRequire:
  - hirak/prestissimo
  - drush/drush 
  - drupal/console
pirog commented 6 years ago

@jbertoen you can already do this! https://docs.devwithlando.io/services/php.html#lamp-example check out the composer key.

also worth mentioning that composer global usage is discouraged