Limenius / ReactRenderer

Client and Server-side React rendering from PHP
MIT License
238 stars 37 forks source link

Fail loud should apply consistently #31

Open rakelley opened 5 years ago

rakelley commented 5 years ago

As we understand it, the intent behind fail_loud is to allow graceful degradation to client-side-only rendering in production if SSR fails. The current implementation currently only supports this for errors returned by the JS rendering implementation, rather than generated by the PHP renderer itself. This PR changes fail_loud: false to universally prevent SSR-originating errors from preventing page rendering. If this is not a desired change, an alternative would be to add a separate option to control this behavior.

This change required bumping the minimum PHP version to permit \Throwable, I hope this is acceptable as at this point such versions are long past EOL.

rakelley commented 5 years ago

I fixed the test and config to pass CI on 7.1 - 7.3, it doesn't appear the 8.0 nightly is a compatible target and should likely be dropped.