Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:115320 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 55807 invoked from network); 6 Jul 2021 12:08:51 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 6 Jul 2021 12:08:51 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 0C37D1804AA for ; Tue, 6 Jul 2021 05:30:37 -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 autolearn=no autolearn_force=no version=3.4.2 X-Spam-Virus: No X-Envelope-From: Received: from mail-ed1-f49.google.com (mail-ed1-f49.google.com [209.85.208.49]) (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 ; Tue, 6 Jul 2021 05:30:36 -0700 (PDT) Received: by mail-ed1-f49.google.com with SMTP id l24so27758806edr.11 for ; Tue, 06 Jul 2021 05:30:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=9zHl8wQ+E7XHp6YyH1YApA/zMgE0EG1hVGOoHApyxRk=; b=cTygvWyGT4wh4C5lNGrzh2MfW82RjZaHnSHhadi7DKhmBMfiwqm0VxsNEY+oRS8Xpc pHkCSgkQw4DQPiy1wVcBSzvhCCNv2NyyXWqfliL7anOLL+rX4ktEKTU+SjCoWdykIO5i srfaslFxPLbCDHVv1HItmC4STHVMpHEAey2ozhFvx1WCIsvluY/tMcUA9iR3883ZJZpY 8d0MC74IzTUqHpeLLDAwEJ3ln1/wb99VupMRS/YNHHa1t4b1OvKCX0GTiNuv4/6wkjsE cFgTcGzbXTCxooCtjPltM0JrPzFaWJYeBXHTyQCxgdekrtSlCnhE088TLNIfKBWdgVzF O0ug== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=9zHl8wQ+E7XHp6YyH1YApA/zMgE0EG1hVGOoHApyxRk=; b=eiU/rAMpLp9SxmcupvecanAVOSN+TiAJ0OABTfTCHhcGuWj46eC5oxARCZ27T5tMbI dFoOYMLwUfl047HzANJEjeyeh3Ow3MJ1piI0aws2Wuq4Q8cdQPmRM4fZEHr74RhcqdG0 ki5OKxtSaSJCtZv5TPR2ZJa82u409O9JRBIqGWOV9E9LfXH4zRr88+Mgx0ZeZDoTwWuq oJ8HbTOQq94h8CCCCt8LSPBAByxfzR+d7Z6hc9rUzwKm3mmuWSJD0Ndx6bXosJbPwLf3 wnx5nANxjZBPC5PS9+vOsIE1v0EB0U6fykLaVmEqLRBzHm90diGT+ZMtdf1V1kyTcw50 rgTw== X-Gm-Message-State: AOAM530YxO5MfhIbTFJw536tJyag9QUeuJMe3BunSbTkPJXaqcJahluc MjgSiI/GR/4Bij9SASRkUUso4H4JpQFfwRRp1D0= X-Google-Smtp-Source: ABdhPJz6eJ3wYqJVBsQd6MJnXD3YwPI7+qpgiyqtk4XpALgt1ZWayes5lmPVT3nqKWR2cFqyupBv/o3AecbP0sgG/30= X-Received: by 2002:a05:6402:111a:: with SMTP id u26mr22221571edv.260.1625574634485; Tue, 06 Jul 2021 05:30:34 -0700 (PDT) MIME-Version: 1.0 References: <34e76830-043f-3bae-4d60-9871010da0ed@gmail.com> In-Reply-To: Date: Tue, 6 Jul 2021 14:30:22 +0200 Message-ID: To: Benjamin Eberlei , Nikita Popov Cc: Rowan Tommins , PHP Internals Content-Type: multipart/alternative; boundary="000000000000a4fcde05c67396ee" Subject: Re: [PHP-DEV] [Vote] New in initializers From: nicolas.grekas+php@gmail.com (Nicolas Grekas) --000000000000a4fcde05c67396ee Content-Type: text/plain; charset="UTF-8" > > > This is not 100% correct, you can have an attribte #[Foo(Foo::class)] > and > > > then calling ReflectionAttribute::getArguments would also require to > > > resolve the type Foo. So this is not different than what could happen > > right > > > now already. > > > > > > Despite its name, "::class" doesn't care about class definitions, it > > just performs a string substitution based on the "namespace" and "use" > > statements in the current file. > > > > In most cases, that happens entirely at compile time, so the following > > two source files compile identically: > > > > Hah, I realized after sending the example was bad :) I should have used an > example using actual constants (vs magic ones): > > #[Foo(Foo::BAR)] > > This would trigger autoloading and resolving during getArguments() > Right! Extending on my proposal, getUninitializedArguments() could return a ReflectionConstant in place of such values. --000000000000a4fcde05c67396ee--