Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@martinssipenko
Copy link
Contributor

@martinssipenko martinssipenko commented Apr 20, 2021

I've fixed the issue described in #772 in the most intrusive way I was able to find.

Another approach would be to catch InvalidDefinition in Container and rethrow DependencyException by wrapping the previous exception, however, this would break the backward compatibility of Container because it would throw an exception of different implementation (if users of Container class catch InvalidDefinition and we change the exception type we throw new exception type would bot be caught).

Fixes #772

@martinssipenko martinssipenko marked this pull request as ready for review April 20, 2021 10:22
@mnapoli
Copy link
Member

mnapoli commented Apr 20, 2021

Hey, that looks very good, thank you for all the summary and coming up with a simple fix!

@mnapoli mnapoli merged commit 12a15cc into PHP-DI:master Apr 20, 2021
@martinssipenko martinssipenko deleted the psr-exceptions branch April 20, 2021 12:24
@martinssipenko
Copy link
Contributor Author

I'd very much appreciate a release with this fix :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

PSR-11 exception interfaces

2 participants