From d5b29f939d3040e66a36bc906e56af7fb015957c Mon Sep 17 00:00:00 2001 From: agis Date: Fri, 25 Sep 2026 22:49:05 +0700 Subject: [PATCH] feat(hashing): swap illuminate/hashing to ^13 (task 4.3) 'done'-class no-op port: both L4.2 and v13 sit on native password_* with PASSWORD_BCRYPT, so stored hashes stay verifiable across the flip (default cost 10 -> 12; existing cost-10 hashes still verify, no lockout). v13 'hash' binds a HashManager (multi-driver) and ships Contracts\Hashing\Hasher; v13 Hashing\* shadows the fork tree via the PSR-4 seed mechanism. - composer: illuminate/hashing self.version -> ^13 (v13.33.0). - Foundation\Application: drop the now-dead legacy alias 'hash' -> Illuminate\Hashing\ HasherInterface (task 2.11 BC bridge; the fork interface is irrelevant once hashing is v13, zero consumers). Contract alias 'hash' -> Contracts\Hashing\Hasher kept. - FoundationApplicationTest: retarget the alias test to the contract only (drop the legacy HasherInterface assertion). Fork suite 527 green; make/check roundtrip + legacy cost-10 verify confirmed. Co-Authored-By: Claude Opus 4.8 (1M context) --- composer.json | 2 +- src/Illuminate/Foundation/Application.php | 4 ---- tests/Foundation/FoundationApplicationTest.php | 5 +---- 3 files changed, 2 insertions(+), 9 deletions(-) diff --git a/composer.json b/composer.json index 126b8864..81ce0825 100755 --- a/composer.json +++ b/composer.json @@ -26,6 +26,7 @@ "illuminate/encryption": "^13", "illuminate/events": "^13", "illuminate/filesystem": "^13", + "illuminate/hashing": "^13", "illuminate/http": "^13", "illuminate/log": "^13", "illuminate/macroable": "^13", @@ -64,7 +65,6 @@ "illuminate/auth": "self.version", "illuminate/exception": "self.version", "illuminate/foundation": "self.version", - "illuminate/hashing": "self.version", "illuminate/html": "self.version", "illuminate/mail": "self.version", "illuminate/queue": "self.version", diff --git a/src/Illuminate/Foundation/Application.php b/src/Illuminate/Foundation/Application.php index 6fbc787f..679be32d 100755 --- a/src/Illuminate/Foundation/Application.php +++ b/src/Illuminate/Foundation/Application.php @@ -1299,10 +1299,6 @@ public function registerCoreContainerAliases() $this->alias('encrypter', 'Illuminate\Contracts\Encryption\Encrypter'); $this->alias('encrypter', 'Illuminate\Contracts\Encryption\StringEncrypter'); - // BC: Hashing\HasherInterface → Contracts\Hashing\Hasher (task 2.11); keep old name resolvable. - // class_alias covers use/typehint/instanceof; make()/autowiring by the old name needs this. - $this->alias('hash', 'Illuminate\Hashing\HasherInterface'); - // L13 SCC-1 swap (task 4.1): the swapped components ship v13 contracts. Alias them to // the core bindings so v13 code that type-hints the contracts resolves (the v13 // providers don't always register these against the fork's core aliases). diff --git a/tests/Foundation/FoundationApplicationTest.php b/tests/Foundation/FoundationApplicationTest.php index 107d9382..b5fee1bd 100755 --- a/tests/Foundation/FoundationApplicationTest.php +++ b/tests/Foundation/FoundationApplicationTest.php @@ -30,16 +30,13 @@ public function testSetLocaleSetsLocaleAndFiresLocaleChangedEvent() } - public function testCoreAliasResolvesHashByBothContractAndLegacyName() + public function testCoreAliasResolvesHashByContract() { $app = new Application; $app->registerCoreContainerAliases(); $app->singleton('hash', function() { return new Illuminate\Hashing\BcryptHasher; }); $this->assertInstanceOf(Illuminate\Contracts\Hashing\Hasher::class, $app->make(Illuminate\Contracts\Hashing\Hasher::class)); - // BC: the pre-migration interface name must still resolve via make()/autowiring; - // class_alias only covers use/typehint/instanceof, not container resolution (task 2.11). - $this->assertInstanceOf(Illuminate\Contracts\Hashing\Hasher::class, $app->make('Illuminate\Hashing\HasherInterface')); }