11# no buildin rules and variables
22MAKEFLAGS =+ -rR --warn-undefined-variables
33
4- .PHONY : composer-install composer-update phpstan cs-fixer examples docker run
4+ .PHONY : *
55
66CONFLUENT_VERSION ?= latest
77CONFLUENT_NETWORK_SUBNET ?= 172.68.0.0/24
8+ CONFLUENT_NETWORK_GATEWAY ?= 172.68.0.1
89SCHEMA_REGISTRY_IPV4 ?= 172.68.0.103
910KAFKA_BROKER_IPV4 ?= 172.68.0.102
1011ZOOKEEPER_IPV4 ?= 172.68.0.101
1112COMPOSER ?= bin/composer.phar
12- COMPOSER_VERSION ?= 2.0.4
13+ COMPOSER_VERSION ?= 2.1.12
14+ COMPOSER_STABILITY ?= --prefer-stable
1315PHP_STAN ?= bin/phpstan.phar
14- PHP_STAN_VERSION ?= 0.12.53
16+ PHP_STAN_VERSION ?= 1.1.2
1517PHP_CS_FIXER ?= bin/php-cs-fixer.phar
18+ PHP_CS_FIXER_VERSION ?= 3.2.1
1619PHPUNIT ?= vendor/bin/phpunit
1720PHP ?= bin/php
18- PHP_VERSION ?= 7.3
19- XDEBUG_VERSION ?= 2.9.8
20- XDEBUG_OPTIONS ?= -d xdebug.mode=off -d xdebug.coverage_enable=0
21+ PHP_VERSION ?= 7.4
22+ XDEBUG_VERSION ?= 3.1.1
23+ XDEBUG_OPTIONS ?= -d xdebug.mode=off
2124export
2225
2326docker :
24- docker build \
27+ DOCKER_BUILDKIT=1 docker build \
2528 --build-arg PHP_VERSION=$(PHP_VERSION ) \
2629 --build-arg XDEBUG_VERSION=$(XDEBUG_VERSION ) \
2730 -t schema-registry-client:$(PHP_VERSION ) \
2831 -f Dockerfile \
2932 .
3033
3134composer-install :
32- PHP_VERSION=$(PHP_VERSION ) $(PHP ) $(XDEBUG_OPTIONS ) $(COMPOSER ) install --no-interaction --no-progress --no-scripts --prefer-stable
35+ PHP_VERSION=$(PHP_VERSION ) $(PHP ) $(XDEBUG_OPTIONS ) $(COMPOSER ) install --no-interaction --no-progress --no-scripts
3336
3437composer-update :
35- PHP_VERSION=$(PHP_VERSION ) $(PHP ) $(XDEBUG_OPTIONS ) $(COMPOSER ) update --no-interaction --no-progress --no-scripts --prefer-stable
38+ PHP_VERSION=$(PHP_VERSION ) $(PHP ) $(XDEBUG_OPTIONS ) $(COMPOSER ) update --no-interaction --no-progress --no-scripts $( COMPOSER_STABILITY )
3639
3740phpstan :
38- PHP_VERSION=$(PHP_VERSION ) $(PHP ) $(XDEBUG_OPTIONS ) $(PHP_STAN ) analyse
41+ PHP_VERSION=$(PHP_VERSION ) $(PHP ) -d memory_limit=-1 $(XDEBUG_OPTIONS ) $(PHP_STAN ) analyse
3942
4043cs-fixer :
41- PHP_VERSION=$(PHP_VERSION ) $(PHP ) $(XDEBUG_OPTIONS ) $(PHP_CS_FIXER ) fix --config=.php_cs .dist --diff -v --dry-run \
44+ PHP_VERSION=$(PHP_VERSION ) $(PHP ) $(XDEBUG_OPTIONS ) $(PHP_CS_FIXER ) fix --config=.php-cs-fixer .dist.php --diff -v --dry-run \
4245 --path-mode=intersection --allow-risky=yes src test
4346
4447cs-fixer-modify :
45- PHP_VERSION=$(PHP_VERSION ) $(PHP ) $(XDEBUG_OPTIONS ) $(PHP_CS_FIXER ) fix --config=.php_cs .dist --diff -v \
48+ PHP_VERSION=$(PHP_VERSION ) $(PHP ) $(XDEBUG_OPTIONS ) $(PHP_CS_FIXER ) fix --config=.php-cs-fixer .dist.php --diff -v \
4649 --path-mode=intersection --allow-risky=yes src test
4750
4851phpunit :
4952 PHP_VERSION=$(PHP_VERSION ) $(PHP ) $(XDEBUG_OPTIONS ) $(PHPUNIT ) --exclude-group integration
5053
51- phpunit-integration :
52- PHP_VERSION=$(PHP_VERSION ) $(PHP ) $(XDEBUG_OPTIONS ) $(PHPUNIT ) --group integration
53-
5454coverage :
5555 mkdir -p build
5656 PHP_VERSION=$(PHP_VERSION ) $(PHP ) -d xdebug.mode=coverage -d xdebug.coverage_enable=1 vendor/bin/phpunit --exclude-group integration \
@@ -62,7 +62,7 @@ examples:
6262 PHP_VERSION=$(PHP_VERSION ) $(PHP ) examples/*
6363
6464install-phars :
65- curl https://cs.symfony. com/download/php-cs-fixer-v2 .phar -o bin/php-cs-fixer.phar -LR -z bin/php-cs-fixer.phar
65+ curl https://github. com/FriendsOfPHP/PHP-CS-Fixer/releases/ download/v $( PHP_CS_FIXER_VERSION ) / php-cs-fixer.phar -o bin/php-cs-fixer.phar -LR -z bin/php-cs-fixer.phar
6666 chmod a+x bin/php-cs-fixer.phar
6767 curl https://getcomposer.org/download/$(COMPOSER_VERSION ) /composer.phar -o bin/composer.phar -LR -z bin/composer.phar
6868 chmod a+x bin/composer.phar
@@ -74,6 +74,9 @@ platform:
7474 docker-compose up -d
7575 bin/wait-for-all.sh
7676
77+ platform-logs :
78+ docker-compose logs -f
79+
7780clean :
7881 rm -rf build
7982 docker-compose down
0 commit comments