Commit Graph

324 Commits

Author SHA1 Message Date
Serreau Jovann
56ec1841d7 fix: rewrite Discord webhook workflow for Gitea compatibility
- Remove jq dependency
- Use file-based payload with cat > /tmp/discord.json instead of inline HEREDOC
- Fix HEREDOC indentation issue
- Escape JSON properly with sed
- Use curl -d @file for reliable payload delivery

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-02 18:51:33 +02:00
Serreau Jovann
6fa970e60d refactor: rebrand project to CRM SITECONSEIL (SARL SITECONSEIL)
- Rename all references from E-Cosplay/Ecosplay to SITECONSEIL
- Update entity from Association to SARL SITECONSEIL (Siret: 418664058)
- Update address to 27 rue Le Serurier, 02100 Saint-Quentin
- Update emails: contact@siteconseil.fr, rgpd@siteconseil.fr
- Update hosting from GCP to OVHcloud (Roubaix, Gravelines, Strasbourg, Paris)
- Update legal pages: mentions legales, CGV, RGPD, conformite, hebergement, cookies, CGU
- Add tarifs page with tabs: Site Internet, E-Commerce, Nom de domaine, Esy-Mail, Esy-Mailer, Esy-Tchat, Esy-Meet, Esy-Defender
- Add Discord webhook notification workflow
- Disable deploy and sonarqube workflows
- Update OAuth Keycloak realm to master
- Update logo references to logo_facture.png
- Remove forced image sizing in Liip Imagine filters
- Update SonarQube project key and badge token
- Update tribunal competent to Saint-Quentin
- Move tarif tabs JS to app.js (CSP compliance)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-02 18:48:25 +02:00
Serreau Jovann
363cea260b fix: replace all layout tables with CSS in email and PDF templates
- Email templates: replace table/tr/td with div-based CSS layout
- PDF templates: replace table with display:table/table-row/table-cell CSS (Dompdf compatible)
- Only table.data (RGPD access session data) remains as actual HTML table

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-01 19:57:26 +02:00
Serreau Jovann
a76e96fb21 fix: add th headers and role=presentation to PDF and legal tables
- Add thead/th to commissions table in tarif.html.twig
- Add th headers to contrat_revendeur parties table
- Add role=presentation to PDF layout tables (info-grid, verify-box, signatures)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-01 19:50:56 +02:00
Serreau Jovann
242f8337e1 fix: replace deprecated HTML attributes and reduce JS nesting
- Replace email layout tables with CSS divs in base.html.twig
- Replace deprecated width/align attributes with CSS styles in PDF templates
- Add role="presentation" to email layout tables
- Convert td to th[scope=row] in profil and attestation verify tables
- Reduce function nesting in app.js by extracting renderHit/performSearch

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-01 19:36:42 +02:00
Serreau Jovann
5f144ba4d2 fix: resolve SonarQube accessibility and test issues across templates
- Add for/id attributes to all form labels for accessibility compliance
- Add <title> tags to PDF templates (rgpd_access, rgpd_no_data, rgpd_deletion, contrat_revendeur)
- Add role="presentation" to email layout tables
- Remove deprecated cellpadding/cellspacing attributes from all templates
- Fix PHPUnit notices by replacing createMock with createStub where no expectations are set

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-01 19:30:53 +02:00
Serreau Jovann
b0060bd831 test: achieve 100% coverage for CheckServicesCommand and update SonarQube config
- Add 26 tests covering all service check types (HTTP, DocuSeal, Vault, Minio, Stripe)
- Include assets/ and templates/ in SonarQube sources
- Ignore php:S4144 globally (interface-imposed duplicate methods)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-01 19:24:15 +02:00
Serreau Jovann
409691fbad fix: reduce return count and suppress interface-imposed duplicate warnings
- ForgotPasswordController::validateResetInput: reduce from 4 to 3 returns using match expression
- DocuSealService::downloadSignedDocuments: reduce from 4 to 3 returns by extracting fetchAndStoreDocuments
- User: add @SuppressWarnings for getEmailAuthRecipient/getGoogleAuthenticatorUsername (required by 2FA interfaces)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-01 19:18:23 +02:00
Serreau Jovann
b0731a430c refactor: fix SonarQube code smells and add AnalyticsCryptoService tests
Reduce cognitive complexity and fix code smells across multiple files:
- Extract helper methods in DocuSealService, ForgotPasswordController, WebhookDocuSealController
- Reduce MembresController.persistLocalUser from 8 to 3 parameters using typed array
- Replace chained if/returns with ROLE_ROUTES map in LoginSuccessHandler
- Add 100% test coverage for AnalyticsCryptoService (15 tests)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-01 19:14:51 +02:00
Serreau Jovann
36271b1fe1 refactor: fix SonarQube code smells and reduce cognitive complexity
- ForgotPasswordController: extract handleSendCode/handleReset methods to reduce complexity from 17 to ~10
- HomeController: replace multiple if/return with const map + foreach (4 returns → 2)
- LegalController: extract '#exercer-droits' into RGPD_ANCHOR constant
- WebhookDocuSealController: extract verifySecret/syncSubmitterIdFromMetadata, add ATTESTATION_NOT_FOUND constant, remove unused params ($em, $reason)
- MembresController/RevendeursController: minor linter fixes

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-01 18:57:59 +02:00
Serreau Jovann
bc4289a7c5 chore: remove Semgrep from quality analysis pipeline 2026-04-01 18:44:16 +02:00
Serreau Jovann
798e1480d7 fix: add mandatory 'type' field to semgrep report rules for SonarQube 2026-04-01 18:20:47 +02:00
Serreau Jovann
466b05bfe2 refactor: improve MembresController and ProfilController quality
- src/Controller/Admin/MembresController.php: reduce return statements in 'create' and add error logging
- src/Controller/Admin/ProfilController.php: reduce return statements in 'password' and 'update', and fill empty catch blocks with logging
2026-04-01 18:10:35 +02:00
Serreau Jovann
fd822b5b7f test: achieve 100% coverage for Exception and Twig namespaces 2026-04-01 18:10:10 +02:00
Serreau Jovann
dbaf23e13a test: achieve 100% coverage for KeycloakAuthenticator and LoginSuccessHandler 2026-04-01 17:57:10 +02:00
Serreau Jovann
3044a7a4b8 test: achieve 100% coverage for LegalController 2026-04-01 17:53:32 +02:00
Serreau Jovann
75bd0a795c refactor: update semgrep report format for SonarQube compatibility 2026-04-01 17:52:41 +02:00
Serreau Jovann
197916c4e0 test: add HomeControllerTest to generate PHPUnit report 2026-04-01 17:47:12 +02:00
Serreau Jovann
2a70b63549 refactor: improve code quality, security and maintainability
- src/Controller/Admin/ClientsController.php: reduce cognitive complexity by extracting private methods and adding error logging
- src/Service/MeilisearchService.php: fill empty catch blocks with error logging for better traceability
- src/Service/UserManagementService.php: use dedicated UserAlreadyExistsException instead of generic Exception
- src/Service/KeycloakAdminService.php: define and use PATH_USERS and AUTH_BEARER constants to reduce duplication
- src/Service/DocuSealService.php: reduce method return points to comply with project standards
2026-04-01 17:44:57 +02:00
Serreau Jovann
227da01926 refactor: improve commands security, quality and observability
- src/Command/CheckServicesCommand.php: reduce return statements count to comply with static analysis rules
- src/Command/CleanAttestationsCommand.php: replace native unlink/file_exists with Symfony Filesystem for better security
- src/Command/StripeSyncCommand.php: replace TODOs with ID logging for better observability during sync
2026-04-01 17:32:54 +02:00
Serreau Jovann
25c593874c refactor: address static analysis warnings and reduce code duplication
- Created UserManagementService to centralize common user creation logic.
- Refactored ClientsController and RevendeursController to use UserManagementService.
- Reduced code duplication in StatsController and RgpdService.
- Fixed type mismatch in StatusController for ServiceMessage author.
- Improved data consistency in MailerService and EmailTrackingController for attachments.
- Added missing MessengerLogRepository.
- Fixed getFlashBag() call in KeycloakAuthenticator using FlashBagAwareSessionInterface.
- Added missing PHPDoc type specifications in WebhookDocuSealController and RgpdService.
- Removed unused MailerService injection in RgpdService.
2026-04-01 17:18:51 +02:00
Serreau Jovann
686de99909 init 2026-04-01 15:42:52 +02:00
Serreau Jovann
beb12d2b75 Add webapp packages 2026-03-30 18:52:03 +02:00
Serreau Jovann
c1485046af Add initial set of files 2026-03-30 18:51:57 +02:00