Lando v3.0.0-aft.2 on Ubuntu 18.04
.lando.yml
name: drupallando
recipe: drupal8
config:
webroot: web
Tell us about the command you were running
composer create-project drupal/recommended-project drupallando
cd drupallando/
lando init --source cwd --recipe drupal8 --webroot web --name drupallando
lando start
Tell us about the error you got
$ lando php -v
...
PHP 7.2.29 (cli) (built: Mar 20 2020 02:03:45) ( NTS )
Tell us generally about your bug
As I read the documentation, the default PHP version should be 7.3. I can get PHP by adding this in .lando.yml and rebuilding, so it is available:
services:
appserver:
type: php:7.3
$ lando rebuild
$ lando php -v
...
PHP 7.3.16 (cli) (built: Mar 20 2020 00:06:33) ( NTS )
PS. As a side note, on the PHP documentation page my-service: is used. Perhaps it could be updated to the default appserver:? I remember trying to get this to work, when I started using Lando, as I am sure many other beginners are.
services:
my-service:
type: php:7.3
@gitressa this is expected based on your configuration. Note that there is a difference between a service and a recipe. A service is a singular thing eg php or mysql, a recipe is basically a preconfigured set of services.
The default php version for the php service is 7.3 which you can see in code here
https://github.com/lando/lando/blob/master/plugins/lando-services/services/php/builder.js#L85
and in our func tests here
https://github.com/lando/lando/tree/master/examples/php
However the default php version for the Drupal 8 recipe is 7.2, similarly
https://github.com/lando/lando/blob/master/plugins/lando-recipes/recipes/drupal8/builder.js#L19
https://github.com/lando/lando/tree/master/examples/drupal8
By similar reasoning appserver is a naming convention we use when setting up the application driving service in a recipe, however it needs to be user defined if you spin up a service directly eg without a recipe.
Thanks for a thorough explanation @pirog, that makes sense to me now :-)
I still do prefer to use appserver in the documentation, over my-service. My reasoning is that a beginner just starting out with Lando, and wants to do their first minor tweaking, like bumping up PHP will struggle and use a lot of time to figure out to use appserver, not my-service -- whereas the seasoned expert developer has no problem with diving deep into the documentation, to define advanced scenarios. But I respect your decision to keep my-service.
i'm fine to change my-service to something else as long as:
whateveryouwanttonameyourservice is whatever you want to name your service and does not have to be anything explicit eg appserverA potentially less time intensive/tedious alternative could be creating a lando "guide" for new users that explains these concepts with some working examples. eg "using lando recipes" or "using lando services" or "the difference between a recipe and a service".
If we had that we could also send it out to new users who elect to receive this kind of on boarding and training content
https://docs.lando.dev/contrib/guides-intro.html
I get your point @pirog, and agree that in the big picture, your suggestion of a Lando beginners guide, explaining the different concepts you outline with some working examples is a great idea.
When writing documentation, it's always a challenge to find the fine line between on-boarding beginners with simple and easy-to-understand examples, yet also show all the great features that are available.