Skip to content

Pre-release 4.2.113 → 4.2.112 — task 2.17 step 2: remove the L4.2 response assertions - #85

Merged
agissept merged 1 commit into
masterfrom
pre-release/4.2.113
Oct 1, 2026
Merged

agissept merged 1 commit into
masterfrom
pre-release/4.2.113

Conversation

@oonid

@oonid oonid commented Sep 30, 2026 •

Copy link
Copy Markdown

Task 2.17, step 2 — remove the L4.2 response assertions

Stacks on #84. Deletes Illuminate\Foundation\Testing\AssertionsTrait and its use in the fork's TestCase. The trait held:

  • assertResponseOk, assertResponseStatus;
  • assertRedirectedTo, assertRedirectedToRoute, assertRedirectedToAction;
  • assertViewHas, assertViewHasAll, assertViewMissing;
  • assertSessionHas, assertSessionHasAll, assertSessionHasErrors;
  • assertHasOldInput.

Why now:

  • They read $this->client->getResponse(), and each has a v13 equivalent on the TestResponse that call() returns since 4.2.112.
  • The dicoding app pair dicoding-dev/dicoding#5958 keeps the legacy $this->assertX() idiom through an app-side shim in LaravelTestHelper (thin wrappers over the same TestResponse), so the fork no longer needs to provide the trait.
  • v13's Foundation TestCase has no such methods either, so the foundation flip (4.5) no longer has to carry them.

A fork-side leftover caller now fails with a missing-method error instead of asserting silently — the enforcement 2.17 asks for. (App tests keep calling these names; they resolve to the app's own shim, not this trait.)

Tests

FoundationTestingResponseTest drops its legacy-assertion case; the other 5 stay.

Verification

  • Fork: suite 320 green; ratchet green; no fork import points at a deleted class.
  • Downstream: the app pair dicoding-dev/dicoding#5958 shims these methods app-side; no app call resolves to this deleted trait. App-side verification (unit suite + one targeted integration test per shimmed method) lives in that PR.
  • Checks ran in a cloud container without deck (PHP 8.4.26, MariaDB 10.11, deck's Asia/Jakarta timezone and max_connections).

Rest of 2.17

PHPUnit 11 for the fork's suite and the app, in the next pair.

Tag

4.2.113 on 99d1b744 is not pushed; tag pushes are refused for this session.

🤖 Generated with Claude Code

https://claude.ai/code/session_0169SsatCE8LhaTsQTPiGtVo

Delete Foundation\Testing\AssertionsTrait (assertResponseOk,
assertResponseStatus, assertRedirectedTo/ToRoute/ToAction,
assertViewHas/HasAll/Missing, assertSessionHas/HasAll/HasErrors,
assertHasOldInput). They read $this->client->getResponse() and have
v13 equivalents on the TestResponse that call() returns since 4.2.112;
the dicoding app no longer calls them. v13's Foundation TestCase has no
such methods either, so this removes an API that the foundation flip
(4.5) would otherwise have to carry.

Callers now fail with a missing-method error instead of passing
silently.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0169SsatCE8LhaTsQTPiGtVo
@agissept
agissept force-pushed the pre-release/4.2.113 branch from ff0db95 to 5e2dd01 Compare October 1, 2026 08:41
Base automatically changed from pre-release/4.2.112 to master October 1, 2026 10:32
@agissept
agissept merged commit 51fbc6f into master Oct 1, 2026
2 checks passed
@agissept
agissept deleted the pre-release/4.2.113 branch October 1, 2026 10:33
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.

3 participants