Migration des coupons d'évènement de Ting vers Doctrine - #2386
Open
Korbeil wants to merge 1 commit into
Open
Conversation
Korbeil
force-pushed
the
afup-migrer-les-coupons-d
branch
from
September 2, 2026 20:03
0e0e4a7 to
c9c053b
Compare
Korbeil
marked this pull request as ready for review
September 2, 2026 20:20
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 la persistance des coupons d'évènement de Ting vers Doctrine ORM (ref #2383) : nouvelle entité et nouveau repository Doctrine, mise à jour de l'unique appelant, suppression des classes Ting.
Changements
AppBundle\Event\Entity\EventCouponmappée sur la table existanteafup_forum_coupon(id,id_forum,texte) — aucune migration DB nécessaire.AppBundle\Event\Entity\Repository\EventCouponRepositoryreprenant les trois méthodes du repository Ting :changeCouponForEvent(),couponsListForEvent(),couponsListForEventImploded(). Les méthodes prennent désormais unint $eventIdau lieu de l'objet TingEvent, et le remplacement des coupons est exécuté dans une transaction (wrapInTransaction).AppBundle\Controller\Admin\Event\EventActionpour utiliser le nouveau repository (autowiring inchangé).AppBundle\Event\Model\EventCouponetAppBundle\Event\Model\Repository\EventCouponRepository; retrait des 8 entrées correspondantes dephpstan-baseline.php.EventCouponRepositoryTest(remplacement des coupons, gestion des valeurs vides/blanches, isolation par évènement, implosion avec séparateur).Comment tester
vendor/bin/phpunit --testsuite unitvendor/bin/phpunit --testsuite integrationvendor/bin/phpstan analysevendor/bin/behat tests/behat/features/Admin/Events/GestionEvenements.feature— le scénario de création d'évènement remplit le champevent[coupons]et vérifie l'enregistrement.Notes
changeCouponForEvent()est désormais atomique (suppression + réinsertion dans une transaction) — observable uniquement en cas d'échec intermédiaire.afup.doctrine.noDQL,afup.doctrine.repositoryMethods) : requêtes via QueryBuilder, logique confinée au repository.