Skip to content

Commit

Permalink
Switch from docker-compose to docker compose
Browse files Browse the repository at this point in the history
  • Loading branch information
Christian Kolb committed Aug 23, 2024
1 parent 6aab4f4 commit a1f136d
Showing 1 changed file with 15 additions and 15 deletions.
30 changes: 15 additions & 15 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -25,21 +25,21 @@ help: Makefile
## build Build the Docker images.
.PHONY: build
build:
docker-compose build
docker compose build

## up Start the Docker stack.
.PHONY: up
up: .up

.up:
docker-compose up -d
docker compose up -d

## down Stop the Docker stack.
.PHONY: down
down: .down

.down:
docker-compose down
docker compose down

## update Rebuild Docker images and start stack.
.PHONY: update
Expand All @@ -59,12 +59,12 @@ install: install-8.3
## install-8.2 Install PHP dependencies with PHP 8.2.
.PHONY: install-8.2
install-8.2:
docker-compose run --rm php-8.2 composer install
docker compose run --rm php-8.2 composer install

## install-8.3 Install PHP dependencies with PHP 8.3.
.PHONY: install-8.3
install-8.3:
docker-compose run --rm php-8.3 composer install
docker compose run --rm php-8.3 composer install

## php-cli Enter a shell for the default PHP version (8.2).
.PHONY: php-cli
Expand All @@ -73,12 +73,12 @@ php-cli: php-8.3-cli
## php-8.2-cli Enter a shell for PHP 8.2.
.PHONY: php-8.2-cli
php-8.2-cli:
docker-compose run --rm php-8.2 sh
docker compose run --rm php-8.2 sh

## php-8.3-cli Enter a shell for PHP 8.3.
.PHONY: php-8.3-cli
php-8.3-cli:
docker-compose run --rm php-8.3 sh
docker compose run --rm php-8.3 sh

##
## Tests and code validation
Expand All @@ -96,28 +96,28 @@ php-tests: php-8.2-tests php-8.3-tests
## php-8.2-tests Run tests with PHP 8.2.
.PHONY: php-8.2-tests
php-8.2-tests:
docker-compose run --rm php-8.2 ./vendor/bin/phpunit
docker compose run --rm php-8.2 ./vendor/bin/phpunit

## php-8.3-tests Run tests with PHP 8.3.
.PHONY: php-8.3-tests
php-8.3-tests:
docker-compose run --rm php-8.3 ./vendor/bin/phpunit
docker compose run --rm php-8.3 ./vendor/bin/phpunit

## php-8.2-tests-html-coverage Run the tests with PHP 8.2 including coverage report as HTML.
.PHONY: php-8.2-tests-html-coverage
php-8.2-tests-html-coverage:
docker-compose run --rm php-8.2 ./vendor/bin/phpunit --coverage-html ./coverage
docker compose run --rm php-8.2 ./vendor/bin/phpunit --coverage-html ./coverage

## php-8.3-tests-html-coverage Run the tests with PHP 8.3 including coverage report as HTML.
.PHONY: php-8.3-tests-html-coverage
php-8.3-tests-html-coverage:
docker-compose run --rm php-8.3 ./vendor/bin/phpunit --coverage-html ./coverage
docker compose run --rm php-8.3 ./vendor/bin/phpunit --coverage-html ./coverage

## php-code-validation Run code fixers and linters with default PHP version (8.2).
.PHONY: php-code-validation
php-code-validation:
docker-compose run --rm php-8.3 ./vendor/bin/php-cs-fixer fix
docker-compose run --rm php-8.3 ./vendor/bin/psalm --show-info=false --no-diff
docker compose run --rm php-8.3 ./vendor/bin/php-cs-fixer fix
docker compose run --rm php-8.3 ./vendor/bin/psalm --show-info=false --no-diff

##
## CI
Expand All @@ -127,9 +127,9 @@ php-code-validation:
## php-8.2-tests-ci Run the tests for PHP 8.2 for CI.
.PHONY: php-8.2-tests-ci
php-8.2-tests-ci:
docker-compose run --rm php-8.2 ./vendor/bin/phpunit
docker compose run --rm php-8.2 ./vendor/bin/phpunit

## php-8.3-tests-ci Run the tests for PHP 8.3 for CI.
.PHONY: php-8.3-tests-ci
php-8.3-tests-ci:
docker-compose run --rm php-8.3 ./vendor/bin/phpunit --coverage-clover ./coverage.xml
docker compose run --rm php-8.3 ./vendor/bin/phpunit --coverage-clover ./coverage.xml

0 comments on commit a1f136d

Please sign in to comment.