One thing has five names. Across docs/ the entity yoyaku_category is called category 114 times, rate 51, tier 37, offer 23 and tariff 18. A reader picks whichever word the page they landed on used, and none of the five is authoritative.

Worse, "category" is already taken by the buyer. A hall sells Catégorie 1 to Catégorie 4, and those are seat grades: yoyaku_grade. So a tier label reads "Plein tarif - Catégorie 1", where the first half is the audience and the second is the grade, and the word the code uses for the whole row is the word the public uses for one of its two axes. Nothing in the name says the row carries a price, which is what it is for.

What changes

  • yoyaku_category becomes yoyaku_tariff: the priced row, which names the grades it prices and carries a quota.
  • yoyaku_slot_category becomes yoyaku_slot_tariff: that row on one session.
  • yoyaku_category_group becomes yoyaku_tariff_class: the audience axis, "Plein tarif" and "Tarif jeune". French label "Groupe de tarifs".
  • yoyaku_grade does not change, and this is the point of the whole exercise: once "category" leaves the code, the word catégorie is free to mean in the interface exactly what a buyer already thinks it means.
  • "Offer" stays presentational, as it already is in yoyaku-slot-offer.html.twig, offer.css and OfferThemeHooks. An offer card renders one tariff for one slot, and the theme layer finally shares the entity's name.

Scope

Entity type ids, and therefore table names, entity keys, route names, permission and menu link ids, theme hook and template names, and JSON:API resource names. By identifier: yoyaku_category 119 occurrences, yoyaku_slot_category 121, yoyaku_category_group 5, the BookingCategory class name 128, plus 47 test classes calling installEntitySchema() on the old ids, 114 doc mentions and the whole French catalogue.

Pre-1.0, so no update hook and no compatibility shim: reinstall is the upgrade path, and the table renames ride it.

How to do it safely

Level 1 phpstan, which is what the CI job runs, does not report a call to a method that no longer exists. It reported none of the nine stale call sites in #3614328: Rename a tier's capacity to quota, because it is not a capacity and would report none here. Run it at level 2 as the finding tool, then the whole kernel suite with no filter: fixture arrays and values reached through untyped arrays are invisible to static analysis, and a create() with an unknown field throws, so the suite is what catches those.

Also worth doing in the same pass: docs/ should stop using rate and tier as loose synonyms, or the rename only reduces five names to four.

Issue fork yoyaku-3614378

Command icon 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

mably created an issue. See original summary.

mably’s picture

Issue summary: View changes

  • mably committed 3bbe766a on 1.x
    task: #3614378 Rename the category entities to tariff, because to a...
mably’s picture

Status: Active » Fixed

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

  • mably committed cc033b0d on 1.x
    follow-up: #3614378 Repair the wording the mechanical rename damaged, in...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.