597101262d
Auto Tag Develop / tag (push) Successful in 8s
## Contexte Résout **ERP-107** — pendant back du mapping d'erreur par champ front (ERP-101). Le front (`useFormErrors` / `mapViolationsToRecord`) affiche sous chaque champ le `message` renvoyé par le back. Ce ticket garantit que ces messages existent, sont en FR et rattachés au bon champ. ## Changements - **Messages FR explicites** sur toutes les contraintes `#[Assert\*]` des entités métier : `Client`, `ClientContact`, `ClientAddress`, `ClientRib`, `Category`, `Role`, `User` (Email, NotBlank, Length, Bic, Iban, PositiveOrZero, Count…). - **Contraintes `Assert\Length` manquantes ajoutées**, calées sur le `length` de la colonne ORM (téléphones `VARCHAR(20)`, `siren`, `nTva`, `accountNumber`, `username`…). Évite une erreur Postgres 500 non rattachée au champ → 422 propre. - **Locale FR globale** (`symfony/translation` + `default_locale: fr`) comme filet pour les messages natifs Symfony non surchargés. - **Garde-fou** `tests/Architecture/EntityConstraintsHaveFrenchMessageTest` : échoue si une contrainte n'a pas de message FR explicite (comparaison au défaut Symfony) ou si `Assert\Length.max` diverge du `length` ORM. Whitelist justifiée pour les formats auto-bornés (Bic/Iban/Regex CP/couleur hex). - **Test fonctionnel** du JSON 422 réel : message FR + `propertyPath` consommable par le front. - **Convention documentée** dans `.claude/rules/backend.md`. ## Décisions - Stratégie retenue : message FR **explicite sur toutes** les contraintes + locale FR en filet (les deux leviers du ticket). - Garde-fou `Length == ORM length` : **test bloquant** (anti-dérive). - RG-1.03 (distributor/broker) : pas de `Assert\Callback` ajouté — le `ClientProcessor` gère **déjà** l'exclusivité (422 + `propertyPath`). Pas de doublon. ## Hors périmètre / à suivre - **Alignement `nullable`(DB) / `NotBlank`(back) / `required`(front)** : les champs obligatoires existants ont été confirmés, mais aucun changement de nullabilité DB n'a été fait sans arbitrage métier. À recroiser avec les astérisques front (ERP-101 / PR #58) si divergence constatée. ## Vérifications - `make test` : **469 tests verts** (1793 assertions), 0 échec/erreur. - `php-cs-fixer` : 0 fichier à corriger. --------- Co-authored-by: admin malio <malio@yuno.malio.fr> Co-authored-by: Matthieu <contact@malio.fr> Reviewed-on: #59 Co-authored-by: THOLOT DECHENE Matthieu <matthieu@yuno.malio.fr> Co-committed-by: THOLOT DECHENE Matthieu <matthieu@yuno.malio.fr>
270 lines
7.5 KiB
Plaintext
270 lines
7.5 KiB
Plaintext
{
|
|
"api-platform/symfony": {
|
|
"version": "4.3",
|
|
"recipe": {
|
|
"repo": "github.com/symfony/recipes",
|
|
"branch": "main",
|
|
"version": "4.0",
|
|
"ref": "e9952e9f393c2d048f10a78f272cd35e807d972b"
|
|
},
|
|
"files": [
|
|
"config/packages/api_platform.yaml",
|
|
"config/routes/api_platform.yaml",
|
|
"src/ApiResource/.gitignore"
|
|
]
|
|
},
|
|
"doctrine/deprecations": {
|
|
"version": "1.1",
|
|
"recipe": {
|
|
"repo": "github.com/symfony/recipes",
|
|
"branch": "main",
|
|
"version": "1.0",
|
|
"ref": "fdd756167454623e21f1d769c5b814b243782a67"
|
|
}
|
|
},
|
|
"doctrine/doctrine-bundle": {
|
|
"version": "3.2",
|
|
"recipe": {
|
|
"repo": "github.com/symfony/recipes",
|
|
"branch": "main",
|
|
"version": "3.0",
|
|
"ref": "d39a3bd844edfe90c20ae520b804a3bf4f82b4ad"
|
|
},
|
|
"files": [
|
|
"config/packages/doctrine.yaml",
|
|
"src/Entity/.gitignore",
|
|
"src/Repository/.gitignore"
|
|
]
|
|
},
|
|
"doctrine/doctrine-fixtures-bundle": {
|
|
"version": "4.3",
|
|
"recipe": {
|
|
"repo": "github.com/symfony/recipes",
|
|
"branch": "main",
|
|
"version": "3.0",
|
|
"ref": "1f5514cfa15b947298df4d771e694e578d4c204d"
|
|
},
|
|
"files": [
|
|
"src/DataFixtures/AppFixtures.php"
|
|
]
|
|
},
|
|
"doctrine/doctrine-migrations-bundle": {
|
|
"version": "4.0",
|
|
"recipe": {
|
|
"repo": "github.com/symfony/recipes",
|
|
"branch": "main",
|
|
"version": "3.1",
|
|
"ref": "1d01ec03c6ecbd67c3375c5478c9a423ae5d6a33"
|
|
},
|
|
"files": [
|
|
"config/packages/doctrine_migrations.yaml",
|
|
"migrations/.gitignore"
|
|
]
|
|
},
|
|
"friendsofphp/php-cs-fixer": {
|
|
"version": "3.94",
|
|
"recipe": {
|
|
"repo": "github.com/symfony/recipes",
|
|
"branch": "main",
|
|
"version": "3.39",
|
|
"ref": "97aaf9026490db73b86c23d49e5774bc89d2b232"
|
|
},
|
|
"files": [
|
|
".php-cs-fixer.dist.php"
|
|
]
|
|
},
|
|
"lexik/jwt-authentication-bundle": {
|
|
"version": "3.2",
|
|
"recipe": {
|
|
"repo": "github.com/symfony/recipes",
|
|
"branch": "main",
|
|
"version": "2.5",
|
|
"ref": "e9481b233a11ef7e15fe055a2b21fd3ac1aa2bb7"
|
|
},
|
|
"files": [
|
|
"config/packages/lexik_jwt_authentication.yaml"
|
|
]
|
|
},
|
|
"nelmio/cors-bundle": {
|
|
"version": "2.6",
|
|
"recipe": {
|
|
"repo": "github.com/symfony/recipes",
|
|
"branch": "main",
|
|
"version": "1.5",
|
|
"ref": "6bea22e6c564fba3a1391615cada1437d0bde39c"
|
|
},
|
|
"files": [
|
|
"config/packages/nelmio_cors.yaml"
|
|
]
|
|
},
|
|
"nyholm/psr7": {
|
|
"version": "1.8",
|
|
"recipe": {
|
|
"repo": "github.com/symfony/recipes",
|
|
"branch": "main",
|
|
"version": "1.0",
|
|
"ref": "4a8c0345442dcca1d8a2c65633dcf0285dd5a5a2"
|
|
},
|
|
"files": [
|
|
"config/packages/nyholm_psr7.yaml"
|
|
]
|
|
},
|
|
"phpunit/phpunit": {
|
|
"version": "13.1",
|
|
"recipe": {
|
|
"repo": "github.com/symfony/recipes",
|
|
"branch": "main",
|
|
"version": "11.1",
|
|
"ref": "ca0bc067abfb40a8de1b2561b96cbfc2b833c314"
|
|
},
|
|
"files": [
|
|
".env.test",
|
|
"phpunit.dist.xml",
|
|
"tests/bootstrap.php",
|
|
"bin/phpunit"
|
|
]
|
|
},
|
|
"symfony/console": {
|
|
"version": "8.0",
|
|
"recipe": {
|
|
"repo": "github.com/symfony/recipes",
|
|
"branch": "main",
|
|
"version": "5.3",
|
|
"ref": "1781ff40d8a17d87cf53f8d4cf0c8346ed2bb461"
|
|
},
|
|
"files": [
|
|
"bin/console"
|
|
]
|
|
},
|
|
"symfony/flex": {
|
|
"version": "2.10",
|
|
"recipe": {
|
|
"repo": "github.com/symfony/recipes",
|
|
"branch": "main",
|
|
"version": "2.4",
|
|
"ref": "52e9754527a15e2b79d9a610f98185a1fe46622a"
|
|
},
|
|
"files": [
|
|
".env",
|
|
".env.dev"
|
|
]
|
|
},
|
|
"symfony/framework-bundle": {
|
|
"version": "8.0",
|
|
"recipe": {
|
|
"repo": "github.com/symfony/recipes",
|
|
"branch": "main",
|
|
"version": "7.4",
|
|
"ref": "d5dcd308c8becd725c9d8b91e31aab1ff0bbc30b"
|
|
},
|
|
"files": [
|
|
"config/packages/cache.yaml",
|
|
"config/packages/framework.yaml",
|
|
"config/preload.php",
|
|
"config/routes/framework.yaml",
|
|
"config/services.yaml",
|
|
"public/index.php",
|
|
"src/Controller/.gitignore",
|
|
"src/Kernel.php",
|
|
".editorconfig"
|
|
]
|
|
},
|
|
"symfony/monolog-bundle": {
|
|
"version": "4.0",
|
|
"recipe": {
|
|
"repo": "github.com/symfony/recipes",
|
|
"branch": "main",
|
|
"version": "3.7",
|
|
"ref": "1b9efb10c54cb51c713a9391c9300ff8bceda459"
|
|
},
|
|
"files": [
|
|
"config/packages/monolog.yaml"
|
|
]
|
|
},
|
|
"symfony/property-info": {
|
|
"version": "8.0",
|
|
"recipe": {
|
|
"repo": "github.com/symfony/recipes",
|
|
"branch": "main",
|
|
"version": "7.3",
|
|
"ref": "dae70df71978ae9226ae915ffd5fad817f5ca1f7"
|
|
},
|
|
"files": [
|
|
"config/packages/property_info.yaml"
|
|
]
|
|
},
|
|
"symfony/routing": {
|
|
"version": "8.0",
|
|
"recipe": {
|
|
"repo": "github.com/symfony/recipes",
|
|
"branch": "main",
|
|
"version": "7.4",
|
|
"ref": "bc94c4fd86f393f3ab3947c18b830ea343e51ded"
|
|
},
|
|
"files": [
|
|
"config/packages/routing.yaml",
|
|
"config/routes.yaml"
|
|
]
|
|
},
|
|
"symfony/security-bundle": {
|
|
"version": "8.0",
|
|
"recipe": {
|
|
"repo": "github.com/symfony/recipes",
|
|
"branch": "main",
|
|
"version": "7.4",
|
|
"ref": "c42fee7802181cdd50f61b8622715829f5d2335c"
|
|
},
|
|
"files": [
|
|
"config/packages/security.yaml",
|
|
"config/routes/security.yaml"
|
|
]
|
|
},
|
|
"symfony/translation": {
|
|
"version": "8.0",
|
|
"recipe": {
|
|
"repo": "github.com/symfony/recipes",
|
|
"branch": "main",
|
|
"version": "6.3",
|
|
"ref": "620a1b84865ceb2ba304c8f8bf2a185fbf32a843"
|
|
},
|
|
"files": [
|
|
"config/packages/translation.yaml",
|
|
"translations/.gitignore"
|
|
]
|
|
},
|
|
"symfony/twig-bundle": {
|
|
"version": "8.0",
|
|
"recipe": {
|
|
"repo": "github.com/symfony/recipes",
|
|
"branch": "main",
|
|
"version": "6.4",
|
|
"ref": "f250159ebe99153d0c640a3e7742876fc7453f2c"
|
|
},
|
|
"files": [
|
|
"config/packages/twig.yaml",
|
|
"templates/base.html.twig"
|
|
]
|
|
},
|
|
"symfony/uid": {
|
|
"version": "8.0",
|
|
"recipe": {
|
|
"repo": "github.com/symfony/recipes",
|
|
"branch": "main",
|
|
"version": "7.0",
|
|
"ref": "0df5844274d871b37fc3816c57a768ffc60a43a5"
|
|
}
|
|
},
|
|
"symfony/validator": {
|
|
"version": "8.0",
|
|
"recipe": {
|
|
"repo": "github.com/symfony/recipes",
|
|
"branch": "main",
|
|
"version": "7.0",
|
|
"ref": "8c1c4e28d26a124b0bb273f537ca8ce443472bfd"
|
|
},
|
|
"files": [
|
|
"config/packages/validator.yaml"
|
|
]
|
|
}
|
|
}
|