php-fig / container

MIT License
9.93k stars 52 forks source link

ContainerExceptionInterface is not throwable #21

Closed hultberg closed 3 years ago

hultberg commented 6 years ago

Hello. I have been following PR #20 and I see that the exception interfaces will extend Throwable in it, along with the breaking changes with type-hints. However, the static code analyser phpstan is now reporting that the exception interface is not a subtype of Throwable as its an error:

PHPDoc tag @throws with type Psr\Container\ContainerExceptionInterface is not subtype of Throwable

Is there a possibility to fix this outside of PR #20 ? I'm not familiar with any bylaws of FIG and what the possibilities are.

Jean85 commented 4 years ago

We've been discussing this kind of issues a lot lately, and we've condensed our proposed solution to updating PSR interfaces in a blog post. Please read it and provide your feedback!

https://www.php-fig.org/blog/2019/10/upgrading-psr-interfaces/

stof commented 3 years ago

@weierophinney should be closed as 2.0.0 fixes this (1.1.0 as well but reverted in 1.1.1 due to the BC break)