Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,17 @@ All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog][keepachangelog] and this project adheres to [Semantic Versioning][semver].

## Unreleased

### Added

- Using `docker` with `compose` plugin instead of `docker-compose` for test environment
- Laravel `12.x` support

### Changed

- Version of `composer` in docker container updated up to `2.8.9`

## v1.10.0

### Changed
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
FROM php:8.1-alpine
FROM php:8.3-alpine

ENV \
COMPOSER_ALLOW_SUPERUSER="1" \
COMPOSER_HOME="/tmp/composer"

COPY --from=composer:2.6.6 /usr/bin/composer /usr/bin/composer
COPY --from=composer:2.8.9 /usr/bin/composer /usr/bin/composer

RUN set -x \
&& apk add --no-cache binutils git \
Expand Down
14 changes: 7 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,25 +14,25 @@ help: ## Show this help
@awk 'BEGIN {FS = ":.*?## "} /^[a-zA-Z_-]+:.*?## / {printf " \033[32m%-14s\033[0m %s\n", $$1, $$2}' $(MAKEFILE_LIST)

build: ## Build docker images, required for current package environment
docker-compose build
docker compose build

latest: clean ## Install latest php dependencies
docker-compose run $(RUN_APP_ARGS) app composer update -n --ansi --prefer-dist --prefer-stable
docker compose run $(RUN_APP_ARGS) app composer update -n --ansi --prefer-dist --prefer-stable

install: clean ## Install regular php dependencies
docker-compose run $(RUN_APP_ARGS) app composer update -n --prefer-dist --no-interaction
docker compose run $(RUN_APP_ARGS) app composer update -n --prefer-dist --no-interaction

lowest: clean ## Install lowest php dependencies
docker-compose run $(RUN_APP_ARGS) app composer update -n --ansi --prefer-dist --prefer-lowest
docker compose run $(RUN_APP_ARGS) app composer update -n --ansi --prefer-dist --prefer-lowest

test: ## Execute php tests and linters
docker-compose run $(RUN_APP_ARGS) app composer test
docker compose run $(RUN_APP_ARGS) app composer test

test-cover: ## Execute php tests with coverage
docker-compose run --rm --user "0:0" -e 'XDEBUG_MODE=coverage' app sh -c 'docker-php-ext-enable xdebug && su $(shell whoami) -s /bin/sh -c "composer phpunit-cover"'
docker compose run --rm --user "0:0" -e 'XDEBUG_MODE=coverage' app sh -c 'docker-php-ext-enable xdebug && su $(shell whoami) -s /bin/sh -c "composer phpunit-cover"'

shell: ## Start shell into container with php
docker-compose run $(RUN_APP_ARGS) app sh
docker compose run $(RUN_APP_ARGS) app sh

clean: ## Remove all dependencies and unimportant files
-rm -Rf ./composer.lock ./vendor ./coverage
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ For more examples - look into sources.

### Testing

For package testing we use `phpunit` framework and `docker-ce` + `docker-compose` as develop environment. So, just write into your terminal after repository cloning:
For package testing we use `phpunit` framework and `docker` with `compose` plugin as develop environment. So, just write into your terminal after repository cloning:

```bash
$ make build
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"ext-json": "*",
"ext-mbstring": "*",
"avtocod/specs": "~4.0",
"illuminate/support": "~9.0 || ~10.0 || ~11.0"
"illuminate/support": "~9.0 || ~10.0 || ~11.0 || ~12.0"
},
"require-dev": {
"phpunit/phpunit": "^9.6 || ^10.0",
Expand Down