@@ -6,48 +6,26 @@ PWD ?= pwd_unknown
66PROJECT_NAME = $(notdir $(PWD ) )
77# Suppress `make` own output.
88# .SILENT:
9- PHP_VERSION ?= 5.6
10-
11- # Create a function that will return the xdebug source depending on the PHP version.
12- define xdebug_src
13- @if [ "$(1 ) " = 5.6 ]; \
14- then echo "https://pecl.php.net/get/xdebug-2.5.5.tgz"; \
15- elif [ "$(1 ) " = 7.0 ]; \
16- then echo "https://pecl.php.net/get/xdebug-2.7.2.tgz"; \
17- else \
18- echo "xdebug"; \
19- fi
20- endef
21-
22- php_versions :=5.6 7.0 7.1 7.2 7.3 7.4 8.0 8.1 8.2 8.3
9+ PHP_VERSION ?= 7.1
10+
11+ php_versions :=7.1 7.2 7.3 7.4 8.0 8.1 8.2 8.3 8.4
2312build : $(build_php_versions ) # # Builds the project PHP images.
2413 mkdir -p var/cache/composer
2514 mkdir -p var/log
2615 # Foreach PHP version build a Docker image.
2716 for version in $( php_versions) ; do \
28- if [ " $$ {version}" = 5.6 ]; \
29- then export XDEBUG_SRC=" https://pecl.php.net/get/xdebug-2.5.5.tgz" ; \
30- elif [ " $$ {version}" = 7.0 ]; \
31- then export XDEBUG_SRC=" https://pecl.php.net/get/xdebug-2.7.2.tgz" ; \
32- else \
33- export XDEBUG_SRC=" xdebug" ; \
34- fi ; \
3517 docker build \
3618 --build-arg PHP_VERSION=$$ {version} \
3719 --build-arg XDEBUG_REMOTE_HOST=$$ {XDEBUG_REMOTE_HOST:-host.docker.internal} \
3820 --build-arg XDEBUG_REMOTE_PORT=$$ {XDEBUG_REMOTE_PORT:-9009} \
3921 --build-arg WORKDIR=${PWD} \
40- --build-arg XDEBUG_SRC=$$ {XDEBUG_SRC} \
22+ --build-arg XDEBUG_SRC=xdebug \
4123 --progress plain \
4224 config/containers/php \
4325 --tag lucatume/di52-dev:php-v$$ {version}; \
4426 done
4527.PHONY : build
4628
47- lint : # # Lint the project source files to make sure they are PHP 5.6 compatible.
48- docker run --rm -v ${PWD} :/${PWD} lucatume/parallel-lint-56 --colors ${PWD} /src
49- .PHONY : lint
50-
5129phpcs : # # Run PHP Code Sniffer on the project source files.
5230 docker run --rm \
5331 -u "$$(id -u ) :$$(id -g ) " \
@@ -71,7 +49,7 @@ phpcbf: ## Run PHP Code Sniffer Beautifier on the project source files.
7149.PHONY : phpcbf
7250
7351PHPSTAN_LEVEL? =max
74- phpstan : # # Run phpstan on the project source files, PHP 5.6 version.
52+ phpstan : # # Run phpstan on the project source files, PHP 7.1 version.
7553 docker run --rm \
7654 -v ${PWD} :${PWD} \
7755 -u " $$ (id -u):$$ (id -g)" \
@@ -80,7 +58,7 @@ phpstan: ## Run phpstan on the project source files, PHP 5.6 version.
8058 -l ${PHPSTAN_LEVEL} ${PWD} /src
8159.PHONY : phpstan
8260
83- phan : # # Run phan on the project source files, PHP 5.6 version.
61+ phan : # # Run phan on the project source files, PHP 7.1 version.
8462 docker run --rm \
8563 -v ${PWD} :/mnt/src \
8664 -u " $$ (id -u):$$ (id -g)" \
@@ -96,14 +74,86 @@ composer_update:
9674 lucatume/di52-dev:php-v${PHP_VERSION} update -W
9775.PHONY : composer_update
9876
99- composer_update_56 :
77+ composer_update_71 :
78+ docker run --rm \
79+ -e COMPOSER_CACHE_DIR=${PWD} /var/cache/composer \
80+ -v " ${PWD} :${PWD} " \
81+ -w ${PWD} \
82+ --entrypoint composer \
83+ lucatume/di52-dev:php-v7.1 update -W
84+ .PHONY : composer_update_71
85+
86+ composer_update_72 :
87+ docker run --rm \
88+ -e COMPOSER_CACHE_DIR=${PWD} /var/cache/composer \
89+ -v " ${PWD} :${PWD} " \
90+ -w ${PWD} \
91+ --entrypoint composer \
92+ lucatume/di52-dev:php-v7.2 update -W
93+ .PHONY : composer_update_72
94+
95+ composer_update_73 :
96+ docker run --rm \
97+ -e COMPOSER_CACHE_DIR=${PWD} /var/cache/composer \
98+ -v " ${PWD} :${PWD} " \
99+ -w ${PWD} \
100+ --entrypoint composer \
101+ lucatume/di52-dev:php-v7.3 update -W
102+ .PHONY : composer_update_73
103+
104+ composer_update_74 :
105+ docker run --rm \
106+ -e COMPOSER_CACHE_DIR=${PWD} /var/cache/composer \
107+ -v " ${PWD} :${PWD} " \
108+ -w ${PWD} \
109+ --entrypoint composer \
110+ lucatume/di52-dev:php-v7.4 update -W
111+ .PHONY : composer_update_74
112+
113+ composer_update_80 :
114+ docker run --rm \
115+ -e COMPOSER_CACHE_DIR=${PWD} /var/cache/composer \
116+ -v " ${PWD} :${PWD} " \
117+ -w ${PWD} \
118+ --entrypoint composer \
119+ lucatume/di52-dev:php-v8.0 update -W
120+ .PHONY : composer_update_80
121+
122+ composer_update_81 :
123+ docker run --rm \
124+ -e COMPOSER_CACHE_DIR=${PWD} /var/cache/composer \
125+ -v " ${PWD} :${PWD} " \
126+ -w ${PWD} \
127+ --entrypoint composer \
128+ lucatume/di52-dev:php-v8.1 update -W
129+ .PHONY : composer_update_81
130+
131+ composer_update_82 :
132+ docker run --rm \
133+ -e COMPOSER_CACHE_DIR=${PWD} /var/cache/composer \
134+ -v " ${PWD} :${PWD} " \
135+ -w ${PWD} \
136+ --entrypoint composer \
137+ lucatume/di52-dev:php-v8.2 update -W
138+ .PHONY : composer_update_82
139+
140+ composer_update_83 :
141+ docker run --rm \
142+ -e COMPOSER_CACHE_DIR=${PWD} /var/cache/composer \
143+ -v " ${PWD} :${PWD} " \
144+ -w ${PWD} \
145+ --entrypoint composer \
146+ lucatume/di52-dev:php-v8.3 update -W
147+ .PHONY : composer_update_83
148+
149+ composer_update_84 :
100150 docker run --rm \
101151 -e COMPOSER_CACHE_DIR=${PWD} /var/cache/composer \
102152 -v " ${PWD} :${PWD} " \
103153 -w ${PWD} \
104154 --entrypoint composer \
105- lucatume/di52-dev:php-v5.6 update -W
106- .PHONY : composer_update_56
155+ lucatume/di52-dev:php-v8.4 update -W
156+ .PHONY : composer_update_84
107157
108158test_run : # # Run the test on the specified PHP version with XDebug support. Example `PHP_VERSION=7.2 make test_run`.
109159 docker run --rm \
@@ -113,7 +163,7 @@ test_run: ## Run the test on the specified PHP version with XDebug support. Exam
113163 " lucatume/di52-dev:php-v${PHP_VERSION} " run_tests --no-coverage
114164.PHONY : test_run
115165
116- test : composer_update_56 lint phpcs phpstan phan # # Runs the project PHPUnit tests on all PHP versions.
166+ test : composer_update_71 phpcs phpstan phan # # Runs the project PHPUnit tests on all PHP versions.
117167 for version in $( php_versions) ; do \
118168 docker run --rm \
119169 -e COMPOSER_CACHE_DIR="${PWD}/var/cache/composer" \
0 commit comments