Thank you for raising this; this appears to be an oversight which I can correct.
The change will go naturally with the PHP 4.32.0 release (=Q3); TBD if we decide to backport it for a PHP 4.31.1 point release if we do one. On Mon, May 19, 2025 at 6:25 AM Bartosz Tomczak <[email protected]> wrote: > 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 > <https://groups.google.com/d/msgid/protobuf/3bbc81ea-5453-4c0f-936e-7666157cc783n%40googlegroups.com?utm_medium=email&utm_source=footer> > . > -- 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/CAKRmVH9_DZOFg_LdDNoH5kqVDaQPEOddd%3DiuLs7i4-aE03323g%40mail.gmail.com.
