Good question. In our work, we always make standards compatible with PHP ^5.3. When it comes to things like exceptions, however, this is another thing, because `Throwable` doesn't exist before PHP 7. For that case, in order to formalize an interface of an exception, we have `ThrowableInterface`, which mimics the original, but can be used with PHP 5. This works for some purposes, but of course the biggest problem with it is that you can't throw it, like you can throw `Throwable` implementations. On the other hand, it's impossible to directly implement that interface either.
I work a lot with PHP 5, because many of our projects target PHP 5.4 - WordPress is quite the dinosaur. I would say this: Support PHP 5 where it is simple to do so; for other cases, do not support PHP 5. On Saturday, October 21, 2017 at 10:19:20 PM UTC+2, Tobias Nyholm wrote: > > Hey. > > While reviewing PSR-18 I found a suggestion to make our base exception to > implement \Throwable. So, should new PSRs support PHP 7 only or do we still > need PHP 5 support? > > Like someone said, "PHP5 is dying, just kill it already". I like to agree > with that. But at the same time, I do not what the guzzle/buzz community to > choose between implementing this PSR or supporting PHP5. > > I would like the core committee to give me (and other authors of new PSRs) > a unified recommendation: Should new PSRs support PHP5 or not? > > // Tobias Nyholm > -- You received this message because you are subscribed to the Google Groups "PHP Framework Interoperability Group" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/php-fig/71b0463e-d355-454e-8141-f514fcb15394%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
