File tree Expand file tree Collapse file tree 7 files changed +55
-23
lines changed Expand file tree Collapse file tree 7 files changed +55
-23
lines changed Original file line number Diff line number Diff line change 1- /.github export-ignore
2- /tests export-ignore
3- .gitattributes export-ignore
4- .gitignore export-ignore
5- .php-cs-fixer.php export-ignore
6- Makefile export-ignore
7- composer-require-checker.json export-ignore
8- phpunit.xml export-ignore
1+ /.github / export-ignore
2+ /tests / export-ignore
3+ /.gitattributes export-ignore
4+ /.gitignore export-ignore
5+ /.php-cs-fixer.php export-ignore
6+ /Makefile export-ignore
7+ /Dockerfile export-ignore
8+ /docker-compose.yml export-ignore
9+ /composer-require-checker.json export-ignore
10+ /phpunit.xml export-ignore
Original file line number Diff line number Diff line change 1717 strategy :
1818 matrix :
1919 php-version :
20- - " 8.3 "
20+ - " 8.4 "
2121
2222 steps :
2323 - uses : " actions/checkout@v5"
@@ -40,11 +40,11 @@ jobs:
4040 strategy :
4141 matrix :
4242 php-version :
43- - " 8.4 "
43+ - " 8.5 "
4444 code-coverage :
4545 - " none"
4646 include :
47- - php-version : " 8.3 "
47+ - php-version : " 8.4 "
4848 code-coverage : " pcov"
4949
5050 steps :
7878 strategy :
7979 matrix :
8080 php-version :
81- - " 8.3 "
81+ - " 8.4 "
8282
8383 steps :
8484 - uses : " actions/checkout@v5"
Original file line number Diff line number Diff line change 22/.phpunit.cache /
33/vendor /
44/coverage /
5+ /.env
56/.php-cs-fixer.cache
67/.phpunit.result.cache
78/composer.lock
Original file line number Diff line number Diff line change 1+ FROM php:8.4
2+
3+ ADD --chmod=0755 https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/
4+
5+ RUN install-php-extensions @composer pcov
6+
7+ ARG USER_ID
8+ ARG GROUP_ID
9+
10+ RUN groupadd --gid ${GROUP_ID} code \
11+ && useradd --create-home --shell /bin/bash --uid ${USER_ID} --gid code code
12+
13+ USER code
Original file line number Diff line number Diff line change 1- CSFIX_PHP_BIN=PHP_CS_FIXER_IGNORE_ENV =1 php8.2
2- PHP_BIN =php8.2 -d zend.assertions=1 -d error_reporting=-1
3- COMPOSER_BIN =$(shell command -v composer)
1+ ifdef CI
2+ DOCKER_PHP_EXEC :=
3+ else
4+ DOCKER_PHP_EXEC := docker compose run --rm php
5+ endif
46
57all : csfix test
68 @echo " Done."
79
8- vendor : composer.json
9- $(PHP_BIN ) $(COMPOSER_BIN ) update
10- $(PHP_BIN ) $(COMPOSER_BIN ) bump
11- touch vendor
10+ .env : /etc/passwd /etc/group Makefile
11+ printf " USER_ID=%s\nGROUP_ID=%s\n" ` id --user " ${USER} " ` ` id --group " ${USER} " ` > .env
12+
13+ vendor : .env docker-compose.yml Dockerfile composer.json
14+ docker compose build --pull
15+ $(DOCKER_PHP_EXEC ) composer update
16+ $(DOCKER_PHP_EXEC ) composer bump
17+ touch --no-create $@
1218
1319.PHONY : csfix
1420csfix : vendor
15- $(CSFIX_PHP_BIN ) vendor/bin/php-cs-fixer fix -v
21+ $(DOCKER_PHP_EXEC ) vendor/bin/php-cs-fixer fix -v $( arg )
1622
1723.PHONY : test
1824test : vendor
19- $(PHP_BIN ) vendor/bin/phpunit $(PHPUNIT_ARGS )
25+ $(DOCKER_PHP_EXEC ) php -d zend.assertions=1 vendor/bin/phpunit $(PHPUNIT_ARGS )
Original file line number Diff line number Diff line change 1111 }
1212 ],
1313 "require" : {
14- "php" : " ~8.3 .0 || ~8.4 .0"
14+ "php" : " ~8.4 .0 || ~8.5 .0"
1515 },
1616 "require-dev" : {
1717 "phpunit/phpunit" : " ^12.4.1" ,
18- "slam/php-cs-fixer-extensions" : " ^3.13 .0"
18+ "slam/php-cs-fixer-extensions" : " ^3.14 .0"
1919 },
2020 "autoload" : {
2121 "files" : [
Original file line number Diff line number Diff line change 1+ services :
2+ php :
3+ build :
4+ context : .
5+ args :
6+ USER_ID : ${USER_ID}
7+ GROUP_ID : ${GROUP_ID}
8+ volumes :
9+ - .:${PWD}
10+ working_dir : ${PWD}
You can’t perform that action at this time.
0 commit comments