The concept of “friendly exception” is that one can implement FriendlyExceptionInterface and provide a possible solution to the problem exception represents. Error handler may display it along with usual exception information.
Initially it was part of yii-web package that already has an error handler capable of displaying it but thinking about it for a few days I realized that it’s both useful for console applications and usage outside of Yii.
Thus, I’ve extracted a really small package with an interface only:
I’m not sure if creating direct relation between namespace and package name is a good idea (small change in namespace would require creating another package, and sometimes it will force creating longer namespaces or unnatural package names). But I’m definitely sure that ignoring words separators is a bad idea. Both Yiisoft\FooBar\Baz and Yiisoft\Foo\BarBaz should result foo-bar-baz as package name. Although theoretically this may create some conflicts, I doubt it will be a real problem.