framework icon indicating copy to clipboard operation
framework copied to clipboard

[11.x] fix: allows injection using multiple interfaces with the same concrete implementation

Open jamiethorpe opened this issue 1 year ago • 3 comments

Fixes issue 53110

This allows multiple interfaces to be injected when they use the same concrete implementation. This change also prevents injecting the same interface twice, but I'm not sure if that's necessary.

jamiethorpe avatar Oct 23 '24 03:10 jamiethorpe

Whoops, missed some failing tests. I'll get these fixed up.

jamiethorpe avatar Oct 23 '24 12:10 jamiethorpe

Seems like we would want a test for this new behavior I think.

taylorotwell avatar Nov 11 '24 21:11 taylorotwell

Should be good now. I wasn't 100% sure if the test fit into any of the existing test files, so I added a new one.

jamiethorpe avatar Nov 14 '24 11:11 jamiethorpe

Sorry for delay - thanks. 👍

taylorotwell avatar Dec 14 '24 22:12 taylorotwell

This caused an issue with route model binding. See: https://github.com/laravel/framework/issues/53952

@jamiethorpe since you authored this PR, maybe you could give some insight? It would be appreciated! 🙏

jasonvarga avatar Dec 17 '24 22:12 jasonvarga

Reverting for now.

taylorotwell avatar Dec 17 '24 22:12 taylorotwell

Thank you

jasonvarga avatar Dec 17 '24 22:12 jasonvarga

@jasonvarga This looks like an oversight on my part. I probably won't get to it until after the holidays, but I'll take another stab at it and and tests to make sure the refactor doesn't break the same functionality. Thanks for finding that 😬

jamiethorpe avatar Dec 20 '24 22:12 jamiethorpe