On Thu, 2 Mar 2023 at 12:34, Jakub Zelenka <bu...@php.net> wrote:

> It's possible that we might decide to stop supporting some drafts if the
> maintenance burden is too big and usage small but I wouldn't see that as
> something that happens often. But essentially you are right that there will
> be minimum (draft-04 initially) and maximum (latest implemented draft).
>


Thinking about this, particularly if there is the ability to install a PECL
extension which supports different versions from the core PHP version,
perhaps it would be useful to expose a function or constant that lists the
supported versions, so that code needing a particular version could check
for support directly, rather than having to attempt and catch an exception?

I guess in Larry's suggestion, that use case would be filled by
class_exists('JsonSchema_2026_10")

Regards,
-- 
Rowan Tommins
[IMSoP]

Reply via email to