A follow-up audit of Orchestra's names against Drupal core, using the same method as #3618935: Name things the way Drupal core does: canceled, core's *Hooks suffix, summary() over explain(), delete() over forget(), action over act: every candidate word counted against a corpus of 24,173 identifiers taken from core's class, interface, trait, enum and method names.

The mechanical conventions that issue fixed have held: every interface ends Interface, every trait ends Trait, every production filename matches the type it declares, every class in an EventSubscriber directory ends Subscriber, every hook class carries core's Hooks, Alter or Requirements suffix, and all 53 hook methods are still named after the hook they implement. This issue covers what that pass did not reach.

A stylesheet the last rename orphaned

#3618935: Name things the way Drupal core does: canceled, core's *Hooks suffix, summary() over explain(), delete() over forget(), action over act renamed the stored state value cancelled to canceled, and the status tag builds its class from that value with Html::getClass(). The sweep covered .php, .yml, .twig and .js but not .css, so cards.css still matches three selectors that nothing emits any more: .orchestra-status-tag.orchestra-lifecycle--cancelled, .orchestra-status-tag.orchestra-task-state--cancelled and .orchestra-lifecycle--cancelled::before. A canceled instance and a canceled task therefore render with no status colour and no marker. The code emits orchestra-lifecycle--canceled and orchestra-task-state--canceled.

Methods should lead with a verb

Core leads roughly 90% of its method names with a verb. Orchestra sits between 64% and 71% of that rate, depending on how strictly a word is counted as a verb, so treat the ratio as approximate: no word list cleanly separates the two, and verbs core never leads with (fire, signal, resume, advance) make a strict detector understate us.

What is exact, curated by hand from the automated candidates, is 101 method names led by a noun.

  • 95 return a value and should be getX(), among them AssignmentInterface::candidates(), RecipientInterface::account(), DeadlineProviderInterface::deadlineFor(), completionScope(), delegatorAccounts() and chainId().
  • 15 of those return a render array and should be buildX(), which is core's word for it: commentFieldElement(), commentOutcomesElement(), completionScopeElement(), payloadVariableElement(), commentVariableElement(), commentDecisionForm(), outcomeButtons(), flowRow(), nodeRow(), statusColumn(), backLink(), landingPage(), flatForm(), extraForm() and pendingActionLinks().
  • 5 return a boolean and should read as a question: accountIsCandidate(), accountParticipates(), nodeHasIncoming(), nodeHasOutgoing() and nodeIsReferenced().
  • 1 returns void: LocalOrchestraClient::signalToken().

Deliberately left alone: the third-person predicates notifies(), parks(), rearms(), overlaps(), skipsLanding() and resetsEarlier(). Those already read as questions, and core does the same with applies().

The last two act identifiers

#3618935: Name things the way Drupal core does: canceled, core's *Hooks suffix, summary() over explain(), delete() over forget(), action over act renamed the act vocabulary to action but missed two views field plugin ids, orchestra_instance_act_link and orchestra_task_act_link, along with their views.field.* schema keys. Code and config agree today, so nothing is broken; they are simply the last two names in that family reading the old word.

Remaining tasks

No update path: the module is pre-1.0 and alpha releases are reinstall-only, so the renamed plugin ids change in place. Several of the renames land on @api interfaces, so yoyaku is checked as a consumer before this merges. The documentation and the French translations move in the same merge request.

AI-Generated: Yes (Claude Code ran this audit against a corpus built from Drupal core, drafted this issue summary, and wrote the renames on the merge request. I reviewed the work before posting it.)

Issue fork orchestra-3619047

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

Status: Active » Needs review

  • mably committed efe2b2e4 on 1.x
    task: #3619047 Name methods with a verb the way core does: getCandidates...
mably’s picture

Status: Needs review » 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.

Status: Fixed » Closed (fixed)

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