-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d6f3c02
commit cb29d2d
Showing
152 changed files
with
5,179 additions
and
5,878 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# Require the plugin EditorConfig in Phpstorm | ||
[*] | ||
end_of_line = lf | ||
insert_final_newline = true | ||
trim_trailing_whitespace = true | ||
charset = utf-8 | ||
|
||
# Tab indentation (no size specified) | ||
[Makefile] | ||
indent_style = tab | ||
|
||
# http://www.php-fig.org/psr/psr-2/#indenting | ||
[*.{php,yaml,yml,sh}] | ||
indent_style = space | ||
indent_size = 4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
###> symfony/framework-bundle ### | ||
APP_ENV=dev | ||
APP_SECRET=fake_secret | ||
TRUSTED_PROXIES=REMOTE_ADDR | ||
###< symfony/framework-bundle ### | ||
|
||
###> league/oauth2-github ### | ||
GITHUB_CLIENT_ID= | ||
GITHUB_CLIENT_SECRET= | ||
###> league/oauth2-github ### | ||
|
||
###> knplabs/github-api ### | ||
GITHUB_AUTH_METHOD=http_password | ||
GITHUB_USERNAME=username | ||
GITHUB_SECRET=password_or_token | ||
###< knplabs/github-api ### |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
###> symfony/framework-bundle ### | ||
APP_ENV=dev | ||
APP_SECRET=fake_secret | ||
TRUSTED_PROXIES=REMOTE_ADDR | ||
###< symfony/framework-bundle ### | ||
|
||
###> league/oauth2-github ### | ||
GITHUB_CLIENT_ID=fake_id | ||
GITHUB_CLIENT_SECRET=fake_secret | ||
###> league/oauth2-github ### | ||
|
||
###> knplabs/github-api ### | ||
GITHUB_AUTH_METHOD=http_password | ||
GITHUB_USERNAME=username | ||
GITHUB_SECRET=password_or_token | ||
###< knplabs/github-api ### | ||
|
||
HTTP_HOST=github-gui.ci | ||
MYSQL_ROOT_PASSWORD=root | ||
MYSQL_HOST=github_gui_ci | ||
MYSQL_DATABASE=github_gui_ci | ||
MYSQL_USER=github_gui_ci | ||
MYSQL_PASSWORD=github_gui_ci |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,15 @@ | ||
|
||
###> symfony/framework-bundle ### | ||
/.env | ||
/.env.local | ||
/.env.local.php | ||
/.env.*.local | ||
/config/secrets/prod/prod.decrypt.private.php | ||
/public/bundles/ | ||
/var/ | ||
/vendor/ | ||
###< symfony/framework-bundle ### | ||
|
||
/.idea/ | ||
|
||
/docker/.env | ||
/docker/docker-compose.override.yml | ||
###> squizlabs/php_codesniffer ### | ||
/.phpcs-cache | ||
/phpcs.xml.dist | ||
###< squizlabs/php_codesniffer ### |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,35 +1,99 @@ | ||
start-dev: hooks | ||
bash ./docker/start_dev.sh | ||
#-include docker/.env | ||
|
||
start-prod: | ||
bash ./docker/start_prod.sh | ||
.SILENT: shell analyse clear-cache | ||
.DEFAULT_GOAL := help | ||
|
||
stop-dev: | ||
cd ./docker/ && docker-compose -f docker-compose.yml -f docker-compose.dev.yml stop | ||
help: | ||
@grep -E '(^[a-zA-Z_-]+:.*?##.*$$)|(^##)' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[32m%-30s\033[0m %s\n", $$1, $$2}' | sed -e 's/\[32m##/[33m/' | ||
|
||
stop-prod: | ||
cd ./docker/ && docker-compose -f docker-compose.yml -f docker-compose.prod.yml stop | ||
## | ||
## Project | ||
##--------------------------------------------------------------------------- | ||
|
||
shell: | ||
cd ./docker/ && docker-compose exec php bash | ||
install: ## Install the project | ||
install: hooks | ||
cd ./docker && ./install.sh | ||
|
||
check: | ||
cd ./docker/ && docker-compose exec -T php make phpcs | ||
cd ./docker/ && docker-compose exec -T php make stan | ||
cd ./docker/ && docker-compose exec -T php make check-doctrine | ||
start: ## Start the project | ||
start: hooks | ||
cd ./docker && ./start.sh | ||
|
||
stop: ## Stop the project | ||
stop: | ||
cd ./docker && ./stop.sh | ||
|
||
restart: ## Restart the project | ||
restart: stop start | ||
|
||
update: ## Update the project | ||
update: | ||
cd ./docker && ./update.sh | ||
|
||
hooks: | ||
# Pre commit | ||
echo "#!/bin/bash" > .git/hooks/pre-commit | ||
echo "make check" >> .git/hooks/pre-commit | ||
chmod +x .git/hooks/pre-commit | ||
|
||
phpcs: | ||
vendor/bin/phpcs | ||
shell: ## Connect to PHP container | ||
shell: | ||
cd ./docker && docker-compose exec php bash | ||
|
||
warmup-cache: | ||
bin/console cache:warmup | ||
|
||
clear-cache: | ||
bin/console cache:clear --no-warmup | ||
|
||
## | ||
## Database | ||
##--------------------------------------------------------------------------- | ||
|
||
stan: | ||
reset: ## Reset the database (only on container) | ||
reset: | ||
bin/console doctrine:database:drop --if-exists --force | ||
make doctrine-migrations | ||
|
||
doctrine-migrations: ## Execute all migrations (only on container) | ||
doctrine-migrations: | ||
bin/console doctrine:database:create --if-not-exists | ||
bin/console doctrine:migration:migrate --allow-no-migration --no-interaction --all-or-nothing | ||
|
||
## | ||
## Code quality (only on PHP test container) | ||
##--------------------------------------------------------------------------- | ||
|
||
check: | ||
cd ./docker/ && docker-compose exec -T php make clear-cache | ||
cd ./docker/ && docker-compose exec -T php make lint | ||
cd ./docker/ && docker-compose exec -T php make analyse | ||
cd ./docker/ && docker-compose exec -T php make copy-paste | ||
cd ./docker/ && docker-compose exec -T php make doctrine | ||
cd ./docker/ && docker-compose exec -T php make security | ||
|
||
lint: ## Execute PHPCS | ||
lint: | ||
vendor/bin/phpcs -p | ||
|
||
fixer: ## Execute PHPCS fixer | ||
fixer: | ||
./vendor/bin/phpcbf -p | ||
|
||
analyse: ## Execute PHPStan | ||
analyse: | ||
bin/console cache:warmup --env=dev | ||
vendor/bin/phpstan analyse src --level max -c extension.neon | ||
vendor/bin/phpstan analyse --memory-limit=4G | ||
|
||
doctrine: ## Validate Doctrine schema | ||
doctrine: reset | ||
bin/console d:s:v --env=test | ||
bin/console d:s:u --dump-sql --env=test | ||
|
||
copy-paste: ## Check duplicate code | ||
copy-paste: | ||
./bin/phpcpd src \ | ||
--fuzzy | ||
|
||
check-doctrine: | ||
bin/console d:s:v | ||
bin/console d:s:u --dump-sql | ||
security: ## Check CVE for vendor dependencies | ||
security: | ||
./bin/security-checker --path=./composer.lock |
Oops, something went wrong.