Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:112018 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 79054 invoked from network); 6 Oct 2020 17:45:46 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 6 Oct 2020 17:45:46 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 289541804AA for ; Tue, 6 Oct 2020 09:59:12 -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-io1-f44.google.com (mail-io1-f44.google.com [209.85.166.44]) (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 Oct 2020 09:59:11 -0700 (PDT) Received: by mail-io1-f44.google.com with SMTP id m17so13805495ioo.1 for ; Tue, 06 Oct 2020 09:59:11 -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; bh=f7TQ2Mizun56tKFQl3WY9be93bgN+JfhMfBs6rtNYjs=; b=OsacQ2zA0DKqhzqLipykYG5hRlWOH/ahRX74sFyKcb8aqRWPfFcJyORujw8Q4DZtH0 fVyzc5P1wfwg8MIlTmsi8odbLh7vV4t5Q6xu3AGe1JNuLj1M8OXP5G4a/YV1X71MakVI n6jgzGWwCb67OZYFkGlGNbPovJJFvYalUspWQoIdKNFNs6sKBxcHQ5NmohX7+kRp5gMz dNA0eDB6UTR+d35F91F+UWkhysQOARFj1RBqxI46IzJT0p+/UDCQNlbnUYoYlHx4aMqR IPbEzhxWCniLXwWkcRD2ztaSwZa4jIdpPvJ4p9eIe+BZ1XaGVSpVXSKDTigD6iVxk4RJ ZCIg== 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; bh=f7TQ2Mizun56tKFQl3WY9be93bgN+JfhMfBs6rtNYjs=; b=QLyYWpqZFIqG5p7h4OK7jixq9+jE70hVaGcOEsh9vzVP5Vvo0ygkVBGvuOMipDoiRB /nH066DSkc86CH0najGm8bKK/DXtSe/g3FLLT4su432MfoAurEer4t3NeF9s5oV5BzAi 7Ur2sTPuK0IOufQajtLJpcUIP9DR2WIMEph1FMJunQVnhM384Sko1eUHIfRLHRZKdkew A7B9z2lHxF2aHSGxmylYOsJm0PALkCai+b5cLbpK64SeDuwxCLir7FGXQ/I1RHv3px7n IWsJDPW5I+ZvvNjDGxjTrSmoea+WFom/wD+TdGZqsg35k3e/oENwjD1XXV+37CL8adRY K/KA== X-Gm-Message-State: AOAM532/7Eu+ELlr9TsUNxNamC5Kb0AUZ0Wems5dfEABOSVnZXKkgj9G 59pPBqwGmc9klmLFOWw+wfjYdXrSlSelPThwktAMVFPp X-Google-Smtp-Source: ABdhPJwztW+gPhueaIC/OVBFCDz0bS0zMCTXAEdahU//WyzTxphRDx7j9Lgv+536uHMpO0S5NJtNGzf/PGVROzh5vvA= X-Received: by 2002:a6b:4e0a:: with SMTP id c10mr1908970iob.120.1602003548698; Tue, 06 Oct 2020 09:59:08 -0700 (PDT) MIME-Version: 1.0 References: <33f82702-6126-fa36-48d6-71487cae1b72@gmx.net> In-Reply-To: <33f82702-6126-fa36-48d6-71487cae1b72@gmx.net> Date: Tue, 6 Oct 2020 17:58:57 +0100 Message-ID: To: PHP internals Content-Type: multipart/alternative; boundary="00000000000072fb5c05b10384ee" Subject: Re: [PHP-DEV] Attributes and constructor property promotion From: rowan.collins@gmail.com (Rowan Tommins) --00000000000072fb5c05b10384ee Content-Type: text/plain; charset="UTF-8" On Tue, 6 Oct 2020 at 17:20, Andreas Leathley wrote: > From my understanding suppressing the validation errors in this > particular case would be a good solution, or are there any serious > downsides to that? > The downside presumably is that a library author could implement an attribute with a property-only restriction, and therefore write code handling parameter attributes with the assumption that that attribute won't be present. If a consumer of the library makes use of constructor property promotion, that assumption can be violated. I can't quite picture what that code would look like, though, since it's always necessary to filter the list of attributes to exclude those from other libraries. Regards, -- Rowan Tommins [IMSoP] --00000000000072fb5c05b10384ee--