refactor(procest): $termijnService -> $deadlineService - #809
Open
rubenvdlinde wants to merge 1 commit into
Open
Conversation
Renames the injected dependency's property/parameter name across 15 files, so it matches the DeadlineService type it has held since #808. Includes DeadlineController's shorter `$termijn`, which is the same dependency under a different name. Stacked on feat/english-vocabulary-deadline-core (#808). Merge order: 797 -> 803 -> 804 -> 806 -> 807 -> 808 -> this. THE MISTAKE THIS COMMIT MADE FIRST, BECAUSE IT GENERALISES. Renaming a promoted constructor property needs TWO patterns, not one: $termijnService the parameter / promoted declaration $this->termijnService every access A search for `$termijnService` finds only the first. In a property access the `$` sigil belongs to `$this`, not to the member name, so `->termijnService` is a different token and does not match. The first pass renamed all 15 declarations and none of the 47 accesses, leaving every class calling a property that no longer existed. That is not a subtle failure — phpunit went from 1777 passing to 20 errors and 3 failures immediately — but it is only loud because a suite covers this code. The same edit in a thinly-tested file would have produced a property-access error on a path nobody runs. The residual grep at the end of this commit therefore matches the bare word `termijnService`, with no sigil, so it cannot miss either spelling. WHAT WAS DELIBERATELY LEFT. Two bare `$termijn` variables remain and are NOT this dependency: - SubsidieController: an int of weeks, from $body['termijnWeken']. - BeschikkingService: the array returned by $this->bezwaarScheduler->computeTermijn(). Both are "termijn" as a PERIOD, a different concept from the service, and renaming them belongs with computeTermijn()/termijnWeken rather than here. They were read before being skipped, not assumed. VERIFIED - php -l clean on all 15 files. - phpunit, whole unit suite: 1777 tests, 6160 assertions, 5 skipped — green, and identical to the pre-change baseline on both counts. - Every touched lib/ file is phpcs CLEAN. - Residual grep for `termijnService` (unsigilled) across lib/ and tests/: none.
rubenvdlinde
requested review from
WilcoLouwerse,
bbrands02 and
rjzondervan
as code owners
August 11, 2026 21:19
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Renames the injected dependency's property/parameter name across 15 files, so it matches the
DeadlineServicetype it has held since #808. IncludesDeadlineController's shorter$termijn, which is the same dependency under a different name.Stacked on #808. Merge order: #797 → #803 → #804 → #806 → #807 → #808 → this.
The mistake this commit made first, because it generalises
Renaming a promoted constructor property needs two patterns, not one:
A search for
$termijnServicefinds only the first. In a property access the$sigil belongs to$this, not to the member name — so->termijnServiceis a different token and doesn't match.The first pass renamed all 15 declarations and none of the 47 accesses, leaving every class calling a property that no longer existed.
That isn't a subtle failure — phpunit went from 1777 passing to 20 errors and 3 failures immediately. But it's only loud because a suite covers this code. The same edit in a thinly-tested file would have produced a property-access error on a path nobody runs.
The residual grep at the end of this commit therefore matches the bare word
termijnService, with no sigil, so it cannot miss either spelling.What was deliberately left
Two bare
$termijnvariables remain and are not this dependency:SubsidieControllerintof weeks, from$body['termijnWeken']BeschikkingService$this->bezwaarScheduler->computeTermijn()Both are "termijn" as a period — a different concept from the service. Renaming them belongs with
computeTermijn()/termijnWeken, not here. They were read before being skipped, not assumed.Verification
php -lclean on all 15 fileslib/file is phpcs CLEANtermijnService(unsigilled) acrosslib/andtests/— none