Various commands are available:
composer reload-fixture- Empty the database then load all the fixtures
composer reload-db- Completely drop the database and recreate it from scratch, then load all fixtures
When creating a new entity, you should do the next steps :
- Create the Entity (and his linked repository)
bin/console make:entity
- Add the route in
config/packages/security.yaml - Create the matching factory (useful for generating fake data)
bin/console make:factory --test
- Optional, Create the matching story
bin/console make:story --test
- Create the matching test under
tests/Entity - Add the data generation inside
src/DataFixtures/AppFixtures - Generate the doctrine migration script
bin/console make:migration- Remove the alter fields for
user_member,user_security_codeand related migration formessengerthe field is already migrated but the symfony scripts want to generate another one that will break the site...
Background jobs (member imports, member-control sync, ...) run on Symfony Messenger and their progress is tracked per-club in the generic ClubJob table rather than one-off counters — see src/Entity/ClubDependent/ClubJob.php.
- Add a case to
src/Enum/ClubJobKey.phpidentifying your job. - Create the
Message(extendingApp\Message\Abstract\ClubLinkedMessage, carrying primitives only — no entities) and its#[AsMessageHandler]handler undersrc/MessageHandler/. - Route the message class to a transport in
config/packages/messenger.yaml. - From your producer, chunk the work (
array_chunk(..., 100)is the existing convention), callClubService::startJob($club, ClubJobKey::your_key, count($chunks))once, then dispatch one message per chunk.MessengerSubscribercallsClubService::recordJobResult()automatically as each message succeeds or (after all retries) permanently fails — no extra wiring needed.