On 25 March 2015 at 14:32, Rowan Collins <rowan.coll...@gmail.com> wrote:
> Chris Wright wrote on 25/03/2015 13:44: > >> That said, in the interests of not causing people using this functionality >> issues with logs full of errors and/or error-related performance issues, I >> would support having this deprecation set up in such a way that an error >> is >> only issued at most once per request - there's no need to issue a >> deprecation warning at every function call. >> > > I guess the advantage of doing it on each function call is that you see > which areas of code are relying on the feature, rather than just that it's > enabled. > Indeed, valid point Maybe we need a smarter way of signalling deprecation in general, because > it's very all-or-nothing at the moment. But that could possibly be > implemented as a userland error handler which de-duped errors before > outputting them. In this specific case we could modify the behaviour of the value of the ini setting to make this configurable. As it stands, the value is treated as a bit mask with three bits that have meaning, we could make the fourth bit mean "issue an error on every function call" when set, if it's clear then issue a warning only once during rinit when the value is non-zero. I realise this is a slightly horrible solution, just throwing it out there as a possibility. I'd argue that it's not really any *more* horrible than the feature in general, though. > > > Regards, > -- > Rowan Collins > [IMSoP] > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > >