-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
52 lines (39 loc) · 1.13 KB
/
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
# Description: Makefile for the Symfony project
start:
docker-compose up -d
symfony server:start
stop:
symfony server:stop
docker-compose down
install:
composer install
clear:
bin/console cache:clear
make start
create-migration:
bin/console doctrine:migrations:diff
migrate:
bin/console doctrine:migrations:migrate --no-interaction
test:
bin/phpunit
php-cs-fixer-fix:
$(DISABLE_XDEBUG) vendor/bin/php-cs-fixer fix -v
phpstan-check:
if [ ! -d "var/cache/dev" ]; then bin/console cache:warmup; fi
$(DISABLE_XDEBUG) vendor/bin/phpstan --memory-limit=-1 analyse
security-check:
$(DISABLE_XDEBUG) symfony check:security
doctrine-schema-check:
$(DISABLE_XDEBUG) bin/console doctrine:schema:validate
check-php:
@php_version=$(php -v | head -n 1 | awk '{print $2}') && \
required_php_version=$(grep "php" composer.json | awk '{print $2}' | tr -d '",') && \
if [ "$$php_version" != "$$required_php_version" ]; then \
echo "Error: Required PHP version $$required_php_version but found $$php_version."; \
exit 1; \
fi
first-install: check-php install
docker-compose up -d
bin/console sylius:install
yarn install
yarn build