Skip to content

Pre-release 4.2.115 → 4.2.114 — task 4.5 (auth): swap illuminate/auth to ^13 - #87

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

agissept merged 1 commit into
masterfrom
pre-release/4.2.115

Conversation

@oonid

@oonid oonid commented Sep 30, 2026 •

Copy link
Copy Markdown

Task 4.5, auth — swap illuminate/auth to ^13

Stacks on #86. This is the auth part of SCC-2 (task 4.5). Mail went separately in 4.2.111 (#83), so only auth, exception, foundation and html stay in replace.

Changes

  • composer.json: requires illuminate/auth ^13 and removes it from replace. Its hard requirement illuminate/queue is already v13 (4.2.109).
  • Deleted: the fork's Auth tree (Guard, AuthManager, the database/Eloquent providers, GenericUser, Reminders and its three console commands) and tests/Auth/*. v13 ships all of them except Reminders.
  • Application::registerCoreContainerAliases():
    • aliases auth to Contracts\Auth\Factory and auth.driver to Contracts\Auth\Guard, mirroring v13's auth alias cluster;
    • drops the two auth.reminder* aliases along with Reminders.
  • ApplicationTrait::be(): now takes an Authenticatable and calls guard($driver), because v13's AuthManager has no driver().
  • New tests/Auth/AuthForkBridgeTest.php (3 tests): the contracts resolve to the fork's bindings, and be() sets the user on the default guard and on a named one.

Session and cookie state

  • v13 uses different names and formats:
    • the logged-in id is stored under login_{guard}_{sha1(SessionGuard)};
    • the remember-me cookie is remember_{guard}_{sha1(SessionGuard)}, and its value is id|token|hmac(password hash).
  • The fork used login_{md5(Guard)} and remember_{md5(Guard)}, with an id|token value.
  • Reading the fork's state is the app's job, as roadmap §8 describes. The app pair dicoding-dev/dicoding#5965 adds a dual-read guard, so the fork carries no auth glue.

Verification

  • Fork:
    • suite 272 green on PHPUnit 11.5.56: 320, minus the 51 deleted auth tests, plus the 3 new ones;
    • ratchet green, every pattern at baseline;
    • composer validate: only the existing voku/portable-ascii warning;
    • the real composer.json (with rector) resolves: illuminate/auth v13.34.0.
  • Downstream: the dicoding app pair dicoding-dev/dicoding#5965 (feature/platform/framework-4.2.115-rc1) ran with vendor installed exactly from its lock and the local SMTP sink on 127.0.0.1:1025:
    • Psalm (full project, no cache): no errors.
    • Unit suite: 8477 green.
    • Integration suite: all 2987 tests, with the same 5 failures as the 4.2.114 pair and 196 skipped. No test is flagged risky.
  • Checks ran in a cloud container without deck (PHP 8.4.26, MariaDB 10.11).

Rest of 4.5

There is no illuminate/foundation v13 package: Foundation ships only inside laravel/framework. So foundation and exception can't be swapped one package at a time. They leave in the final flip, when the app requires stock laravel/framework ^13 and the fork is dropped. That also needs html out first (task 3.1).

Tag

4.2.115 on 4e1e5b39 is not pushed; tag pushes are refused for this session.

🤖 Generated with Claude Code

https://claude.ai/code/session_0169SsatCE8LhaTsQTPiGtVo

@agissept
agissept added this pull request to stack #91 October 1, 2026 06:28
@agissept
agissept force-pushed the pre-release/4.2.115 branch 2 times, most recently from db13e57 to 4f1ff81 Compare October 1, 2026 10:33
Base automatically changed from pre-release/4.2.114 to master October 1, 2026 10:33
@agissept
agissept marked this pull request as ready for review October 1, 2026 10:40
- composer.json requires illuminate/auth ^13 and drops it from
  replace; the fork's Auth tree (Guard, AuthManager, providers,
  Reminders and their console commands) and its tests are deleted.
- Application aliases 'auth' to the v13 Auth Factory contract and
  'auth.driver' to the Guard contract; the Reminders aliases go with
  the Reminders component.
- ApplicationTrait::be() takes an Authenticatable and sets it on
  guard($driver): v13's AuthManager has no driver().

The session guard's state names change with it: v13 keeps the
logged-in id under login_{guard}_{sha1(class)} and the remember-me
cookie under remember_{guard}_{sha1(class)} as id|token|hmac. Reading
the fork's login_/remember_ state is the app's dual-read (roadmap §8).

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.115 branch from 4f1ff81 to 5d30de8 Compare October 1, 2026 10:40
@agissept
agissept merged commit 4f3bcba into master Oct 2, 2026
2 checks passed
@agissept
agissept deleted the pre-release/4.2.115 branch October 2, 2026 06:12
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