-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
54 lines (41 loc) · 1019 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
include .env
-include .env.local
export APP_ENV
PHP := $(shell echo $(PHP))
COMPOSER := $(shell echo $(COMPOSER))
.PHONY: test
test: dump phpstan psalm phpunit
.PHONY: dump
dump:
$(COMPOSER) dump-autoload --optimize
.PHONY: phpstan
phpstan:
$(PHP) vendor/bin/phpstan analyse
.PHONY: psalm
psalm:
$(PHP) vendor/bin/psalm
.PHONY: clean
clean:
rm -rf tests/var
.PHONY: warmup
warmup:
$(PHP) tests/bin/console cache:warmup --env=test
.PHONY: phpunit
phpunit: clean warmup
$(eval c ?=)
$(PHP) vendor/bin/phpunit $(c)
.PHONY: php-cs-fixer
php-cs-fixer: tools/php-cs-fixer
$(PHP) $< fix --config=.php-cs-fixer.dist.php --verbose --allow-risky=yes
.PHONY: tools/php-cs-fixer
tools/php-cs-fixer:
phive install php-cs-fixer
.PHONY: rector
rector:
$(PHP) vendor/bin/rector process > rector.log
make php-cs-fixer
.PHONY: serve
serve:
$(PHP) tests/bin/console cache:clear
$(PHP) tests/bin/console asset:install tests/public/
cd tests && sh -c "APP_ENV=test $(SYMFONY) server:start --document-root=public"