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

KDL 1.0 Compliance #22

Open
zkat opened this issue Sep 12, 2021 · 3 comments
Open

KDL 1.0 Compliance #22

zkat opened this issue Sep 12, 2021 · 3 comments

Comments

@zkat
Copy link
Member

zkat commented Sep 12, 2021

Hi! Since this was originally written, KDL has stabilized to 1.0.0. No further changes should be made to spec so it should be safe to update + finalize kdl-php to the 1.0 spec!

Please let me know if you have any questions or if there's anything I can do to help!

@shieldo
Copy link
Collaborator

shieldo commented Sep 13, 2021

Hey @zkat ! Thanks for this - I've already started taking a look at the recent additions to the spec to plan out what I need to change - also looked against other implementations for test cases.

One big recent change was the addition of types as a hint for values - I was debating how I should implement this and to what extent I should cast values according to the types (i.e. the Rust-based types like u8 and so on - and also some custom PHP ones float and int). I plan of course to expose the type hint verbatim if it exists, and perhaps to offer an accessor to a coerced value on the Value objects I'm likely to introduce - any opinions about how much an implementation should ideally do here?

@zkat
Copy link
Member Author

zkat commented Sep 13, 2021

Honestly if I were you I would just include the type hints in your deserialized types and just leave it at that for now? You can also just use them to hint about whether to convert to float or int, imo, and that's all

@shieldo
Copy link
Collaborator

shieldo commented Sep 13, 2021

Makes perfect sense! OK, that's how I'll handle it for now.

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