Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:119656 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 16233 invoked from network); 2 Mar 2023 17:53:02 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 2 Mar 2023 17:53:02 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id C1B3D1804D4 for ; Thu, 2 Mar 2023 09:53:01 -0800 (PST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,HTML_MESSAGE, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.2 X-Spam-ASN: AS15169 209.85.128.0/17 X-Spam-Virus: No X-Envelope-From: Received: from mail-wr1-f49.google.com (mail-wr1-f49.google.com [209.85.221.49]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Thu, 2 Mar 2023 09:53:01 -0800 (PST) Received: by mail-wr1-f49.google.com with SMTP id bw19so17328764wrb.13 for ; Thu, 02 Mar 2023 09:53:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :from:to:cc:subject:date:message-id:reply-to; bh=9Xf89Ss81Uno314N6Tm08pGxkwf/QuvvqZ2fbc1xYfk=; b=WjLrEXKUA05ff1629RKJE5YqyU1I4Xfxjy/cLRM+rZATt1IPTeNsSA6TQqvE3lnGS1 18hxcNlPCTRE8ZqItUjC/z6v/p59E0p7sTEPEB54iPVm2VPpx39C5yXhsbAhH3HU0t9i 3jBF9UQpBARmM8OKYe1PeBEdSb4yL2Vow29tTB0SKyxBVfaExmm04uWzUbZFYOg/cbPw qY+59Fsw94kSUTnPPEr8EYN8IspLBfcWcjVKRFgdMPg57M2Rl/H9oKDtRTz46fxRpQwT biUALdPCRuG7dRQQdrGrF2ML+zN2IvgqU2eIY5caJvGdnuNZy9fia3fk/yWRvUit446k aZKg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=9Xf89Ss81Uno314N6Tm08pGxkwf/QuvvqZ2fbc1xYfk=; b=TDQzUyMY28zPH5VxC0Q9mdI+7C5Wmq/tqQ9M9BIgmg/nYlXEkwvcszez0eCMEjZFTt 4dfuzT4rg5F75jxJiBDNBd+sqkpvYhMVeBlL/UxYi7yP3qMbEdZQMYKX9zqDe6FhoqY8 8NdkKx58yCRU4CpIc6iQyWU0+oLPpgUHm0vD+Fu0SHERI7a6ZLUh7Fobw8nYyWBsTajl qXpXBMcbNwgHuR2o8eTqOrnhoWWn74qQh2JLeG1oeg0CgVhXtCsKKoDRWJlpsLaD1sdS 4HaX2t6K3s9eb4mgQWYZz+nQlYodp0wHxiZRVsZlkpDemmXhT9+plIqEWK5WiPaJQCmv nBcA== X-Gm-Message-State: AO0yUKWJNghPzgKqfkNm+4qT8OaCeff+NDX3z7F7lOVSfHSpgiIt1NI0 8BdtyGhoNSh4c7sL7VbRDrLBXtUXWZ53wMixsMKD5jOc X-Google-Smtp-Source: AK7set8R/M8p03a1DWLXzXe/XS/iFLr5flWp0rBlqxpMiQHzlGMHbzlk1qkD9yvtJsYDC08rfuYkBjBpysiWEqVEpW0= X-Received: by 2002:a5d:6b86:0:b0:2c7:195c:5b13 with SMTP id n6-20020a5d6b86000000b002c7195c5b13mr1895239wrx.0.1677779579638; Thu, 02 Mar 2023 09:52:59 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: Date: Thu, 2 Mar 2023 17:52:47 +0000 Message-ID: To: PHP Internals List Content-Type: multipart/alternative; boundary="000000000000db169005f5ee7f9f" Subject: Re: [PHP-DEV] RFC Idea - json_validate() validate schema From: rowan.collins@gmail.com (Rowan Tommins) --000000000000db169005f5ee7f9f Content-Type: text/plain; charset="UTF-8" On Thu, 2 Mar 2023 at 12:34, Jakub Zelenka 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] --000000000000db169005f5ee7f9f--