Am 28.11.2017 um 16:44 schrieb Niklas Keller <m...@kelunik.com>:
> 2017-11-28 15:27 GMT+01:00 Christian Schneider <cschn...@cschneid.com>:
>> Would you still consider an exception a good idea if the minimum value for 
>> one of the function parameters is increased in a later version of libsodium? 
>> Personally I'd prefer E_ERROR/E_WARNING.
> 
> I definitely want an exception there instead of an error. For a minimum 
> _recommendation_ a warning would be fine, but why do you prefer an E_ERROR 
> over an exception?

My bad. I was under the (false) assumption that PHP 7.2.0 generates an E_ERROR 
(and that an E_ERROR would continue executing the program) due to the diff 
        
http://git.php.net/?p=php-src.git;a=commitdiff;h=c05cbd1e775fa69ed9939796a908390f2bfb4459
but 7.2.0RC6 generates an E_WARNING.

So forget what I said about E_ERROR.
The real question remains: Is it considered a recommendation or a requirement? 
The libsodium documentation says it is a requirement but the PECL/PHP7.2.0 
treated it as a recommendation.

If we want to value BC then it should be kept a recommendation (i.e. E_WARNING) 
for future release but if we switch to the (libsodium-suggested) interpretation 
of treating it as a requirement then I agree that it'd be better to do this in 
7.2.0 when libsodium is introduced into PHP core.

So you convinced me that we should convert it but in that case I'd do it for 
7.2.0 even though we are in the final RC.

- Chris


--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to