The main issue is that these are not equivalent because enums do not cast to string..

https://3v4l.org/TMoYI#v8.4.12

You'd have to use LogLevel::DEBUG->value to be equivalent. I had to do the same when migrating to enum for Monolog v3.

IMO this is not worth the breakage it'd cause.

Best,
Jordi

On 25.08.2025 10:13, Junaid Farooq wrote:
Hello PHP-FIG Community,

I'd like to propose a modernization enhancement to PSR-3 (Logger Interface) that would convert the current LogLevel class with string constants to a PHP 8.1+ backed enum while maintaining backward compatibility.

I have attached an md file to this email that mentions all the details of the RFC.

I believe this change represents a natural evolution that enhances PSR-3 without compromising the stability and wide adoption that makes it such a successful standard.

Thank you for your time and consideration. I look forward to the discussion.

Best regards,
Junaid Farooq --
You received this message because you are subscribed to the Google Groups "PHP Framework Interoperability Group" 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/php-fig/88b6a5e1-aab5-4d4a-bb40-c9f199812665n%40googlegroups.com <https://groups.google.com/d/msgid/php-fig/88b6a5e1-aab5-4d4a-bb40-c9f199812665n%40googlegroups.com?utm_medium=email&utm_source=footer>.

--
Jordi Boggiano
@seldaek -https://seld.be

--
You received this message because you are subscribed to the Google Groups "PHP 
Framework Interoperability Group" 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/php-fig/86e40507-349d-4abb-a84c-1a15bca29794%40seld.be.
  • RFC: Convert PSR... Junaid Farooq
    • Re: RFC: Co... 'Jordi Boggiano' via PHP Framework Interoperability Group

Reply via email to