Commit Graph

67 Commits

Author SHA1 Message Date
Serreau Jovann
3f11123e38 Add make hadolint command to lint Dockerfiles locally
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-19 14:54:06 +01:00
Serreau Jovann
6f142e1442 Add docker/ to sonar.sources for Hadolint report resolution
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-19 14:53:36 +01:00
Serreau Jovann
7cce3a2999 Add OWASP Dependency-Check integration for SonarQube
- Add sonar.dependencyCheck.jsonReportPath and htmlReportPath to sonar-project.properties
- Add Dependency-Check action scanning composer.lock and package.json
- Generate JSON and HTML reports for SonarQube analysis
- Add to ci.yml sonarqube job and sonarqube.yml workflow

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-19 14:41:25 +01:00
Serreau Jovann
7474ada434 Add ESLint and Hadolint reports for SonarQube analysis
- Add sonar.eslint.reportPaths and sonar.docker.hadolint.reportPaths
- Generate ESLint JSON report in CI frontend and sonarqube jobs
- Generate Hadolint JSON reports for dev and prod Dockerfiles
- Add reports to ci.yml and sonarqube.yml workflows

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-19 14:40:08 +01:00
Serreau Jovann
8275e65eb9 Add PHPStan report for SonarQube analysis
- Add sonar.php.phpstan.reportPaths to sonar-project.properties
- Generate phpstan-report.json in CI php job, sonarqube job, and sonarqube.yml workflow

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-19 14:38:29 +01:00
Serreau Jovann
9bcb41306b Add conformite page, SonarQube badge proxy, coverage fixes, and code quality
- Add /conformite page: PSD2/3DS/Stripe, SonarQube badges, CI/CD, security
- Create SonarBadgeController proxy to serve SonarQube badges without exposing token
- Store SonarQube badge token in ansible/vault.yml instead of env files
- Add Meilisearch coverage tests: search with results, search error, sync, delete
- Fix MeilisearchService delete catch block with comment
- Fix ESLint: use globalThis.confirm instead of window.confirm
- Fix accessibility: add for/id attributes to buyer creation form labels
- Add conformite link to site footer
- Add SonarBadgeControllerTest and LegalControllerTest for /conformite

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-19 14:25:04 +01:00
Serreau Jovann
a4884e8b20 Add admin.js test coverage (100%) and update CLAUDE.md coverage rule
- Add admin.test.js with 3 tests: confirm cancel, confirm accept, no data-confirm
- Update CLAUDE.md: coverage rule includes PHP and JS

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-19 14:15:13 +01:00
Serreau Jovann
9551b2ee3f Fix ESLint: use window.confirm instead of confirm in admin.js
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-19 14:11:34 +01:00
Serreau Jovann
df7680d938 Add admin panel, Meilisearch buyer search, email redesign, and multiple features
Admin panel (/admin, ROLE_ROOT):
- Dashboard with CA HT Global/Commission cards and Meilisearch sync button
- Buyers page with search (Meilisearch), create form, pagination (KnpPaginator)
- Buyer actions: resend verification, force verify, reset password, delete
- Organizers page with tabs (pending/approved), approve/reject with emails
- Neo-brutalist design matching main site theme
- Vite admin entry point with dedicated SCSS
- CSP-compatible confirm dialogs via data-confirm attributes

Meilisearch integration:
- Auto-index buyers on email verification
- Remove from index on buyer deletion
- Manual sync button on dashboard
- Search bar on buyers page
- Add Meilisearch service to CI/SonarQube workflows
- Add MEILISEARCH env vars to .env.test
- Fix MeilisearchMessageHandler infinite loop: use request() directly instead
  of service methods that re-dispatch messages

Email templates:
- Redesign base email template to neo-brutalist style (borders, shadows, yellow footer)
- Add E-Cosplay logo, "E-Ticket solution proposee par e-cosplay.fr"
- Add admin_reset_password, organizer_approved, organizer_rejected templates

