Skip to content

refactor(procest): Ingebrekestelling{Service,Controller} -> NoticeOfDefault* - #810

Open
rubenvdlinde wants to merge 1 commit into
feat/english-vocabulary-deadline-paramsfrom
feat/english-vocabulary-notice-of-default
Open

refactor(procest): Ingebrekestelling{Service,Controller} -> NoticeOfDefault*#810
rubenvdlinde wants to merge 1 commit into
feat/english-vocabulary-deadline-paramsfrom
feat/english-vocabulary-notice-of-default

Conversation

@rubenvdlinde

Copy link
Copy Markdown
Contributor

What

before after
IngebrekestellingService NoticeOfDefaultService
IngebrekestellingController NoticeOfDefaultController
$ingebrekestellingId $noticeOfDefaultId

plus the two route names addressing the controller. Six files.

Stacked on #809. Merge order: #797#803#804#806#807#808#809 → this.

What stays Dutch, and why it isn't an oversight

Three things here are the data contract, not identifiers. Each would break silently if renamed without a register change and a migration:

  • 'relevantIngbrekes' — a TermijnInstance property. Note the existing typo in the schema; it's reproduced exactly, because it is the column name. This is the one-dwangsom guard: if the read returns null the guard stops firing and a second DwangsomBerekening is spawned per notice. That's a money bug.
  • 'ingebrekestelling' — a DwangsomBerekening property.
  • /api/termijn/ingebrekestellingen — the published URLs. Route names follow the renamed controller; the URLs deliberately do not.

The controller's public methods were already English (register, show), so no method rename was needed. registerIngebrekestelling() on the service is left for the slice that renames the domain noun itself.

Applied the #809 lesson

#809 renamed a promoted constructor property by searching $name and missed all 47 $this->name accesses — the sigil belongs to $this, not the member.

Here the property-access spelling was checked before editing (this->ingebrekestelling — none present), and the residual grep matches the bare word, not the sigilled form.

Verification

  • php -l clean on all six files; the Postman collection still parses
  • phpunit, whole unit suite: 1777 tests, 6160 assertions, 5 skipped — green, identical to baseline
  • basename == class across lib/ and tests/ for all three renamed files
  • Route resolution: both noticeOfDefault#<action> names resolve to real public methods; control confirms the old class name is gone
  • Every touched lib/ file is phpcs CLEAN
  • Residual grep (bare word) over lib/, tests/, appinfo/, src/ — none

…efault*

  IngebrekestellingService    -> NoticeOfDefaultService
  IngebrekestellingController -> NoticeOfDefaultController
  $ingebrekestellingId        -> $noticeOfDefaultId

plus the two route names addressing the controller. Six files.

Stacked on feat/english-vocabulary-deadline-params (#809). Merge order:
797 -> 803 -> 804 -> 806 -> 807 -> 808 -> 809 -> this.

WHAT STAYS DUTCH, AND WHY IT IS NOT AN OVERSIGHT. Three things in these files
are the data contract rather than identifiers, and each would break silently if
renamed without a register change and a migration:

  - 'relevantIngbrekes' — a TermijnInstance property (note the existing typo in
    the schema; it is reproduced exactly because it is the column name). This is
    the one-dwangsom guard: if the read returns null the guard stops firing and
    a SECOND DwangsomBerekening is spawned per notice, which is a money bug.
  - 'ingebrekestelling' — a DwangsomBerekening property.
  - The /api/termijn/ingebrekestellingen URLs — the published contract. Route
    NAMES follow the renamed controller; the URLs deliberately do not.

The public method names were already English (register, show), so no method
rename was needed; registerIngebrekestelling() on the service is left for the
slice that renames the domain noun itself.

APPLIED THE #809 LESSON. That commit renamed a promoted constructor property by
searching `$name` and missed all 47 `$this->name` accesses, because the sigil
belongs to $this rather than to the member. Here the property-access spelling
was checked explicitly BEFORE editing (`this->ingebrekestelling` — none) and the
residual grep at the end matches the bare word, not the sigilled form.

VERIFIED
  - php -l clean on all six files; the Postman collection still parses.
  - phpunit, whole unit suite: 1777 tests, 6160 assertions, 5 skipped — green,
    identical to baseline.
  - basename == class across lib/ AND tests/ for all three renamed files.
  - Route resolution: both noticeOfDefault#<action> names resolve to real public
    methods; control confirms the old class name is gone.
  - Every touched lib/ file is phpcs CLEAN.
  - Residual grep (bare word) over lib/, tests/, appinfo/ and src/: none.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant