feat: extensible participant status determination for booking creation

Adds a rule-based system to determine participant status in CREATE
payloads. Participants selecting a 'Begleitperson' service now receive
status 'O' (Option), all others default to 'F' (Final).

- Add ParticipantStatusRuleInterface for defining status rules
- Add ParticipantStatusRuleRegistry for priority-based rule evaluation
- Add ChaperonServiceStatusRule for Begleitperson detection
- Integrate status evaluation into BookingPayloadBuilder
This commit is contained in:
Björn Fromme
2026-01-21 10:16:57 +01:00
parent 512b63b88b
commit 2aeed762fd
10 changed files with 525 additions and 4 deletions
@@ -18,6 +18,7 @@ use App\BusProNet\Model\Pickup;
use App\BusProNet\Model\Room;
use App\BusProNet\Model\Service;
use App\BusProNet\Model\Travel;
use App\BusProNet\Service\ParticipantStatusRuleRegistry;
use App\Form\Model\BookingDto;
use App\Form\Model\ParticipantDto;
use App\Service\BookingPriceCalculatorService;
@@ -52,7 +53,8 @@ class BookingDataProcessorTest extends TestCase
// Create the new dependencies
$mappingCollector = new ServiceMappingCollector();
$serviceProcessor = new ParticipantServiceProcessor(new NullLogger());
$payloadBuilder = new BookingPayloadBuilder($mappingCollector);
$statusRuleRegistry = new ParticipantStatusRuleRegistry([]);
$payloadBuilder = new BookingPayloadBuilder($mappingCollector, $statusRuleRegistry);
$personalDataSynchronizer = new PersonalDataSynchronizer();
$this->processor = new BookingDataProcessor(