Closed boughtonp closed 11 years ago
I agree, it should be a configuration option. Also an optional argument to the include method. The default will not be changing though. Will get this in asap.
Done the code, now to update the docs... I'll bundle this with the next release.
This is in the develop branch ready for imminent release with 0.7.0. The updated docs can be seen here:
http://dominicwatson.github.io/cfstatic/full-guide.html#useage
I believe that keeping the default of "false", no errors thrown, is the right choice because:
Closing.
Cool, thanks for the quick turnaround. :)
I disagree with your rational on the default though - a missing include can means an ugly or broken page, and might go unreported - whereas a proper error can get caught, logged, and notifications sent, so it gets noticed and fixed sooner.
I hear you, but still don't entirely agree - given that two people disagree I'm not sure its worth breaking backward compatibility (I'd personally need to reconfigure all sites that are using it). The config option should keep everyone happy enough :)
This is noted as deliberate functionality in the usage guide - "If you attempt to include a package or file that does not exist, CfStatic will not throw an error." - but it is neither helpful nor expected behaviour.
There should be a configuration option for whether an error is thrown (and in the next major version, ideally throwing an error should become the default).