Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down
4 changes: 0 additions & 4 deletions src/Illuminate/Foundation/Application.php
Original file line number Diff line number Diff line change
Expand Up @@ -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).
Expand Down
5 changes: 1 addition & 4 deletions tests/Foundation/FoundationApplicationTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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'));
}


Expand Down
Loading