Add organizer invitation system: invite, accept, refuse

- OrganizerInvitation entity: companyName, firstName, lastName, email,
  message, status (sent/opened/accepted/refused), unique token (64 hex chars)
- Admin route /admin/organisateurs/inviter: form + invitation list with status
- Button "Inviter un organisateur" on admin organizers page
- Email with accept/refuse links using unique token
- Public route /invitation/{token}/{action}: accept or refuse without auth
- Response page: confirmation message for accept/refuse
- Migration, PHPStan config, 7 entity tests

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Serreau Jovann
2026-03-22 17:41:31 +01:00
parent 233f3d5067
commit cca5575274
11 changed files with 531 additions and 4 deletions

View File

@@ -0,0 +1,27 @@
<?php
declare(strict_types=1);
namespace DoctrineMigrations;
use Doctrine\DBAL\Schema\Schema;
use Doctrine\Migrations\AbstractMigration;
final class Version20260322100000 extends AbstractMigration
{
public function getDescription(): string
{
return 'Create organizer_invitation table';
}
public function up(Schema $schema): void
{
$this->addSql('CREATE TABLE organizer_invitation (id INT GENERATED BY DEFAULT AS IDENTITY NOT NULL, company_name VARCHAR(255) NOT NULL, first_name VARCHAR(255) NOT NULL, last_name VARCHAR(255) NOT NULL, email VARCHAR(255) NOT NULL, message TEXT DEFAULT NULL, status VARCHAR(20) NOT NULL, token VARCHAR(64) NOT NULL, created_at TIMESTAMP(0) WITHOUT TIME ZONE NOT NULL, responded_at TIMESTAMP(0) WITHOUT TIME ZONE DEFAULT NULL, PRIMARY KEY(id))');
$this->addSql('CREATE UNIQUE INDEX UNIQ_ORG_INV_TOKEN ON organizer_invitation (token)');
}
public function down(Schema $schema): void
{
$this->addSql('DROP TABLE organizer_invitation');
}
}