Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mixed types should not allowed for loglevel #2

Open
dktapps opened this issue Jan 10, 2020 · 3 comments
Open

mixed types should not allowed for loglevel #2

dktapps opened this issue Jan 10, 2020 · 3 comments

Comments

@dktapps
Copy link
Member

dktapps commented Jan 10, 2020

log levels should always be one of the LogLevel constants, which are currently strings. Accepting mixed for log levels is potentially concealing bugs.

@JackNoordhuis
Copy link

it'd be nice if we could restrict the values to an enum type in 4.0 instead of allowing any old string

@dktapps
Copy link
Member Author

dktapps commented Jan 11, 2020

yeah, that thought already crossed my mind, but it depends on a few core things that will need extraction first.

@dktapps dktapps transferred this issue from pmmp/SPL Jan 31, 2020
@dktapps
Copy link
Member Author

dktapps commented Feb 28, 2024

We can use native enums for this in PHP 8.1+. Nonetheless, this will still be BC-breaking.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants