Problem
The audience a tariff is offered under is a yoyaku_tariff_class, and every field, label and description now calls it a tariff class. The code that reads it does not. SlotBookingForm::groupTiers() is the last place holding the old vocabulary, and it holds two layers of it at once: group for the class, and tier for the tariff, a word #3615057 removed everywhere else.
That matters more than tidiness here, because the method is the one that decides how the booking page is arranged. Somebody reading it looks for a "group" entity and finds none, or assumes a tier is a third scope beside the resource tariff and the slot tariff. The docblock compounds it: "a resource that groups only some of its tariffs", when grouping is not something a resource does at all now that the class belongs to the tenant.
Two French entries also survive for English strings that no longer exist, from before the class became tenant-level: the description of the resource field that #3614386 removed, and the "group" wording of the class description that the same issue rewrote. They are dead weight in the catalog and the only remaining place a reader is told a class is a "groupe".
Proposed resolution
groupTiers()takes a name saying what it returns: the tariffs of a slot arranged under the classes they name, with the unclassed ones first. Its local$groups,$groupand$ratesfollow.- Its docblock stops describing a resource as grouping its tariffs, and says the class does.
BookingResourceTariffInterface::getTariffClass()says class rather than "the group this tariff is offered under".SlotBookingFormTest'smakeGroup()andmakeGroupedTier()follow the same nouns, so the test reads as the thing it pins.- The two orphaned French entries go.
No behavior changes and no stored data moves: the field name tariff_class, the entity type and every user-facing string are already correct. This is the reading path catching up with them.
Remaining tasks
- Rename the method, its variables and its docblock in
SlotBookingForm. - Sweep the two interface docblocks.
- Rename the two test helpers, and check the assertions still describe what they assert.
- Drop the orphaned catalog entries, and confirm no live string still translates class as "groupe".
- Run the calendar suite: the method is private, so its callers are inside one file, but the panels it builds are what
SlotBookingFormTestasserts.
User interface changes
None. Every string a booker or an operator reads already says tariff class.
Issue fork yoyaku-3615148
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #4
mably commented