Skip to content

Commit

Permalink
update composer tests
Browse files Browse the repository at this point in the history
  • Loading branch information
AaronFeledy committed Jan 7, 2025
1 parent fd0419d commit 379c058
Show file tree
Hide file tree
Showing 21 changed files with 52 additions and 74 deletions.
28 changes: 14 additions & 14 deletions docs/config.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,25 +40,25 @@ Like with `apache`, `nginx` will use the the default version of our [nginx](http
```yaml
services:
myservice:
type: php
via: apache
type: php:8.4
via: apache:2.4
```

#### With nginx

```yaml
services:
myservice:
type: php
via: nginx
type: php:8.4
via: nginx:1.27
```

#### As CLI

```yaml
services:
myservice:
type: php
type: php:8.4
via: cli
```

Expand All @@ -67,7 +67,7 @@ In CLI mode you can optionally tell the php cli service to boot up with an arbit
```yaml
services:
myservice:
type: php
type: php:8.4
via: cli
command: php /app/src/artisan horizon
```
Expand All @@ -79,8 +79,8 @@ By default Lando will serve the app from the root of your repo. If you'd like to
```yaml
services:
myservice:
type: php
via: nginx
type: php:8.4
via: nginx:1.27
webroot: docroot
```

Expand All @@ -93,7 +93,7 @@ If you are using `xdebug` version 3, which is installed by default for `php` 7.2
```yaml
services:
myservice:
type: php:7.4
type: php:8.4
xdebug: "debug,develop"
```

Expand All @@ -106,7 +106,7 @@ If you'd like to override Lando's out of the box `xdebug` config the easiest way
```yaml
services:
myservice:
type: php:7.4
type: php:8.4
xdebug: "debug,develop"
overrides:
environment:
Expand All @@ -120,7 +120,7 @@ You can also modify or unset `XDEBUG_MODE` in a similar way. For example if you
```yaml
services:
myservice:
type: php:7.4
type: php:8.4
xdebug: true
overrides:
environment:
Expand Down Expand Up @@ -215,7 +215,7 @@ An example of globally installing `phpunit/phpunit` `^6.5` is shown below:
```yaml
services:
myservice:
type: php
type: php:8.4
composer:
phpunit/phpunit: ^6.5
```
Expand All @@ -225,7 +225,7 @@ An example of using a [build step](https://docs.lando.dev/services/lando-3.html#
```yaml
services:
myservice:
type: php
type: php:8.4
build:
- composer install
```
Expand Down Expand Up @@ -259,7 +259,7 @@ Note that you can put your configuration files anywhere inside your application
```yaml
services:
myservice:
type: php
type: php:8.4
config:
php: config/php.ini
server: config/nginx.conf
Expand Down
6 changes: 3 additions & 3 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,14 @@ You can easily add it to your Lando app by adding an entry to the [services](htt
```yaml
services:
myservice:
type: php:8.0
via: nginx
type: php:8.4
via: nginx:1.27
webroot: www
```
## Supported versions
* [8.4RC2](https://hub.docker.com/r/devwithlando/php) (experimental)
* [8.4](https://hub.docker.com/r/devwithlando/php)
* [8.3](https://hub.docker.com/r/devwithlando/php)
* [8.2](https://hub.docker.com/r/devwithlando/php)
* [8.1](https://hub.docker.com/r/devwithlando/php)
Expand Down
4 changes: 2 additions & 2 deletions examples/5.6/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,8 @@ lando exec defaults -- curl http://localhost/path_info.php/a/b.php | grep SCRIPT
# Should allow cli services to specify a boot up command
lando info -s cliworker --deep | grep Cmd | grep sleep | grep infinity

# Should use preinstalled composer 1.x when composer_version is false
lando exec cliworker -- composer --version --no-ansi | tee >(cat 1>&2) | grep -q "Composer version 1."
# Should not install composer when composer_version is false
echo $(lando exec cliworker -- composer --version --no-ansi 2>&1) | grep "executable file not found"
```

## Destroy tests
Expand Down
4 changes: 2 additions & 2 deletions examples/7.0/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,8 @@ lando exec defaults -- curl http://localhost/path_info.php/a/b.php | grep SCRIPT
# Should allow cli services to specify a boot up command
lando info -s cliworker --deep | grep Cmd | grep sleep | grep infinity

# Should install the latest composer 1.x when composer_version is false
lando exec cliworker -- composer --version --no-ansi | tee >(cat 1>&2) | grep -q "Composer version 1."
# Should not install composer when composer_version is false
lando exec cliworker -- composer --version --no-ansi 2>&1 | grep "executable file not found"

# Should have node14 installed in cli service
lando node -v | grep v14.
Expand Down
4 changes: 2 additions & 2 deletions examples/7.1/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,8 @@ lando exec defaults -- curl http://localhost/path_info.php/a/b.php | grep SCRIPT
# Should allow cli services to specify a boot up command
lando info -s cliworker --deep | grep Cmd | grep sleep | grep infinity

# Should install the latest composer 1.x if composer_version is set to false
lando exec cliworker -- composer --version --no-ansi | tee >(cat 1>&2) | grep -q "Composer version 1."
# Should not install composer when composer_version is false
lando exec cliworker -- composer --version --no-ansi 2>&1 | grep "executable file not found"

# Should have node14 installed in cli service
lando node -v | grep v14.
Expand Down
4 changes: 2 additions & 2 deletions examples/7.2/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,8 @@ lando exec defaults -- curl http://localhost/path_info.php/a/b.php | grep SCRIPT
# Should allow cli services to specify a boot up command
lando info -s cliworker --deep | grep Cmd | grep sleep | grep infinity

# Should install the latest composer 1.x if composer_version is set to false
lando exec cliworker -- composer --version --no-ansi | tee >(cat 1>&2) | grep -q "Composer version 1."
# Should not install composer when composer_version is false
lando exec cliworker -- composer --version --no-ansi 2>&1 | grep "executable file not found"

# Should have node14 installed in cli service
lando node -v | grep v14.
Expand Down
2 changes: 0 additions & 2 deletions examples/7.3/.lando.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,8 @@ events:
services:
defaults:
type: php:7.3
composer_version: false
cli:
type: php:7.3
composer_version: false
via: cli
build_as_root:
- curl -sL https://deb.nodesource.com/setup_14.x | bash -
Expand Down
4 changes: 2 additions & 2 deletions examples/7.3/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,8 @@ lando exec defaults -- curl http://localhost/path_info.php/a/b.php | grep SCRIPT
# Should allow cli services to specify a boot up command
lando info -s cliworker --deep | grep Cmd | grep sleep | grep infinity

# Should install the composer 2.x using the false flag
lando exec cliworker -- composer --version --no-ansi | tee >(cat 1>&2) | grep -q "Composer version 2."
# Should not install composer when composer_version is false
lando exec cliworker -- composer --version --no-ansi 2>&1 | grep "executable file not found"

# Should have node14 installed in cli service
lando node -v | grep v14.
Expand Down
1 change: 0 additions & 1 deletion examples/7.4/.lando.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ events:
services:
defaults:
type: php:7.4
composer_version: false
cli:
type: php:7.4
composer_version: 1-latest
Expand Down
2 changes: 0 additions & 2 deletions examples/8.0/.lando.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,8 @@ events:
services:
defaults:
type: php:8.0
composer_version: false
cli:
type: php:8.0
composer_version: false
via: cli
build_as_root:
- curl -sL https://deb.nodesource.com/setup_14.x | bash -
Expand Down
7 changes: 2 additions & 5 deletions examples/8.0/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,6 @@ lando exec custom -- php -m | grep "xdebug"
# Should not serve port 80 for cli
lando exec cli -- curl http://localhost || echo $? | grep 7

# Should install the composer 2.x using the false flag
lando exec cli -- composer --version --no-ansi | tee >(cat 1>&2) | grep -q "Composer version 2."

# Should use custom php ini if specified
lando exec custom -- php -i | grep memory_limit | grep 514
lando exec custom -- curl http://custom_nginx | grep html_errors | grep On | grep On
Expand Down Expand Up @@ -110,8 +107,8 @@ lando exec defaults -- curl http://localhost/path_info.php/a/b.php | grep SCRIPT
# Should allow cli services to specify a boot up command
lando info -s cliworker --deep | grep Cmd | grep sleep | grep infinity

# Should install the latest composer 2.x by default.
lando exec cliworker -- composer --version --no-ansi | tee >(cat 1>&2) | grep -q "Composer version 2."
# Should not install composer when composer_version is false
lando exec cliworker -- composer --version --no-ansi 2>&1 | grep "executable file not found"

# Should have node14 installed in cli service
lando node -v | grep v14.
Expand Down
2 changes: 0 additions & 2 deletions examples/8.1/.lando.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,8 @@ events:
services:
defaults:
type: php:8.1
composer_version: false
cli:
type: php:8.1
composer_version: false
via: cli
build_as_root:
- curl -sL https://deb.nodesource.com/setup_14.x | bash -
Expand Down
7 changes: 2 additions & 5 deletions examples/8.1/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,6 @@ lando exec custom -- php -m | grep "xdebug"
# Should not serve port 80 for cli
lando exec cli -- curl http://localhost || echo $? | grep 7

# Should install the composer 2.x using the false flag
lando exec cli -- composer --version --no-ansi | tee >(cat 1>&2) | grep -q "Composer version 2."

# Should use custom php ini if specified
lando exec custom -- php -i | grep memory_limit | grep 514
lando exec custom -- curl http://custom_nginx | grep html_errors | grep On | grep On
Expand Down Expand Up @@ -110,8 +107,8 @@ lando exec defaults -- curl http://localhost/path_info.php/a/b.php | grep SCRIPT
# Should allow cli services to specify a boot up command
lando info -s cliworker --deep | grep Cmd | grep sleep | grep infinity

# Should install the latest composer 2.x by default.
lando exec cliworker -- composer --version --no-ansi | tee >(cat 1>&2) | grep -q "Composer version 2."
# Should not install composer when composer_version is false
lando exec cliworker -- composer --version --no-ansi 2>&1 | grep "executable file not found"

# Should have node14 installed in cli service
lando node -v | tee >(cat 1>&2) | grep v18.
Expand Down
2 changes: 0 additions & 2 deletions examples/8.2/.lando.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,8 @@ events:
services:
defaults:
type: php:8.2
composer_version: false
cli:
type: php:8.2
composer_version: false
via: cli
build_as_root:
- curl -sL https://deb.nodesource.com/setup_14.x | bash -
Expand Down
7 changes: 2 additions & 5 deletions examples/8.2/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,6 @@ lando exec custom -- php -m | grep "xdebug"
# Should not serve port 80 for cli
lando exec cli -- curl http://localhost || echo $? | grep 7

# Should install the composer 2.x using the false flag
lando exec cli -- composer --version --no-ansi | tee >(cat 1>&2) | grep -q "Composer version 2."

# Should use custom php ini if specified
lando exec custom -- php -i | grep memory_limit | grep 514
lando exec custom -- curl http://custom_nginx | grep html_errors | grep On | grep On
Expand Down Expand Up @@ -110,8 +107,8 @@ lando exec defaults -- curl http://localhost/path_info.php/a/b.php | grep SCRIPT
# Should allow cli services to specify a boot up command
lando info -s cliworker --deep | grep Cmd | grep sleep | grep infinity

# Should install the latest composer 2.x by default.
lando exec cliworker -- composer --version --no-ansi | tee >(cat 1>&2) | grep -q "Composer version 2."
# Should not install composer when composer_version is false
lando exec cliworker -- composer --version --no-ansi 2>&1 | grep "executable file not found"

# Should have node14 installed in cli service
lando node -v | tee >(cat 1>&2) | grep v18.
Expand Down
2 changes: 0 additions & 2 deletions examples/8.3/.lando.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,8 @@ events:
services:
defaults:
type: php:8.3
composer_version: false
cli:
type: php:8.3
composer_version: false
via: cli
build_as_root:
- curl -sL https://deb.nodesource.com/setup_14.x | bash -
Expand Down
7 changes: 2 additions & 5 deletions examples/8.3/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,6 @@ lando exec custom -- php -m | grep "xdebug"
# Should not serve port 80 for cli
lando exec cli -- curl http://localhost || echo $? | grep 7

# Should install the composer 2.x using the false flag
lando exec cli -- composer --version --no-ansi | tee >(cat 1>&2) | grep -q "Composer version 2."

# Should use custom php ini if specified
lando exec custom -- php -i | grep memory_limit | grep 514
lando exec custom -- curl http://custom_nginx | grep html_errors | grep On | grep On
Expand Down Expand Up @@ -110,8 +107,8 @@ lando exec defaults -- curl http://localhost/path_info.php/a/b.php | grep SCRIPT
# Should allow cli services to specify a boot up command
lando info -s cliworker --deep | grep Cmd | grep sleep | grep infinity

# Should install the latest composer 2.x by default.
lando exec cliworker -- composer --version --no-ansi | tee >(cat 1>&2) | grep -q "Composer version 2."
# Should not install composer when composer_version is false
lando exec cliworker -- composer --version --no-ansi 2>&1 | grep "executable file not found"

# Should have node14 installed in cli service
lando node -v | tee >(cat 1>&2) | grep v18.
Expand Down
2 changes: 0 additions & 2 deletions examples/8.4/.lando.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ events:
services:
defaults:
type: php:8.4
composer_version: false
cli:
type: php:8.4
composer_version: false
Expand All @@ -16,7 +15,6 @@ services:
- apt-get install -y nodejs
cliworker:
type: php:8.4
composer_version: false
via: cli
command: sleep infinity
custom:
Expand Down
7 changes: 2 additions & 5 deletions examples/8.4/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,6 @@ lando exec custom_nginx -- curl https://localhost | grep "WEBDIR"
# Should not serve port 80 for cli
lando exec cli -- curl http://localhost || echo $? | grep 7

# Should install the composer 2.x using the false flag
lando exec cli -- composer --version --no-ansi | tee >(cat 1>&2) | grep -q "Composer version 2."

# Should use custom php ini if specified
lando exec custom -- php -i | grep memory_limit | grep 514
lando exec custom -- curl http://custom_nginx | grep html_errors | grep On | grep On
Expand Down Expand Up @@ -107,8 +104,8 @@ lando exec defaults -- curl http://localhost/path_info.php/a/b.php | grep SCRIPT
# Should allow cli services to specify a boot up command
lando info -s cliworker --deep | grep Cmd | grep sleep | grep infinity

# Should install the latest composer 2.x by default.
lando exec cliworker -- composer --version --no-ansi | tee >(cat 1>&2) | grep -q "Composer version 2."
# Should not install composer when composer_version is false
lando exec cliworker -- composer --version --no-ansi 2>&1 | grep "executable file not found"

# Should have node 18 installed in cli service
lando node -v | tee >(cat 1>&2) | grep v18.
Expand Down
Loading

0 comments on commit 379c058

Please sign in to comment.