Compare commits
base: MALIO-DEV/Starseed:027e80cc4b7e6543a713db5eadd5b9ebc610c6f0
MALIO-DEV/Starseed:develop
MALIO-DEV/Starseed:feature/ERP-62-page-repertoire-clients
MALIO-DEV/Starseed:feature/ERP-61-sidebar-i18n-clients
MALIO-DEV/Starseed:feat/admin-tables-filter-pagination
MALIO-DEV/Starseed:main
MALIO-DEV/Starseed:v0.1.63
MALIO-DEV/Starseed:v0.1.62
MALIO-DEV/Starseed:v0.1.61
MALIO-DEV/Starseed:v0.1.60
MALIO-DEV/Starseed:v0.1.59
MALIO-DEV/Starseed:v0.1.58
MALIO-DEV/Starseed:v0.1.57
MALIO-DEV/Starseed:v0.1.56
MALIO-DEV/Starseed:v0.1.55
MALIO-DEV/Starseed:v0.1.54
MALIO-DEV/Starseed:v0.1.53
MALIO-DEV/Starseed:v0.1.52
MALIO-DEV/Starseed:v0.1.51
MALIO-DEV/Starseed:v0.1.50
MALIO-DEV/Starseed:v0.1.49
MALIO-DEV/Starseed:v0.1.48
MALIO-DEV/Starseed:v0.1.47
MALIO-DEV/Starseed:v0.1.46
MALIO-DEV/Starseed:v0.1.45
MALIO-DEV/Starseed:v0.1.44
MALIO-DEV/Starseed:v0.1.43
MALIO-DEV/Starseed:v0.1.42
MALIO-DEV/Starseed:v0.1.41
MALIO-DEV/Starseed:v0.1.40
MALIO-DEV/Starseed:v0.1.39
MALIO-DEV/Starseed:v0.1.38
MALIO-DEV/Starseed:v0.1.37
MALIO-DEV/Starseed:v0.1.36
MALIO-DEV/Starseed:v0.1.35
MALIO-DEV/Starseed:v0.1.34
MALIO-DEV/Starseed:v0.1.33
MALIO-DEV/Starseed:v0.1.32
MALIO-DEV/Starseed:v0.1.31
MALIO-DEV/Starseed:v0.1.30
MALIO-DEV/Starseed:v0.1.29
MALIO-DEV/Starseed:v0.1.28
MALIO-DEV/Starseed:v0.1.27
MALIO-DEV/Starseed:v0.1.26
MALIO-DEV/Starseed:v0.1.25
MALIO-DEV/Starseed:v0.1.24
MALIO-DEV/Starseed:v0.1.23
MALIO-DEV/Starseed:v0.1.22
MALIO-DEV/Starseed:v0.1.21
MALIO-DEV/Starseed:v0.1.20
MALIO-DEV/Starseed:v0.1.19
MALIO-DEV/Starseed:v0.1.18
MALIO-DEV/Starseed:v0.1.17
MALIO-DEV/Starseed:v0.1.16
MALIO-DEV/Starseed:v0.1.15
MALIO-DEV/Starseed:v0.1.14
MALIO-DEV/Starseed:v0.1.13
MALIO-DEV/Starseed:v0.1.12
MALIO-DEV/Starseed:v0.1.11
MALIO-DEV/Starseed:v0.1.10
MALIO-DEV/Starseed:v0.1.9
MALIO-DEV/Starseed:v0.1.8
MALIO-DEV/Starseed:v0.1.7
MALIO-DEV/Starseed:v0.1.6
MALIO-DEV/Starseed:v0.1.5
MALIO-DEV/Starseed:v0.1.4
MALIO-DEV/Starseed:v0.1.3
MALIO-DEV/Starseed:v0.1.2
MALIO-DEV/Starseed:v0.1.1
MALIO-DEV/Starseed:v0.1.0
..
compare: MALIO-DEV/Starseed:v0.1.60
MALIO-DEV/Starseed:feature/ERP-62-page-repertoire-clients
MALIO-DEV/Starseed:feature/ERP-61-sidebar-i18n-clients
MALIO-DEV/Starseed:develop
MALIO-DEV/Starseed:feat/admin-tables-filter-pagination
MALIO-DEV/Starseed:main
MALIO-DEV/Starseed:v0.1.63
MALIO-DEV/Starseed:v0.1.62
MALIO-DEV/Starseed:v0.1.61
MALIO-DEV/Starseed:v0.1.60
MALIO-DEV/Starseed:v0.1.59
MALIO-DEV/Starseed:v0.1.58
MALIO-DEV/Starseed:v0.1.57
MALIO-DEV/Starseed:v0.1.56
MALIO-DEV/Starseed:v0.1.55
MALIO-DEV/Starseed:v0.1.54
MALIO-DEV/Starseed:v0.1.53
MALIO-DEV/Starseed:v0.1.52
MALIO-DEV/Starseed:v0.1.51
MALIO-DEV/Starseed:v0.1.50
MALIO-DEV/Starseed:v0.1.49
MALIO-DEV/Starseed:v0.1.48
MALIO-DEV/Starseed:v0.1.47
MALIO-DEV/Starseed:v0.1.46
MALIO-DEV/Starseed:v0.1.45
MALIO-DEV/Starseed:v0.1.44
MALIO-DEV/Starseed:v0.1.43
MALIO-DEV/Starseed:v0.1.42
MALIO-DEV/Starseed:v0.1.41
MALIO-DEV/Starseed:v0.1.40
MALIO-DEV/Starseed:v0.1.39
MALIO-DEV/Starseed:v0.1.38
MALIO-DEV/Starseed:v0.1.37
MALIO-DEV/Starseed:v0.1.36
MALIO-DEV/Starseed:v0.1.35
MALIO-DEV/Starseed:v0.1.34
MALIO-DEV/Starseed:v0.1.33
MALIO-DEV/Starseed:v0.1.32
MALIO-DEV/Starseed:v0.1.31
MALIO-DEV/Starseed:v0.1.30
MALIO-DEV/Starseed:v0.1.29
MALIO-DEV/Starseed:v0.1.28
MALIO-DEV/Starseed:v0.1.27
MALIO-DEV/Starseed:v0.1.26
MALIO-DEV/Starseed:v0.1.25
MALIO-DEV/Starseed:v0.1.24
MALIO-DEV/Starseed:v0.1.23
MALIO-DEV/Starseed:v0.1.22
MALIO-DEV/Starseed:v0.1.21
MALIO-DEV/Starseed:v0.1.20
MALIO-DEV/Starseed:v0.1.19
MALIO-DEV/Starseed:v0.1.18
MALIO-DEV/Starseed:v0.1.17
MALIO-DEV/Starseed:v0.1.16
MALIO-DEV/Starseed:v0.1.15
MALIO-DEV/Starseed:v0.1.14
MALIO-DEV/Starseed:v0.1.13
MALIO-DEV/Starseed:v0.1.12
MALIO-DEV/Starseed:v0.1.11
MALIO-DEV/Starseed:v0.1.10
MALIO-DEV/Starseed:v0.1.9
MALIO-DEV/Starseed:v0.1.8
MALIO-DEV/Starseed:v0.1.7
MALIO-DEV/Starseed:v0.1.6
MALIO-DEV/Starseed:v0.1.5
MALIO-DEV/Starseed:v0.1.4
MALIO-DEV/Starseed:v0.1.3
MALIO-DEV/Starseed:v0.1.2
MALIO-DEV/Starseed:v0.1.1
MALIO-DEV/Starseed:v0.1.0
6 Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
8d50f1fbe7 |
chore: bump version to v0.1.60
Auto Tag Develop / tag (push) Successful in 6s
Build & Push Docker Image / build (push) Successful in 58s
Pull Request — Quality gate / Backend (PHP CS + PHPUnit) (pull_request) Successful in 1m46s
Pull Request — Quality gate / Frontend (lint + Vitest + build) (pull_request) Successful in 1m10s
|
||
|
|
120058049c |
test(commercial) : cover RG-1.01..1.29 except role-gated (M1) + polish stack (#38)
Auto Tag Develop / tag (push) Successful in 7s
Dernier wagon de la stack back M1. ERP-60 = polish stack + couverture de tests PHPUnit NON dépendante des rôles métier (cf. spec § 7 / § 8.1). ## Phase 0 — polish stack (déjà mergé dans les branches basses via rebase) - ERP-59 : route sidebar `/clients` (au lieu de `/commercial/clients`), cohérente avec `/suppliers`. - One-liner pagination Client abandonné : `pagination_client_enabled: true` est déjà le défaut global → `?pagination=false` marche déjà sur `/api/clients` (décision P7). ## Phase 1 — tests (combler les trous, zéro duplication) 8 nouvelles suites couvrant les RG non encore testées par ERP-55/56/57/58 : - `ClientFormulaireMainTest` — RG-1.02 (téléphone secondaire, max 2). - `ClientAddressTest` — RG-1.06/07/08 + RG-1.11 (CHECK BDD prospect/billing). - `ClientUniquenessTest` — RG-1.15/1.17 (Q4 : SIREN/email NON uniques). - `ClientArchiveTest` — **RG-1.23 : 409 restauration en conflit (gap P1)**. - `ClientAuditTest` — RG-1.27 (created* figés / updatedBy modificateur) + iban/bic présents dans le diff audité. - `ClientMigrationTest` — index partiel unique `uq_client_company_name_active` (1 seul) ; pas d'index siren/email. - `ClientSecurityTest` — 401 anonyme + 403 sans `commercial.clients.view`. - `ClientPatchStrictTest` — RG-1.28 (403 strict mix de groupes, fonctionnel). Cahier de test complet (mapping de TOUTES les RG → test) : `docs/specs/M1-clients/cahier-test-back-M1.md`. ## Délégué à ERP-74 (#493) Matrice RBAC différenciée (bureau/compta/commerciale/usine) + RG-1.04 fonctionnel — exigent les rôles métier seedés après le merge de la stack. ## Gaps documentés (cahier) - RG-1.29 validation écriture (catégorie type sur adresse → 422) non implémentée back (hors § 8.1, ticket test-only). - Violations CHECK adresse → rejet (≥400) sans mapping fin 422 (amélioration possible). ## Vérifs `make db-reset && make php-cs-fixer-allow-risky && make test` → **421 tests OK, 1386 assertions, 0 risky**. Nouveaux tests : 17, 71 assertions. --------- Co-authored-by: Matthieu <contact@malio.fr> Reviewed-on: #38 Co-authored-by: THOLOT DECHENE Matthieu <matthieu@yuno.malio.fr> Co-committed-by: THOLOT DECHENE Matthieu <matthieu@yuno.malio.fr> |
||
|
|
9507664bd0 | chore: bump version to v0.1.59 | ||
|
|
0c9b563cae |
[ERP-55] ClientProvider + ClientProcessor + RG métier (M1) — stackée sur ERP-54 (#31)
Auto Tag Develop / tag (push) Successful in 9s
**MR stackée sur ERP-54** — cible = `feature/ERP-54-creer-entites-client-m1` (PAS `develop`). Tristan validera le stack en fin de chaîne. Branche l'API REST du répertoire clients (M1) sur l'entité `Client` d'ERP-54. ## Périmètre - **ClientProvider** : liste paginée (Paginator ORM aligné ERP-72, `?pagination=false`), exclusion archives+soft-delete par défaut (RG-1.24), `?includeArchived=true` (RG-1.25), tri `companyName ASC` (RG-1.26), filtres `?search` (fuzzy) + `?categoryType`, détail 404 si soft-deleted + embarque contacts/adresses/ribs. - **ClientProcessor** : normalisation (RG-1.18→1.21), 409 doublon nom (RG-1.16) + 409 restauration (RG-1.23), gating par onglet `accounting.manage`/`archive` + mode strict 403 (RG-1.28), archivage exclusif + `archivedAt` (RG-1.22), RG-1.01 / RG-1.03 (mutex + type catégorie) / RG-1.12 / RG-1.13 / RG-1.04. - **ClientReadGroupContextBuilder** : ajout conditionnel du groupe `client:read:accounting` selon `commercial.clients.accounting.view`. - **CategoryReferenceDenormalizer** : résout les IRI catégorie vers `Category` (dénormalisation impossible sur l'interface sinon). - **Contrats Shared** : `CategoryInterface::getCategoryTypeCode()`, `BusinessRoleAwareInterface` + `BusinessRoles::COMMERCIALE`. ## Coordination stack - Permissions `commercial.clients.*` **référencées** ici, déclarées en **ERP-59** (tests RBAC en **ERP-60**). - Rôle métier `commerciale` seedé par **ERP-74** (RG-1.04 dormante d'ici là). - Config globale pagination (itemsPerPage client / max 50) portée par **ERP-72**. - Référentiels comptables (PaymentType/Bank/...) exposés en **ERP-56** → RG-1.12/1.13 testées en unitaire ici (pas d'IRI référentiel disponible avant ERP-56). ## Tests 31 tests Commercial (intégration admin sur les RG métier + unitaires sur le gating / RG-1.04 / RG-1.12 / RG-1.13 / context builder). Suite complète verte (343 tests). Règle n°1 respectée (aucun import inter-modules dans Commercial). --------- Co-authored-by: tristan <tristan@yuno.malio.fr> Co-authored-by: Matthieu <contact@malio.fr> Co-authored-by: Matthieu <mtholot19@gmail.com> Reviewed-on: #31 Co-authored-by: THOLOT DECHENE Matthieu <matthieu@yuno.malio.fr> Co-committed-by: THOLOT DECHENE Matthieu <matthieu@yuno.malio.fr> |
||
|
|
b495e4030a |
[ERP-54] Créer les entités Client + sous-entités + référentiels (#29)
Auto Tag Develop / tag (push) Failing after 28s
## Contexte Ticket Lesstime **#54** (1.1 / Backend / M) — spec `docs/specs/M1-clients/spec-back.md` § 3.4 / § 3.5. > 🔗 **MR stackée sur ERP-53** — cible `feature/ERP-53-migrer-tables-client-m1`, **pas** `develop`. À repointer vers `develop` quand ERP-53 sera mergé (cf. `STACK-BRANCHES-PROCEDURE.md`). Le diff ne montre que les fichiers d'ERP-54. ## Contenu **9 entités** (`src/Module/Commercial/Domain/Entity/`) : - Métier : `Client`, `ClientContact`, `ClientAddress`, `ClientRib` — `#[Auditable]` + Timestampable/Blamable. - Référentiels statiques lecture seule : `TvaMode`, `PaymentDelay`, `PaymentType`, `Bank` — whitelistés dans `EntitiesAreTimestampableBlamableTest::EXCLUDED`. **8 repositories** interfaces (`Domain/Repository/`) + impl Doctrine (`Infrastructure/Doctrine/`). > La spec § 3.5 ne définit que 8 entités (4 métier + 4 référentiels) ; pas de 9ᵉ entité malgré la formulation « 9 paires » du ticket. ## Décisions - **Aucun `#[ApiResource]` dans ce ticket** : le bloc ApiResource du `Client` (§ 3.4) référence `ClientProvider`/`ClientProcessor` = périmètre **ERP-55**. L'inclure casserait `cache:clear`/`make test`/`schema:validate`. Les entités sont des entités Doctrine pures (ORM + Assert + Groups). Endpoints lecture seule des référentiels → ticket dédié. - **Q4** : `Client` sans `#[ORM\UniqueConstraint]` — unicité du nom de société portée par l'index partiel Postgres `uq_client_company_name_active` (inexprimable en attribut ORM). - **Audit RIB (29/05)** : aucun `#[AuditIgnore]` sur `ClientRib.iban`/`bic` (tous champs audités, audit admin-only). - **Cross-module (règle n°1)** : M2M `Category` via le contrat `Shared\Domain\Contract\CategoryInterface` + `resolve_target_entities` (pas d'import direct Catalog→Commercial) ; `ClientAddress.sites` via `SiteInterface` existant. ## Infra nécessaire (découvert pendant le dev) - `doctrine.yaml` : mapping ORM du module `Commercial` (mappings explicites par module) + résolution `CategoryInterface → Category`. - `CommercialReferentialFixtures` **créée** (n'existait pas — ERP-53 avait seedé les CategoryType côté Catalog) : re-seed idempotent des 4 référentiels, sinon vidés au `db-reset` (désormais tables mappées). - `ColumnCommentsCatalog` étendu (colonnes M1) pour le chemin `schema:update`/test — sinon `ColumnsHaveSqlCommentTest` (garde-fou n°12) échoue. - Migration retrofit `Version20260528120000` (ERP-67) rendue résiliente (`$schema->hasTable()`) : elle rejouait tout le catalogue mais s'exécute avant la création des tables M1 → `relation tva_mode does not exist`. Conforme à son docblock (« les futures migrations posent leurs propres COMMENT »). - `makefile test-db-setup` : recréation de l'index partiel `uq_client_company_name_active` (analogue de la ligne existante pour `category`). ## Vérifications - `make php-cs-fixer-allow-risky` ✓ - `make db-reset` ✓ (bout en bout ; 4 référentiels + 4 CategoryType présents, 2 index partiels créés) - `make test` ✓ **312/312** (Architecture vert, 0 régression M0) - `doctrine:schema:validate` : Mapping **OK** ; « not in sync » = bruit cosmétique pré-existant du projet (clear COMMENT hors-ORM, drop index partiels, renommages d'index). Seul diff introduit : renommage cosmétique de l'index M2M `idx_client_category_category` (même colonne) — aucun écart de type/colonne/FK vs migration ERP-53. --------- Co-authored-by: admin malio <malio@yuno.malio.fr> Co-authored-by: Matthieu <contact@malio.fr> Co-authored-by: Matthieu <mtholot19@gmail.com> Reviewed-on: #29 Co-authored-by: THOLOT DECHENE Matthieu <matthieu@yuno.malio.fr> Co-committed-by: THOLOT DECHENE Matthieu <matthieu@yuno.malio.fr> |
||
|
|
56cf492dcc |
[ERP-53] Migrer les tables Client + sous-collections + référentiels comptables (#27)
Auto Tag Develop / tag (push) Failing after 20s
## Contexte Ticket Lesstime : **#53** (ERP-53) — premier ticket back du M1 (Répertoire clients). Spec back : `docs/specs/M1-clients/spec-back.md` § 3.2 + § 3.3. ## Implémentation - Migration Doctrine `migrations/Version20260601000000.php` (12 tables) + fixture `CategoryTypeFixtures`. - **4 référentiels comptables** seedés : `tva_mode` (3), `payment_delay` (3), `payment_type` (4), `bank` (3). - **Table `client`** : 31 colonnes (formulaire + Information + Comptabilité + archive + soft-delete + Timestampable/Blamable). - **4 sous-collections** : `client_category` (M2M), `client_contact`, `client_address`, `client_rib` + **3 jointures** d'adresse (`client_address_site`, `client_address_contact`, `client_address_category`). - **4 CHECK** : mutex distributor/broker, contact name, address prospect exclusif, billing email conditionnel. - **1 index partiel unique** : `uq_client_company_name_active` sur `LOWER(company_name) WHERE is_archived=false AND deleted_at IS NULL` (décision Q4 — **pas** d'unicité siren/email). - **Seed `category_type`** : DISTRIBUTEUR / COURTIER / SECTEUR / AUTRE (`ON CONFLICT (code) DO NOTHING` en migration pour la prod, + fixture idempotente pour dev/test purgés). - `COMMENT ON COLUMN` sur **chaque** colonne (convention ERP-67, garde-fou vert). ## RG couvertes (niveau BDD) RG-1.03 (mutex distrib/broker), RG-1.05 (contact name), RG-1.06/07/08 (adresse prospect exclusif), RG-1.11 (billing email), RG-1.16 (unicité company_name — RG-1.15/1.17 supprimées par Q4), RG-1.22 (is_archived + archived_at). ## Écarts assumés vs spec (cf. docblock migration + cahier de test du ticket) 1. **Namespace `migrations/` racine** au lieu de `App\Module\Commercial\…` : vérifié empiriquement que Doctrine 3.9.6 (AlphabeticalComparator → strcmp FQCN) trierait le namespace Commercial **avant** `DoctrineMigrations` → migration client exécutée avant user/category/site → échec FK sur base vide. Le namespace racine garantit l'ordre par timestamp. 2. **DDL aligné Doctrine** : `INT GENERATED BY DEFAULT AS IDENTITY` + `TIMESTAMP(0) WITHOUT TIME ZONE` (et non SERIAL/TIMESTAMPTZ) → forward-compatible avec les entités du ticket 1.1 (schema:update no-op). 3. **Seed `category_type (code, label)` sans `position`** : la table M0 n'a pas de colonne `position` (coquille du pseudo-SQL § 3.3). > **Note ERP-54** : à l'arrivée des entités Client*, `schema:update` droppera leurs COMMENT + l'index partiel. Prévoir l'ajout au `ColumnCommentsCatalog` + recréation de l'index dans `test-db-setup` (pattern `uq_category_name_type_active`). ## Tests - `make php-cs-fixer-allow-risky` ✓ - `make db-reset` ✓ + vérifications psql manuelles (8 cas : CHECK, unicité partielle, archivage, siren/email dupliqués, seeds) - `make test` ✓ — **312 tests OK, 0 régression** --------- Co-authored-by: Matthieu <contact@malio.fr> Co-authored-by: Matthieu <mtholot19@gmail.com> Reviewed-on: #27 Co-authored-by: THOLOT DECHENE Matthieu <matthieu@yuno.malio.fr> Co-committed-by: THOLOT DECHENE Matthieu <matthieu@yuno.malio.fr> |
1 changed files with 1 additions and 1 deletions
+1
-1
@@ -1,2 +1,2 @@
|
||||
parameters:
|
||||
app.version: '0.1.58'
|
||||
app.version: '0.1.60'
|
||||
|
||||
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.