|
26 | 26 | RESET := "" |
27 | 27 | endif |
28 | 28 |
|
| 29 | +#--- |
| 30 | + |
| 31 | +RANDOM_ORDER_SEED := $(shell head -200 /dev/urandom | cksum | cut -f1 -d " ") |
| 32 | + |
| 33 | +#--- |
29 | 34 |
|
30 | 35 | ### |
31 | 36 | # HELP |
@@ -68,77 +73,74 @@ endef |
68 | 73 | ### |
69 | 74 |
|
70 | 75 | .PHONY: composer-dump |
71 | | -composer-dump: ## Application: <composer dump-auto> |
| 76 | +composer-dump: ## [COMPOSER] Executes <composer dump-auto> inside the container |
72 | 77 | $(DOCKER_RUN_AS_USER) composer dump-auto --ansi --no-plugins --profile --classmap-authoritative --apcu --strict-psr |
73 | 78 | $(call taskDone) |
74 | 79 |
|
75 | 80 | .PHONY: composer-install |
76 | | -composer-install: ## Application: <composer install> |
| 81 | +composer-install: ## [COMPOSER] Executes <composer install> inside the container |
77 | 82 | $(DOCKER_RUN_AS_USER) composer install --ansi --no-plugins --classmap-authoritative --audit --apcu-autoloader |
78 | 83 | $(call taskDone) |
79 | 84 |
|
80 | 85 | .PHONY: composer-remove |
81 | | -composer-remove: require-package ## Application: <composer remove> |
| 86 | +composer-remove: require-package ## [COMPOSER] Executes <composer remove> inside the container |
82 | 87 | $(DOCKER_RUN_AS_USER) composer remove --ansi --no-plugins --classmap-authoritative --apcu-autoloader --with-all-dependencies --unused |
83 | 88 | $(call taskDone) |
84 | 89 |
|
85 | 90 | .PHONY: composer-require-dev |
86 | | -composer-require-dev: ## Application: <composer require --dev> |
| 91 | +composer-require-dev: ## [COMPOSER] Executes <composer require --dev> inside the container |
87 | 92 | $(DOCKER_RUN_AS_USER) composer require --ansi --no-plugins --classmap-authoritative --apcu-autoloader --with-all-dependencies --prefer-stable --sort-packages --dev |
88 | 93 | $(call taskDone) |
89 | 94 |
|
90 | 95 | .PHONY: composer-require |
91 | | -composer-require: ## Application: <composer require> |
| 96 | +composer-require: ## [COMPOSER] Executes <composer require> inside the container |
92 | 97 | $(DOCKER_RUN_AS_USER) composer require --ansi --no-plugins --classmap-authoritative --apcu-autoloader --with-all-dependencies --prefer-stable --sort-packages |
93 | 98 | $(call taskDone) |
94 | 99 |
|
95 | 100 | .PHONY: composer-update |
96 | | -composer-update: ## Application: <composer update> |
| 101 | +composer-update: ## [COMPOSER] Executes <composer update> inside the container |
97 | 102 | $(DOCKER_RUN_AS_USER) composer update --ansi --no-plugins --classmap-authoritative --apcu-autoloader --with-all-dependencies |
98 | 103 | $(call taskDone) |
99 | 104 |
|
100 | 105 | ### |
101 | 106 | # QA |
102 | 107 | ### |
103 | 108 |
|
104 | | -.PHONY: linter |
105 | | -linter: ## QA: <composer linter> |
| 109 | +.PHONY: check-syntax |
| 110 | +check-syntax: ## [QA] Executes <check-syntax [filter=app]> inside the container |
106 | 111 | @$(eval filter ?= 'app') |
107 | | - @composer linter $(filter) |
| 112 | + @vendor/bin/parallel-lint --colors -e php -j 10 $(filter) |
108 | 113 | $(call taskDone) |
109 | 114 |
|
110 | | -.PHONY: phpcs |
111 | | -phpcs: ## QA: <composer phpcbs> |
| 115 | +.PHONY: check-style |
| 116 | +check-style: ## [QA] Executes <check-style [filter=app]> inside the container |
112 | 117 | @$(eval filter ?= 'app') |
113 | | - @composer phpcs $(filter) |
| 118 | + @vendor/bin/phpcs -p --colors --standard=phpcs.xml $(filter) |
114 | 119 | $(call taskDone) |
115 | 120 |
|
116 | | -.PHONY: phpcbf |
117 | | -phpcbf: ## QA: <composer phpcbf> |
| 121 | +.PHONY: fix-style |
| 122 | +fix-style: ## [QA] Executes <fix-style [filter=app]> inside the container |
118 | 123 | @$(eval filter ?= 'app') |
119 | | - @composer phpcbf $(filter) |
| 124 | + @vendor/bin/phpcbf -p --colors --standard=phpcs.xml $(filter) |
120 | 125 | $(call taskDone) |
121 | 126 |
|
122 | 127 | .PHONY: phpstan |
123 | | -phpstan: ## QA: <composer phpstan> |
| 128 | +phpstan: ## [QA] Executes <phpstan [filter=app]> inside the container |
124 | 129 | @$(eval filter ?= 'app') |
125 | | - @composer phpstan $(filter) |
| 130 | + @vendor/bin/phpstan analyse --ansi --memory-limit=1G --no-progress --configuration=phpstan.neon $(filter) |
126 | 131 | $(call taskDone) |
127 | 132 |
|
128 | 133 | .PHONY: tests |
129 | | -tests: ## QA: <composer tests> |
| 134 | +tests: ## [QA] Executes <phpunit --testsuite=[testsuite=Unit] --filter=[filter=.]> inside the container |
130 | 135 | @$(eval testsuite ?= 'Unit') |
131 | 136 | @$(eval filter ?= '.') |
132 | | - @composer tests --testsuite=$(testsuite) --filter=$(filter) |
133 | | - $(call taskDone) |
134 | | - |
135 | | -.PHONY: tests-unit |
136 | | -tests-unit: ## QA: <composer tests-unit> |
137 | | - @$(eval filter ?= '.') |
138 | | - @composer tests-unit --filter=$(filter) |
| 137 | + @vendor/bin/phpunit --testsuite=$(testsuite) --filter=$(filter) --configuration=phpunit.xml --coverage-text --testdox --colors --order-by=random --random-order-seed=$(RANDOM_ORDER_SEED) |
139 | 138 | $(call taskDone) |
140 | 139 |
|
141 | 140 | .PHONY: coverage |
142 | | -coverage: ## QA: <composer coverage> |
143 | | - @composer coverage |
| 141 | +coverage: ## [QA] Executes <phpunit --coverage-html=[folder=./coverage]> inside the container |
| 142 | + @$(eval folder ?= './coverage') |
| 143 | + @rm -Rf $(folder) || true |
| 144 | + @mkdir $(folder) |
| 145 | + @vendor/bin/phpunit --coverage-html=$(folder) --configuration=phpunit.xml --coverage-text --testdox --colors --order-by=random --random-order-seed=$(RANDOM_ORDER_SEED) |
144 | 146 | $(call taskDone) |
0 commit comments