URL-Parser
URL-Parser copied to clipboard
Do you want to be notified when the parser encounters a validation error?
Basically, there are 3 questions here:
- Do you want to be notified when the parser encounters a validation error?
- Should there be a way to enable and disable validation error reporting?
- What would be the best way to convey the error information?
There are roughly 60 different places in the parser that currently call for a validation error to be reported. As far as I can tell, I have 3 options for reporting the error. I can use error_log(), trigger_error(), or I can push each error onto an array that can then be retrieved through a method added to the URL class. I am, of course, open to other ideas.
@TRowbotham Why not use some a PSR-3 logging implementation ? That way any user can easily format or aggregate error logging from his/her app in a simple and standardize way 🤔
Also kudos for your URL parser I always wanted to tackle WHATWG URL parsing algorithm and you seem to have done it quite right 👍
I'm glad you find it useful.
I agree, a PSR-3 implementation would be best.
Validation error logging was added in the 4.0 release