Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:109883 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 83186 invoked from network); 28 Apr 2020 17:23:19 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 28 Apr 2020 17:23:19 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id C29FA1804C7 for ; Tue, 28 Apr 2020 08:56:30 -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_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE, SPF_PASS 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-oo1-f47.google.com (mail-oo1-f47.google.com [209.85.161.47]) (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, 28 Apr 2020 08:56:30 -0700 (PDT) Received: by mail-oo1-f47.google.com with SMTP id c83so4792443oob.6 for ; Tue, 28 Apr 2020 08:56:30 -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=lrHp8bdqEHVkRrD5x1gESAraT6yv7YuzfBGryJyRFwM=; b=l3zq2Eb7DXy70jFpM9C7G5mP3DoSmOEgrW33sAEiKku0tLgNXXv60mTD/1Zx4CD+zN RP75ZcqiUv9z+xlqX92RCyIu/857KJm6y3QYbRHAa+78YLP4o/6rZ0hoTuv3jGuaIt42 +5YjOqNjrK9133vBNFZyak6AOdwEiGw/HiGwexlb7tIkDZXzn6XipBF7xL/O8Xl/rLKD JO6ddRqM1QMYCS6rXY0xnb46T4/X1+aUx8N+Yqk6wWLiJvrIl4kRGuYu5JCdCpBOL14k pkbiVkpj849eSHz3uucSE2F7XXn8aTzwE4F/Ai/OSroh7rDEAG0JW0I2wfjFL299q5ML sh8w== 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=lrHp8bdqEHVkRrD5x1gESAraT6yv7YuzfBGryJyRFwM=; b=Za0oKLf99bRQkMa4yaBy5mZNl0idkxxTgoyu0hTPOlE/noa4pRrkM/lMSOiO7UT2Dm D9yN8hih2Vgq7yv5MPvUFfykXHTMTlS6UFuqRjkDxYrfAxE4QpCmh1GBkPPxr1NcP8Fr 85iAbHQqojMEZ9GJ5rzYxGSzDFt+394bf8UyraV7kec1LB20v9gAi6l1gBzx+zSKTVpS kELqwPpweECE7F859IkkoDkuyzD3InnCjieli5lDiln7zKFRfM6JfuzzJMzVnzKGC03q IN3tyUsnlqDBFQpRwkR/tzDfWYxczE9R8zld6JUVlbRBefUAKXlpqy4cvKCn/SErrqST qSZg== X-Gm-Message-State: AGi0PubMrp+mWreGa+vvHNrUv7GmmbsARYNCKmJ284Fk+HvjJ8ObeZMj d6cRh9sKabmuvahEGJSy6GYQU2KJOiEu3DoC/Y0= X-Google-Smtp-Source: APiQypJWUK3jnbRm+zbrEb0zni9w86qFWbzzWRwc6FDQJjmpGJnKhBGdcImeHMC+EhV2e9RiMtgtAaxbK01e/sPlBQs= X-Received: by 2002:a4a:c30e:: with SMTP id c14mr81154ooq.74.1588089384953; Tue, 28 Apr 2020 08:56:24 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: Date: Tue, 28 Apr 2020 17:56:11 +0200 Message-ID: To: Ilija Tovilo Cc: PHP internals Content-Type: multipart/alternative; boundary="000000000000a96a0c05a45bdf5b" Subject: Re: [PHP-DEV] Re: [RFC] Constructor Property Promotion From: nicolas.grekas+php@gmail.com (Nicolas Grekas) --000000000000a96a0c05a45bdf5b Content-Type: text/plain; charset="UTF-8" > > > I would expect attributes to apply only to the properties on my side. > > Parameter annotations could be interesting for dependency injection. > Symfony currently has some DI magic through parameter names among > other things. It might be nice to control these through annotations > instead. This would be impossible or involve a lot of hackery and > assumptions if the annotations aren't available on the parameters. > Alternatively we might make this information available through > reflection (like ReflectionParameter::getGeneratedProperty()) so you > can look for the annotation there. > Sure, this could be considered. But this doesn't contradict what I wrote: if one uses constructor promotion, the then attributes should only go to the properties to me. If one wants to add attributes to parameters, then one would need to opt-out from constructor promotion. Nicolas --000000000000a96a0c05a45bdf5b--