Other:
- Install knplabs/knp-paginator-bundle
- Add ^/admin access_control for ROLE_ROOT in security.yaml
- Update site footer with E-Ticket branding
- 18 admin tests, updated MeilisearchMessageHandler tests

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-19 14:07:07 +01:00
Serreau Jovann
0350b6e876 Extract TEMPLATE constant in ForgotPasswordController to avoid string duplication
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-19 12:25:53 +01:00
Serreau Jovann
52e6e2c14c Add email verification, organizer approval, and forgot password features
- Add isVerified, emailVerificationToken, emailVerifiedAt fields to User entity
- Send verification email on registration with token link
- Add /verification-email/{token} route to confirm email
- Send notification emails to organizer and staff on organizer email verification
- Add isApproved and offer fields to User entity for organizer approval workflow
- Auto-verify and auto-approve SSO Keycloak users with offer='custom'
- Add resetCode and resetCodeExpiresAt fields to User entity
- Create ForgotPasswordController with 2-step flow (email -> code + new password)
- Block forgot password for SSO users (no local password)
- Add "Mot de passe oublie" link on login page
- Create email templates: verification, reset_code, organizer_pending, organizer_request
- Add migrations for all new fields
- Add tests: ForgotPasswordControllerTest (9 tests), update RegistrationControllerTest,
  update UserTest with verification, approval, offer, and reset code fields

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-19 12:13:32 +01:00
Serreau Jovann
4577e06a19 Add organizer registration test, User entity tests, and testing rules to CLAUDE.md
- Add testRegistrationAsOrganizer to RegistrationControllerTest
- Add testOrganizerFields and testOrganizerFieldsDefaultToNull to UserTest
- Add testing rules to CLAUDE.md: always create tests, run after changes, 100% coverage

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-19 11:40:18 +01:00
Serreau Jovann
e46b8572f2 Add registration page with buyer/organizer tabs
- Add organizer fields to User entity: companyName, siret, address, postalCode, city, phone
- Update RegistrationController to handle buyer and organizer registration types
- Create register template with tab selector (acheteur/organisateur)
- Organizer registration assigns ROLE_ORGANIZER
- Add migration for new User fields

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-19 11:31:22 +01:00
Serreau Jovann
d8899506ef Exclude OAuthController::check() from code coverage
Method body is never reached as KeycloakAuthenticator intercepts the request

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-19 11:00:56 +01:00
Serreau Jovann
ac41014aea Add thead headers to contact email template table
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-19 10:58:09 +01:00
Serreau Jovann
ce1e4bc31c Add test for /connection/sso/check route to cover OAuthController 100%
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-19 10:53:27 +01:00
Serreau Jovann
4ecbb23a2a Fix PHPStan errors and PHP CS Fixer import order
- Fix OAuthController: add missing second parameter to redirect()
- Fix KeycloakAuthenticator: get email from toArray() instead of getEmail()
- Fix KeycloakAuthenticator: type-hint session for getFlashBag() access
- Fix import order in KeycloakAuthenticatorTest

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-19 10:48:54 +01:00
Serreau Jovann
53d8b30942 Add tests for KeycloakAuthenticator, OAuthController, and SSO login button
- Add KeycloakAuthenticatorTest: supports, success/failure redirects, user creation,
  email linking, user update, /superadmin group to ROLE_ROOT mapping, unknown groups
