Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:117480 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 99068 invoked from network); 6 Apr 2022 10:06:12 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 6 Apr 2022 10:06:12 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id CF3C31804D0 for ; Wed, 6 Apr 2022 04:36:25 -0700 (PDT) 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-yb1-f177.google.com (mail-yb1-f177.google.com [209.85.219.177]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Wed, 6 Apr 2022 04:36:25 -0700 (PDT) Received: by mail-yb1-f177.google.com with SMTP id g9so3540997ybf.1 for ; Wed, 06 Apr 2022 04:36:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=dFInZu8i0YVkvcFLEGxxO3xCcHCyaSk61yI5qcvsxeE=; b=UrH1EIaqe8yo4KqWVC8GK9wajERWywoJY9UTDtzZcxnyCTN2VGAz09Tqx6wHgmNROD ARbSJ6280vuYbNCR0pavEiIjHQVdeFiV89oCq6esDop3/dRo1UFsKsiUGCl5Jl9eOMsu U7BU1RMU1EH7Md72EgvHHEHqzLr4yEgJIRw4g2wglGzx+/Q6Td9kardE5ISFg+Uh2ve7 I9YrmvDpcg0JCW5X0r19hqhDSfhQWBf4/VbOCSi+HVlrQrNk1e0cZfMMnO1EqhyUofhh mnKHjsNgP16s6p+MEY0QkYXP7Rx1bjBuX+FEzgq4eJrD+qjEZQwr+rGvEaWjeLsUzndN pwww== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=dFInZu8i0YVkvcFLEGxxO3xCcHCyaSk61yI5qcvsxeE=; b=Ngm0Kpl7c3K06ujGOdebuY9iunv+WGB835LO67DGPC0NudcsqhY6UjhHfCxQTs47NN NjrJspsJmRQvy3SrI0QDtNEhpzarsG0WTtLdztANBrm7+XO27KeDrXDu9pwZXdHtKwgX 5kN2MdJIvfNJE8hZzzTq/Vs0gxQGmy3aQoBV5marzaoYxaL3jx+lpjOg8N8UrnO6kCtG 4EzqkDropP+EK9msM/JysV/Xj0VcGUzpaMrENzC4hBmYhOJmL4KA4qebH4i+TMul+H+G BfZziOf5+k2NHVoqVIuF8jTQnWGoEUC9dgQBQoVohh9eio1K412zkZ3elwvDhkbZsSOi UJpQ== X-Gm-Message-State: AOAM5313E1uUD5ic0Ao0POMMzT3iglns/bi5tRKkYUKU7lxUdwLKhNlA Qxv8RWwQTgak3g4k1eoagFZaGkC1KeDqsaEm82OUKMNXiA== X-Google-Smtp-Source: ABdhPJw96TIjR//RIWKsLUgXuXuUkEHM6jLzzMQZ31EpoyGv8LErS8w+c1xu4qozCXBy+Os1Y+ZLpLMpJ4Q710CQeKE= X-Received: by 2002:a25:a029:0:b0:63d:f892:e7af with SMTP id x38-20020a25a029000000b0063df892e7afmr5679146ybh.14.1649244984822; Wed, 06 Apr 2022 04:36:24 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: Date: Wed, 6 Apr 2022 13:36:12 +0200 Message-ID: To: "G. P. B." Cc: PHP internals Content-Type: multipart/alternative; boundary="00000000000077ce7205dbfac56d" Subject: Re: [PHP-DEV] Reflection changes due to allow null + false as standalone types RFC From: guilliam.xavier@gmail.com (Guilliam Xavier) --00000000000077ce7205dbfac56d Content-Type: text/plain; charset="UTF-8" Hi George, > https://github.com/php/php-src/pull/7546#discussion_r837900447 Thanks for asking (even if voted). On Tue, Apr 5, 2022 at 2:01 PM Marco Pivetta wrote: > Probably best with consistency? > > > - Ignore the Reflection changes of the RFC and align the union type with > the current behaviour > > This one, specifically. > I agree with Marco (who I know works on reflection-related projects). To expand a bit: when reading the RFC, "the notable exception that `null|false` will produce a ReflectionUnionType instead of a ReflectionNamedType contrary to other `null|T` types" seemed legit because - `T|false` currently always produces a ReflectionUnionType - `null|T` producing a ReflectionNamedType (like `?T`) was only decided *for backwards-compatibility reasons* [ https://wiki.php.net/rfc/union_types_v2#reflection] (moreover the initial RFC [https://wiki.php.net/rfc/null-standalone-type] only proposed standalone `null`, not `false`, so didn't allow `?false`) but now looking at the implementation, I don't like the special casing. Regards, -- Guilliam Xavier --00000000000077ce7205dbfac56d--