4ae8e34bc7
Expose les sous-ressources Contacts / Adresses / RIB du repertoire clients
(M1, spec § 4.5) :
- 3 Processors dedies (ClientContactProcessor, ClientAddressProcessor,
ClientRibProcessor) : normalisation serveur reutilisant ClientFieldNormalizer
(RG-1.19 capitalize, RG-1.20 telephones chiffres, RG-1.21 emails/billingEmail
lowercase) + regles metier.
- Operations API Platform :
- POST /api/clients/{id}/contacts|addresses, PATCH/DELETE /api/client_contacts|addresses/{id}
(security commercial.clients.manage)
- POST /api/clients/{id}/ribs, PATCH/DELETE /api/client_ribs/{id}
(security commercial.clients.accounting.manage)
- GET item par sous-ressource (lecture unitaire) ; pas de GET collection
autonome (lecture via le parent, non concernee par la pagination ERP-72).
- Regles de gestion :
- RG-1.13 : DELETE du dernier RIB d'un client en reglement LCR -> 409.
- RG-1.14 : DELETE du dernier contact d'un client -> 409 (completude front au M1).
- RG-1.05 : prenom OU nom du contact obligatoire -> 422.
- Validations deja portees par l'entite et desormais exercees : Assert\Count(min:1)
sur ClientAddress.sites (RG-1.10), Assert\Regex code postal (RG-1.09),
Assert\Iban / Assert\Bic sur ClientRib.
- SiteReferenceDenormalizer : resout les IRIs /api/sites vers SiteInterface
(meme pattern que CategoryReferenceDenormalizer, sans import cross-module).
- Ajout de symfony/intl, requis par Assert\Bic.
Tests : ClientSubResourceApiTest (13 cas) couvrant CRUD, normalisation,
RG-1.13/1.14, gating 403 sur client_ribs sans accounting.manage. Suite back
complete au vert (383 tests).
100 lines
2.8 KiB
JSON
100 lines
2.8 KiB
JSON
{
|
|
"type": "project",
|
|
"license": "proprietary",
|
|
"minimum-stability": "stable",
|
|
"prefer-stable": true,
|
|
"require": {
|
|
"php": ">=8.4",
|
|
"ext-ctype": "*",
|
|
"ext-iconv": "*",
|
|
"api-platform/doctrine-orm": "^4.2",
|
|
"api-platform/symfony": "^4.2",
|
|
"doctrine/doctrine-bundle": "^3.2",
|
|
"doctrine/doctrine-migrations-bundle": "^4.0",
|
|
"doctrine/orm": "^3.6",
|
|
"lexik/jwt-authentication-bundle": "^3.2",
|
|
"nelmio/cors-bundle": "^2.6",
|
|
"nyholm/psr7": "^1.8",
|
|
"phpdocumentor/reflection-docblock": "^5.6|^6.0",
|
|
"phpstan/phpdoc-parser": "^2.3",
|
|
"symfony/asset": "8.0.*",
|
|
"symfony/console": "8.0.*",
|
|
"symfony/dotenv": "8.0.*",
|
|
"symfony/expression-language": "8.0.*",
|
|
"symfony/flex": "^2",
|
|
"symfony/framework-bundle": "8.0.*",
|
|
"symfony/intl": "8.0.*",
|
|
"symfony/mime": "8.0.*",
|
|
"symfony/monolog-bundle": "^4.0",
|
|
"symfony/property-access": "8.0.*",
|
|
"symfony/property-info": "8.0.*",
|
|
"symfony/rate-limiter": "8.0.*",
|
|
"symfony/runtime": "8.0.*",
|
|
"symfony/security-bundle": "8.0.*",
|
|
"symfony/serializer": "8.0.*",
|
|
"symfony/twig-bundle": "8.0.*",
|
|
"symfony/uid": "8.0.*",
|
|
"symfony/validator": "8.0.*",
|
|
"symfony/yaml": "8.0.*"
|
|
},
|
|
"config": {
|
|
"allow-plugins": {
|
|
"php-http/discovery": true,
|
|
"symfony/flex": true,
|
|
"symfony/runtime": true
|
|
},
|
|
"bump-after-update": true,
|
|
"sort-packages": true
|
|
},
|
|
"autoload": {
|
|
"psr-4": {
|
|
"App\\": "src/"
|
|
}
|
|
},
|
|
"autoload-dev": {
|
|
"psr-4": {
|
|
"App\\Tests\\": "tests/"
|
|
}
|
|
},
|
|
"replace": {
|
|
"symfony/polyfill-ctype": "*",
|
|
"symfony/polyfill-iconv": "*",
|
|
"symfony/polyfill-php72": "*",
|
|
"symfony/polyfill-php73": "*",
|
|
"symfony/polyfill-php74": "*",
|
|
"symfony/polyfill-php80": "*",
|
|
"symfony/polyfill-php81": "*",
|
|
"symfony/polyfill-php82": "*",
|
|
"symfony/polyfill-php83": "*",
|
|
"symfony/polyfill-php84": "*"
|
|
},
|
|
"scripts": {
|
|
"auto-scripts": {
|
|
"cache:clear": "symfony-cmd",
|
|
"assets:install %PUBLIC_DIR%": "symfony-cmd"
|
|
},
|
|
"post-install-cmd": [
|
|
"@auto-scripts"
|
|
],
|
|
"post-update-cmd": [
|
|
"@auto-scripts"
|
|
]
|
|
},
|
|
"conflict": {
|
|
"symfony/symfony": "*"
|
|
},
|
|
"extra": {
|
|
"symfony": {
|
|
"allow-contrib": false,
|
|
"require": "8.0.*"
|
|
}
|
|
},
|
|
"require-dev": {
|
|
"doctrine/doctrine-fixtures-bundle": "^4.3",
|
|
"friendsofphp/php-cs-fixer": "^3.94",
|
|
"phpunit/phpunit": "^13.0",
|
|
"symfony/browser-kit": "8.0.*",
|
|
"symfony/http-client": "8.0.*"
|
|
}
|
|
}
|