Skip to content

Commit b03b4ea

Browse files
author
Alcides Ramos
committed
build(Makefile): improved Composer options
1 parent a303911 commit b03b4ea

2 files changed

Lines changed: 56 additions & 61 deletions

File tree

Makefile

Lines changed: 9 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,6 @@ endif
2929
#---
3030

3131
RANDOM_SEED := $(shell head -200 /dev/urandom | cksum | cut -f1 -d " ")
32-
PHPUNIT = php -d xdebug.mode=off vendor/bin/phpunit --configuration=phpunit.xml --testdox --colors --order-by=random --random-order-seed=$(RANDOM_SEED)
33-
34-
#---
35-
36-
COMPOSER_FLAGS_ANSI_PROFILE = --ansi --profile
37-
COMPOSER_FLAGS_OPTIMIZE_WITH_ALL_DEPS = --optimize-autoloader --with-all-dependencies
3832

3933
###
4034
# HELP
@@ -78,32 +72,32 @@ endef
7872

7973
.PHONY: composer-dump
8074
composer-dump: ## Application: <composer dump-auto>
81-
@composer dump-auto $(COMPOSER_FLAGS_ANSI_PROFILE) --no-interaction --optimize --strict-psr
75+
$(DOCKER_RUN_AS_USER) composer dump-auto --ansi --no-plugins --profile --classmap-authoritative --apcu --strict-psr
8276
$(call taskDone)
8377

8478
.PHONY: composer-install
8579
composer-install: ## Application: <composer install>
86-
@composer config --global discard-changes true && composer install $(COMPOSER_FLAGS_ANSI_PROFILE) --no-interaction --optimize-autoloader --audit
80+
$(DOCKER_RUN_AS_USER) composer install --ansi --no-plugins --classmap-authoritative --audit --apcu-autoloader
8781
$(call taskDone)
8882

8983
.PHONY: composer-remove
90-
composer-remove: require-packages ## Application: <composer remove>
91-
@composer remove $(COMPOSER_FLAGS_ANSI_PROFILE) $(COMPOSER_FLAGS_OPTIMIZE_WITH_ALL_DEPS) --no-interaction --unused $(packages)
84+
composer-remove: require-package ## Application: <composer remove>
85+
$(DOCKER_RUN_AS_USER) composer remove --ansi --no-plugins --classmap-authoritative --apcu-autoloader --with-all-dependencies --unused
9286
$(call taskDone)
9387

9488
.PHONY: composer-require-dev
9589
composer-require-dev: ## Application: <composer require --dev>
96-
@composer require $(COMPOSER_FLAGS_ANSI_PROFILE) $(COMPOSER_FLAGS_OPTIMIZE_WITH_ALL_DEPS) --interactive --sort-packages --dev
90+
$(DOCKER_RUN_AS_USER) composer require --ansi --no-plugins --classmap-authoritative --apcu-autoloader --with-all-dependencies --prefer-stable --sort-packages --dev
9791
$(call taskDone)
9892

9993
.PHONY: composer-require
10094
composer-require: ## Application: <composer require>
101-
@composer require $(COMPOSER_FLAGS_ANSI_PROFILE) $(COMPOSER_FLAGS_OPTIMIZE_WITH_ALL_DEPS) --interactive --sort-packages
95+
$(DOCKER_RUN_AS_USER) composer require --ansi --no-plugins --classmap-authoritative --apcu-autoloader --with-all-dependencies --prefer-stable --sort-packages
10296
$(call taskDone)
10397

10498
.PHONY: composer-update
10599
composer-update: ## Application: <composer update>
106-
@composer update $(COMPOSER_FLAGS_ANSI_PROFILE) $(COMPOSER_FLAGS_OPTIMIZE_WITH_ALL_DEPS) --no-interaction
100+
$(DOCKER_RUN_AS_USER) composer update --ansi --no-plugins --classmap-authoritative --apcu-autoloader --with-all-dependencies
107101
$(call taskDone)
108102

109103
###
@@ -138,13 +132,13 @@ phpstan: ## QA: <composer phpstan>
138132
tests: ## QA: <composer tests>
139133
@$(eval testsuite ?= 'Unit')
140134
@$(eval filter ?= '.')
141-
@$(PHPUNIT) --testsuite=$(testsuite) --filter=$(filter)
135+
@php -d xdebug.mode=off vendor/bin/phpunit --configuration=phpunit.xml --testdox --colors --order-by=random --random-order-seed=$(RANDOM_SEED) --testsuite=$(testsuite) --filter=$(filter)
142136
$(call taskDone)
143137

144138
.PHONY: tests-unit
145139
tests-unit: ## QA: <composer tests-unit>
146140
@$(eval filter ?= '.')
147-
@$(PHPUNIT) --testsuite=Unit --filter=$(filter)
141+
@php -d xdebug.mode=off vendor/bin/phpunit --configuration=phpunit.xml --testdox --colors --order-by=random --random-order-seed=$(RANDOM_SEED) --testsuite=Unit --filter=$(filter)
148142
$(call taskDone)
149143

150144
.PHONY: coverage

composer.lock

Lines changed: 47 additions & 46 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)