Skip to content

Commit 9eceb22

Browse files
committed
Merge branch 'master' into preprod
2 parents 719218c + 66f6660 commit 9eceb22

File tree

885 files changed

+26447
-24839
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

885 files changed

+26447
-24839
lines changed

.env.dist

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,6 @@ SMTP_PORT=1025
6868
SMTP_TLS=0
6969
SMTP_USERNAME=""
7070
SMTP_PASSWORD=""
71-
MAILER_FORCE_RECIPIENTS=""
72-
MAILER_BCC=""
7371

7472
QR_CODE_SALT=""
7573
# https://symfony.com/doc/current/reference/configuration/framework.html#ide

.gitattributes

Lines changed: 0 additions & 6 deletions
This file was deleted.

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ jobs:
6262
composer-options: "--no-scripts"
6363

6464
- name: PHPStan
65-
run: make phpstan
65+
run: php ./bin/phpstan
6666

6767
functional:
6868
name: "Functional tests"
@@ -139,4 +139,4 @@ jobs:
139139
composer-options: "--no-scripts"
140140

141141
- name: Rector
142-
run: make rector
142+
run: php ./bin/rector

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ node_modules
2626

2727
/htdocs/assets
2828
/htdocs/templates/site/css/styles.css
29+
/htdocs/templates/site/images/
2930
js_dist
3031
# uploads
3132
/htdocs/uploads

