Migre l'association conférencier<->session de Ting vers Doctrine - #2387
Draft
Korbeil wants to merge 1 commit into
Draft
Migre l'association conférencier<->session de Ting vers Doctrine#2387Korbeil wants to merge 1 commit into
Korbeil wants to merge 1 commit into
Conversation
Korbeil
force-pushed
the
afup-migrer-l-association-conferencier
branch
from
September 2, 2026 19:39
be371e3 to
e1a02ca
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Migre l'association conférencier <-> session (table
afup_conferenciers_sessions) de Ting vers Doctrine. C'est l'un des quick wins de la migration globale Ting → Doctrine suivie dans #2383, en suivant le pattern établi : déclaration des entités Doctrine → implémentation des repositories Doctrine → migration des usages → suppression des classes Ting.Changements
AppBundle\Event\Entity\TalkToSpeakermappée surafup_conferenciers_sessions(clé primaire compositesession_id/conferencier_id, sans auto-increment ni relation — pas d'entité DoctrineTalkà ce jour).AppBundle\Event\Entity\Repository\TalkToSpeakerRepositoryportant les 3 méthodes du repository Ting :getNumberOfSpeakers(): QueryBuilder DBAL (COUNT DISTINCT + JOINafup_sessions, filtre optionneldate_soumission), retour typéint(attendu par le DTOCFPStats) ;replaceSpeakers(): EntityManager — chargement des associations existantes,remove()+persist()des nouvelles entités, un seulflush()(suppression effective même avec un tableau vide) ;addSpeakerToTalk(): EntityManager — insertion seulement si l'association n'existe pas déjà (find()composite), idempotence préservée.CfpNotificationCommand,AddAction,EditAction,InviteAction,TalkFormHandler,EventStatsRepository,MessageFactory.AppBundle\Event\Model\TalkToSpeakeretAppBundle\Event\Model\Repository\TalkToSpeakersRepository.CFPStatséliminée grâce au retour typé).TalkToSpeakerRepositoryTest(7 tests) couvrant les 3 méthodes.Comment tester
make test-integration-ci— démarredbtest/apachephptest, installe le vendor et lance la suite d'intégration (dont les 7 nouveaux tests).make phpstan— analyse statique niveau 10, 0 erreur.make test— suite unitaire (116 tests) + php-cs-fixer.Notes
Talk/Speaker/Eventrestent dans les signatures tant que ces modèles sont sous Ting) ; les requêtes passent par le QueryBuilder DBAL et l'EntityManager — plus de SQL brut d'écriture (seule la requête de count joint la table non-entitéafup_sessions).REPLACE INTOdevient « insertion si absente » via l'EntityManager — en cas de course concurrente, un doublon lèverait une violation de clé primaire au lieu d'être remplacé silencieusement.flush()unique dereplaceSpeakers()ne garantit pas l'atomicité si la table de prod est encore en MyISAM.Speakervolontairement non créée : à ajouter (FK) quandSpeaker/Talkmigreront vers Doctrine.