Closed thomasvargiu closed 5 years ago
Mm, no, we shouldn't be using nullables here. We should be setting reasonable type-safe defaults instead. Can you revise?
Resolves #22
I used nullable for backward compatibility with thre previous version. If we use a type everywhere it's a BC break so we should release a new major version.
Furthermore, to use types everywhere we should assign a default value to every property (it's not a problem, we can do it).
Probably we can consider the 3.0.0 version as a bugged one, so we can release this kind of changes in a 3.0.1 version.
What do you think?
3.0.1, with strict typing enabled and defaults added. No nullables. Let's do.
Done
Compete review needed.
I created another exception for json encoding exceptions. To centralize json exception messages I create an abstract exception.
Sorry about all the back and forth on this issue, but I'm actually really digging the improvements in error handling here. Thank you for digging in so much on this!
(Dare I ask what you're using this library for?)
Also, I think the changes here are significant enough that they warrant a 3.1 release, not a 3.0.1, whenever the next tag is.
Sorry about all the back and forth on this issue, but I'm actually really digging the improvements in error handling here. Thank you for digging in so much on this!
(Dare I ask what you're using this library for?)
It's not a problem, it's better to find out the best thing to do.
I'm updating a project, and a my ex collegue use it for APIs with zend-expressive. Before to update it using zendframework/zend-problem-details
I prefer to refactor it still using this library to avoid big changes.
Also, I think the changes here are significant enough that they warrant a 3.1 release, not a 3.0.1, whenever the next tag is.
Yes, I agree.
Finally responded to the last open question here. Sorry for the holiday delay. :smile: Still planning to finish this up?
This PR fix type hint issues and enables strict types