- Add OAuthControllerTest: SSO login redirects to Keycloak, SSO logout redirects to home
- Add SSO button presence test to SecurityControllerTest

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-19 10:47:39 +01:00
Serreau Jovann
2405fcc2da Add SSO E-Cosplay (Keycloak OIDC) and dynamic navbar active state
- Install knpuniversity/oauth2-client-bundle and stevenmaguire/oauth2-keycloak
- Register KnpUOAuth2ClientBundle in bundles.php
- Configure Keycloak OIDC client (realm e-cosplay, auth.esy-web.dev)
- Add keycloakId field to User entity with migration
- Create KeycloakAuthenticator with group-to-role mapping (/superadmin -> ROLE_ROOT)
- Create OAuthController with SSO routes (/connection/sso/login, logout, check)
- Add custom_authenticator to security firewall with form_login entry point
- Add auth.esy-web.dev to nelmio external_redirects whitelist and CSP form-action
- Add SSO button and error flash messages to login page
- Make navbar active state dynamic based on current route (desktop + mobile)
- Add Keycloak env vars to .env, .env.local, and ansible/env.local.j2

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-19 10:38:19 +01:00
Serreau Jovann
28763e7ee1 Add contact page with form, email template, and tests
- Create ContactController with GET/POST handling and MailerService integration
- Create contact page template with name, surname, email, message form
- Create dedicated email template for contact messages
- Update navbar links (desktop + mobile) to point to /contact route
- Add ContactControllerTest with 5 tests covering form submission and validation

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-19 10:19:41 +01:00
Serreau Jovann
b5020eae66 Fix coverage config to include assets/app.js
- Change vitest coverage include from assets/modules/**/*.js to assets/**/*.js

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-19 09:13:38 +01:00
Serreau Jovann
3c0cac1074 Add test coverage for assets/app.js
- Test that initMobileMenu and initTabs are called on DOMContentLoaded

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-19 09:05:58 +01:00
Serreau Jovann
9a8255a4ba Add JS test coverage to SonarQube job in CI workflow
- Add Node.js and Bun setup steps to the sonarqube job
- Install JS dependencies and run bun test:coverage before SonarQube scan

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-19 08:57:32 +01:00
Serreau Jovann
0a267060b3 Add run_test Make command, remove unused $page param, add AccountController tests
- Add `make run_test` command to run PHP and JS tests via Docker dev
- Remove unused `$page` parameter from SitemapController::getEventUrls() and getOrgaUrls()
- Add AccountControllerTest with auth redirect and authenticated access tests

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-19 08:55:53 +01:00
Serreau Jovann
9f855717cb Remove coverage/ from repo and add to gitignore
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-19 00:19:58 +01:00
Serreau Jovann
922e8c5e02 Add JS tests, refactor SitemapController, extract JS modules
- Extract mobile-menu.js and tabs.js from app.js
- Add Vitest tests with happy-dom and v8 coverage (100% on modules)
- Add JS test step to CI frontend and SonarQube workflows
- SonarQube: add JS lcov coverage report path
- SitemapController: extract URLSET_TEMPLATE constant, deduplicate methods

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-19 00:19:34 +01:00
Serreau Jovann
d34a684552 Add S/MIME signing test with auto-generated certificate
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-19 00:10:17 +01:00
Serreau Jovann
63c6ba5470 Fix ESLint: add browser globals (document, window, console)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-19 00:08:29 +01:00
Serreau Jovann
5028afd3a5 Fix PHP CS Fixer: remove parentheses on anonymous classes
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-19 00:03:23 +01:00
Serreau Jovann
af8bbc24dc Add homepage, tarifs, legal pages, navbar, footer and full test coverage
- Homepage: hero, how it works (buyer/organizer), features, CTA
- Tarifs: 3 plans (Gratuit, Basique 10€, Sur-mesure), JSON-LD Product
- Legal pages: mentions legales, CGU (tabs buyer/organizer), CGV, RGPD, cookies, hosting
- Navbar: neubrutalism style, logo liip, mobile menu, SEO attributes
- Footer: contact, description, legal links, tarifs
- Sitemap: add /tarifs and /sitemap-orgas-{page}.xml
- Liip Imagine: remove S3, webp format on all filters
- Tests: full coverage for all controllers, services, repositories
- Fix CSP: replace inline onclick with data-tab JS

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-19 00:01:58 +01:00
Serreau Jovann
4990e5cfe2 Fix RegistrationControllerTest: test duplicate email instead of invalid data
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-18 23:18:01 +01:00
Serreau Jovann
fd918c0323 Add manual SonarQube full scan workflow
- Manual trigger only (workflow_dispatch)
- Full pipeline: bun install, bun build, PHPUnit with coverage
- Force SonarQube to re-analyze all files (forceReloadAll)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-18 23:15:10 +01:00
Serreau Jovann
1e41a9746c Fix test coverage and PHPUnit notices
- RegistrationController: add POST tests (valid + invalid data)
- ViteAssetExtension: add tests for manifest file loading, faviconsProd, isMobile, getNonce
- CacheService: fix mock return values to suppress PHPUnit notices
- User: add comment to empty eraseCredentials method
- Email base template: add title tag

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-18 23:14:04 +01:00
Serreau Jovann
a9a7019a6f Fix failing controller tests: Content-Type matching, missing logo.jpg
- Use assertStringContainsString for Content-Type (Symfony adds charset)
- Create fake logo.jpg in CI for EmailTracking test

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-18 23:04:31 +01:00
Serreau Jovann
6bbfe28c05 Fix CI: downgrade setup-bun to v1, fix test database name
- setup-bun v2 uses node24, downgrade to v1 (node20 compat)
- DB name e_ticket + Symfony _test suffix = e_ticket_test
- Add doctrine:database:create before schema:create

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-18 23:00:43 +01:00
Serreau Jovann
89f74de702 Add missing templates, add PostgreSQL and Redis services to CI
- Create 13 missing Twig templates (account, security, legal, unsubscribe, pages)
- CI: add PostgreSQL and Redis service containers for php and sonarqube jobs
- CI: create database schema before running tests
- Use null mailer in test environment

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-18 22:57:38 +01:00
Serreau Jovann
2d90440692 Run SonarQube only after php and frontend jobs succeed
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-18 22:54:34 +01:00
Serreau Jovann
dc21c6a738 Consolidate CI: merge jobs, add coverage to SonarQube
- Merge lint, quality-php, security, test into single php job
- Merge quality-frontend and build into single frontend job
- SonarQube: generate coverage.xml before scan

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-18 22:53:47 +01:00
Serreau Jovann
dc3d464b17 Add PHPUnit tests with coverage for all src classes
- 21 test files covering controllers, services, entities, enums, messages
- CI: add test job with Xdebug coverage (clover + text)
- SonarQube: configure coverage report path and test sources

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-18 22:50:23 +01:00
Serreau Jovann
d13e9b6b80 Downgrade setup-node to v3 for Gitea runner compat (node20)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-18 22:45:21 +01:00
Serreau Jovann
709d8f3f9a Fix Stylelint import-notation: use string instead of url()
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-18 22:44:25 +01:00
Serreau Jovann
7a2f54a491 Add Node.js 22 setup in CI for frontend jobs
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-18 22:40:43 +01:00
Serreau Jovann
ec020e36de Downgrade Stylelint to v16 for Node.js 18 compat in CI
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-18 22:40:15 +01:00
Serreau Jovann
eb5e3891ac Remove debug console.log from app.js
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-18 22:38:42 +01:00
Serreau Jovann
c969b4e3ff Fix SonarQube issues: reduce returns, remove unused vars, fill empty blocks
- CspReportController: reduce to 3 returns
- RegistrationController: reduce to 3 returns
- SitemapController: extract CONTENT_TYPE_XML constant, remove unused $offset
- UnsubscribeController: implement unsubscribe via UnsubscribeManager
- MessengerFailureSubscriber: log error in catch block

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-18 22:38:08 +01:00
Serreau Jovann
9a41aac416 Apply PHP CS Fixer formatting rules
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-18 22:33:20 +01:00
Serreau Jovann
12344fe33d Add SonarQube scan to CI pipeline
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-18 22:21:07 +01:00
Serreau Jovann
90cb2be14c Downgrade ESLint to v9 for Node.js compat in CI
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-18 22:14:21 +01:00
Serreau Jovann
886a75f098 Fix all PHPStan level 6 errors
- Add missing use App\Entity\EmailTracking in MailerService
- Add PHPDoc types for array params/returns in MeilisearchService, MeilisearchMessage, ViteAssetExtension
- Remove redundant array_values() in UnsubscribeManager
- Ignore Doctrine-managed $id property warnings in phpstan.neon

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-18 22:11:51 +01:00
Serreau Jovann
160369f0f6 Add CI pipeline, Meilisearch service, CacheService and code quality tools
- CI: lint, PHPStan, PHP CS Fixer, ESLint, Stylelint, security audit, build
- MeilisearchService: async via Messenger, sync search
- MeilisearchMessage + handler for async operations
- CacheService with CacheKey enum (TTL per key, remember pattern)
- Meilisearch env vars in .env.local, vault and env.local.j2
- Messenger routing for MeilisearchMessage
- PHPStan level 6, ESLint, Stylelint configs

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-18 22:08:54 +01:00