Hi,

Recently there was a deprecation introduced in v31 in PHP 
<https://github.com/protocolbuffers/protobuf/commit/d82de8f147be07e7a10c5c395505f0a662a911f2>
 

The deprecation itself has been set to trigger an error with 
zend_error(E_USER_WARNING,
             "getLabel is deprecated. Use isRequired or isRepeated 
instead.\n");

However, in PHP there is a dedicated error level E_USER_DEPRECATED as 
documented here 
<https://www.php.net/manual/en/errorfunc.constants.php#constant.e-user-deprecated>
.

My question is, was it intended to use E_USER_WARNING instead of 
E_USER_DEPRECATED? If no, what would be best way to make sure we use the 
latter from now on in future code updates?

The main issue I faced was that warning was automatically converted to 
exception by my PHP error handling logic (symfony framework in this case), 
however deprecations are just logged and the app can continue.

Thanks,
Bartosz

-- 
You received this message because you are subscribed to the Google Groups 
"Protocol Buffers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion visit 
https://groups.google.com/d/msgid/protobuf/3bbc81ea-5453-4c0f-936e-7666157cc783n%40googlegroups.com.

Reply via email to