.php-cs-fixer.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,16 +17,16 @@
1717
->registerCustomFixers(new PhpCsFixerCustomFixers\Fixers())
1818
->setRiskyAllowed(true)
1919
->setRules([
20-
'@PER-CS2.0' => true,
21-
'@PHP74Migration:risky' => true,
20+
'@PER-CS3x0' => true,
21+
'@PHP7x4Migration:risky' => true,
2222
'no_alias_functions' => true,
2323
'native_function_casing' => true,
2424
'phpdoc_no_access' => true,
2525
'self_accessor' => true,
2626
'no_unused_imports' => true,
2727
'method_argument_space' => false,
2828
'statement_indentation' => false,
29-
MultilinePromotedPropertiesFixer::name() => [
29+
'multiline_promoted_properties' => [
3030
'keep_blank_lines' => true,
3131
'minimum_number_of_parameters' => 2,
3232
],

.styleci.yml

Lines changed: 0 additions & 22 deletions
This file was deleted.

CODEOWNERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* @agallou @stakovicz @Mopolo

Makefile

Lines changed: 45 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,14 @@ default: help
33

44
# Variables
55
CURRENT_UID ?= $(shell id -u)
6-
DOCKER_UP_OPTIONS ?=
6+
DOCKER_UP_OPTIONS ?= --detach
77
DOCKER_COMPOSE_BIN ?= docker compose
88

9+
# Exécutables
10+
DOCKER_COMP = CURRENT_UID=$(CURRENT_UID) $(DOCKER_COMPOSE_BIN)
11+
PHP_CONT = $(DOCKER_COMP) exec apachephp
12+
PHP = $(PHP_CONT) php
13+
914
# Colors
1015
COLOR_RESET = \033[0m
1116
COLOR_TARGET = \033[32m
@@ -31,7 +36,7 @@ help:
3136
} \
3237
{ lastLine = $$0 }' $(MAKEFILE_LIST)
3338

34-
.PHONY: install docker-up docker-stop docker-down test hooks vendors db-seed db-migrations reset-db init console phpstan
39+
.PHONY: install docker-up docker-stop docker-down test hooks vendors db-seed db-migrations reset-db init console phpstan assets
3540

3641
##@ Setup
3742

@@ -47,76 +52,79 @@ init: htdocs/uploads
4752

4853
### Démarrer les containers
4954
docker-up: .env var/logs/.docker-build data compose.override.yml
50-
CURRENT_UID=$(CURRENT_UID) $(DOCKER_COMPOSE_BIN) up $(DOCKER_UP_OPTIONS)
55+
$(DOCKER_COMP) up $(DOCKER_UP_OPTIONS)
5156

5257
### Stopper les containers
5358
docker-stop:
54-
CURRENT_UID=$(CURRENT_UID) $(DOCKER_COMPOSE_BIN) stop
59+
$(DOCKER_COMP) stop
5560

5661
### Supprimer les containers
5762
docker-down:
58-
CURRENT_UID=$(CURRENT_UID) $(DOCKER_COMPOSE_BIN) down
63+
$(DOCKER_COMP) down
5964

6065
### Démarrer un bash dans le container PHP
6166
console:
62-
CURRENT_UID=$(CURRENT_UID) $(DOCKER_COMPOSE_BIN) exec -u localUser -it apachephp bash
67+
$(DOCKER_COMP) exec -u localUser -it apachephp bash
68+
69+
### Voir les logs docker compose
70+
logs:
71+
$(DOCKER_COMP) logs -f --tail 150
6372

6473
##@ Quality
6574

66-
### (Dans Docker) Tests unitaires
75+
### Tests unitaires
6776
test:
68-
./bin/phpunit --testsuite unit
69-
./bin/php-cs-fixer fix --dry-run -vv
77+
$(PHP_CONT) ./bin/phpunit --testsuite unit
78+
$(PHP_CONT) ./bin/php-cs-fixer fix --dry-run -vv
7079

71-
### (Dans Docker) Tests d'intégration
80+
### Tests d'intégration
7281
test-integration:
73-
./bin/phpunit --testsuite integration
82+
$(PHP_CONT) ./bin/phpunit --testsuite integration
7483

75-
### (Dans Docker) Tests fonctionnels
84+
### Tests fonctionnels
7685
behat:
77-
./bin/behat
86+
$(PHP_CONT) ./bin/behat
7887

79-
### (Dans Docker) PHP CS Fixer (dry run)
88+
### PHP CS Fixer (dry run)
8089
cs-lint:
81-
./bin/php-cs-fixer fix --dry-run -vv
90+
$(PHP_CONT) ./bin/php-cs-fixer fix --dry-run -vv
8291

83-
### (Dans Docker) PHP CS Fixer (fix)
92+
### PHP CS Fixer (fix)
8493
cs-fix:
85-
./bin/php-cs-fixer fix -vv
94+
$(PHP_CONT) ./bin/php-cs-fixer fix -vv
8695

87-
### (Dans Docker) Rector (dry run)
96+
### Rector (dry run)
8897
rector: var/cache/dev/AppKernelDevDebugContainer.xml
89-
./bin/rector --dry-run
98+
$(PHP_CONT) ./bin/rector --dry-run
9099

91-
### (Dans Docker) Rector (fix)
100+
### Rector (fix)
92101
rector-fix: var/cache/dev/AppKernelDevDebugContainer.xml
93-
./bin/rector
102+
$(PHP_CONT) ./bin/rector
94103

95104
### Tests fonctionnels
96105
test-functional: data config htdocs/uploads tmp
97-
CURRENT_UID=$(CURRENT_UID) $(DOCKER_COMPOSE_BIN) stop dbtest apachephptest mailcatcher
98-
CURRENT_UID=$(CURRENT_UID) $(DOCKER_COMPOSE_BIN) up -d dbtest apachephptest mailcatcher
106+
$(DOCKER_COMP) stop dbtest apachephptest mailcatcher
107+
$(DOCKER_COMP) up -d dbtest apachephptest mailcatcher
99108
make clean-test-deprecated-log
100-
CURRENT_UID=$(CURRENT_UID) $(DOCKER_COMPOSE_BIN) run --no-deps --rm -u localUser apachephp ./bin/behat
109+
$(DOCKER_COMP) run --no-deps --rm -u localUser apachephptest ./bin/behat
101110
make var/logs/test.deprecations_grouped.log
102-
CURRENT_UID=$(CURRENT_UID) $(DOCKER_COMPOSE_BIN) stop dbtest apachephptest mailcatcher
111+
$(DOCKER_COMP) stop dbtest apachephptest mailcatcher
103112

104113
### Tests d'intégration avec start/stop des images docker
105114
test-integration-ci:
106-
CURRENT_UID=$(CURRENT_UID) $(DOCKER_COMPOSE_BIN) stop dbtest apachephptest
107-
CURRENT_UID=$(CURRENT_UID) $(DOCKER_COMPOSE_BIN) up -d dbtest apachephptest
108-
CURRENT_UID=$(CURRENT_UID) $(DOCKER_COMPOSE_BIN) run --no-deps --rm -u localUser apachephp make vendor
109-
CURRENT_UID=$(CURRENT_UID) $(DOCKER_COMPOSE_BIN) run --no-deps --rm -u localUser apachephp ./bin/phpunit --testsuite integration
110-
CURRENT_UID=$(CURRENT_UID) $(DOCKER_COMPOSE_BIN) stop dbtest apachephptest
115+
$(DOCKER_COMP) stop dbtest apachephptest
116+
$(DOCKER_COMP) up -d dbtest apachephptest
117+
$(DOCKER_COMP) run --no-deps --rm -u localUser apachephptest make vendor
118+
$(DOCKER_COMP) run --no-deps --rm -u localUser apachephptest ./bin/phpunit --testsuite integration
119+
$(DOCKER_COMP) stop dbtest apachephptest
111120

112-
### (Dans Docker) Analyse PHPStan
121+
### Analyse PHPStan
113122
phpstan:
114-
./bin/phpstan --memory-limit=-1
123+
$(PHP_CONT) ./bin/phpstan --memory-limit=-1
115124

116125
##@ Frontend
117126

118127
### Compiler les assets pour la production
119-
.PHONY: assets
120128
assets:
121129
./node_modules/.bin/webpack -p
122130

@@ -162,12 +170,12 @@ node_modules:
162170

163171
init-db:
164172
make reset-db
165-
CURRENT_UID=$(CURRENT_UID) $(DOCKER_COMPOSE_BIN) run --rm -u localUser apachephp make db-migrations
166-
CURRENT_UID=$(CURRENT_UID) $(DOCKER_COMPOSE_BIN) run --rm -u localUser apachephp make db-seed
173+
$(DOCKER_COMP) run --rm -u localUser apachephp make db-migrations
174+
$(DOCKER_COMP) run --rm -u localUser apachephp make db-seed
167175

168176
config:
169-
CURRENT_UID=$(CURRENT_UID) $(DOCKER_COMPOSE_BIN) run --no-deps --rm -u localUser apachephp make vendors
170-
CURRENT_UID=$(CURRENT_UID) $(DOCKER_COMPOSE_BIN) run --no-deps --rm -u localUser apachephp make assets
177+
$(DOCKER_COMP) run --no-deps --rm -u localUser apachephp make vendors
178+
$(DOCKER_COMP) run --no-deps --rm -u localUser apachephp make assets
171179

172180
data:
173181
mkdir data

SECURITY.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,15 @@
22

33
Si vous découvrez un problème de sécurité dans ce projet, **merci de ne pas ouvrir un ticket public**.
44

5-
À la place, contactez-nous à `outils[at]afup[dot]org` avec les détails de la vulnérabilité et des étapes pour la reproduire.
5+
À la place, utilisez le [système intégré à GitHub](https://github.com/afup/web/security/advisories/new) pour créer un [security advisory](https://github.com/afup/web/security/advisories).
6+
7+
Ce système nous permettra de facilement discuter des détails de la vulnérabilité et des étapes pour la reproduire en
8+
privé tout en gérant un fork privé pour la correction.
9+
10+
---
611

712
Si vous êtes adhérent à l'association, vous pouvez également nous contacter via le Slack des membres.
13+
14+
---
15+
16+
Nous avons également un email : `outils[at]afup[dot]org`

app/.htaccess

Lines changed: 0 additions & 7 deletions
This file was deleted.

0 commit comments

Comments
 (0)