Open troelskn opened 4 years ago
Hi @troelskn sorry for the delay here! Transparently converting here seems reasonable, however I'd like to bundle this with a clear error for when the value cannot be escaped, if you're like to throw up a PR for that then I would be happy to take a look, if not I'll tackle this myself when I get a moment
Since strict typing was added, I get this error in my application:
The problem is that I have added non-strings (null, integers) as values to segments as I build them up. While I could change the code on my end to coerce into string, I don't think it would be unreasonable for the library to do this transparently, as it used to. I suggest changing
Serializer::escape
as follows:Would you like me to open a PR for this?