Skip to content

Conversation

@BernieSumption
Copy link
Contributor

When resolving contextual bindings, the container does a reverse lookup on aliases: it checks to see if there is a contextual binding on an alias of the interface it needs an instance of. $container->abstractAliases is a reverse mapping of interfaces to their aliases that supports this lookup. Because $container->alias() does not remove old entries from abstractAliases, the container ends up checking whether there ever has been an alias to the current interface, not whether there currently is such an alias.

This PR adds a test for the correct behaviour and a fix that makes the test pass.

There are some unrelated failing tests.

@taylorotwell taylorotwell merged commit 2f073ec into laravel:12.x Aug 3, 2025
62 checks passed
macropay-solutions pushed a commit to macropay-solutions/maravel-framework that referenced this pull request Aug 4, 2025
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.

2 participants