Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:123457 X-Original-To: internals@lists.php.net Delivered-To: internals@lists.php.net Received: from php-smtp4.php.net (php-smtp4.php.net [45.112.84.5]) by qa.php.net (Postfix) with ESMTPS id 9F4941A009C for ; Wed, 29 May 2024 19:51:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1717012330; bh=9fWq6ry47VXPfOHAsHYHP8DzYYXc5eB2PuJP3+O/c/E=; h=Date:Subject:To:References:From:In-Reply-To:From; b=SmUDjxmJHPWtKKVBMD41zHMAC+0OLdTnnADENUuO3mHONSdNzQI9B4E7Z9mLRWqgA R7xBQhHrMe0tOHoQzqY4lLO61bZuK/5Oxd5K2X8NOSBmmVAOKl7D4MrIiv3QDPKkvN tWJy6MuDuGRCWIBwh8YwtvioKvEy4B3mrQocmRqeaJxfgNEnE7fm78bpGl4FjYsPgB Edyj1WjPPwtiMGhFxmCIyE9LE9NhZJIFkR0PoW7SVwZWkrVxV9P6nx1MMtb5UNaiNz qR/x05Usgk1uEueCr2hC1VqekWFCb//4hksb//CT2e9zdySbUeb1I2+1KMZPiJ5MKO So4OfY5AOdRrA== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id C249C180041 for ; Wed, 29 May 2024 19:52:06 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 4.0.0 (2022-12-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=0.6 required=5.0 tests=BAYES_50,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,DMARC_PASS,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=4.0.0 X-Spam-Virus: Error (Cannot connect to unix socket '/var/run/clamav/clamd.ctl': connect: Connection refused) X-Envelope-From: Received: from chrono.xqk7.com (chrono.xqk7.com [176.9.45.72]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Wed, 29 May 2024 19:52:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bastelstu.be; s=mail20171119; t=1717012263; bh=9wH07VHWJGHRt2o7xwcu8Sg7+Ice4Ufjtfm1TuxS6YY=; h=Message-ID:Date:MIME-Version:Subject:To:References:From: In-Reply-To:Content-Type:from:to:cc:subject:message-id; b=JFJPn7YNvP4K+nGuZXg2ljYQyLRU4et6HeuZgwFzF9QZFx/MniNot4twDZNKTEbhA YSHmT7HvLfSfTDYDONglsF14/L6bR4ITVtbVY2ZzoZWZ15rKscnLrjWw6Mh9drwjDj wKJz8GciJJJdxAXVFSOJap4Fmdh7hFVmYJQaFXMKDlc1yZa5F9tDvT9J3ll/sEfpxi VTZ6Ws+EaUMYhT4RcIGKD3g1I2YL436FNYBQFRLXupfNk9Sl3Ixq94ABNs2iWlRmKp IhmKr3n6FkJqI+daxNwyhw3NZX+GmhMT2Fk3WMkIxK0pfzEQllPPvmFfTiEkr1cJe6 hIfl22WLYdcpQ== Message-ID: Date: Wed, 29 May 2024 21:51:03 +0200 Precedence: bulk list-help: list-post: List-Id: internals.lists.php.net MIME-Version: 1.0 Subject: Re: [PHP-DEV] [RFC] Asymmetric Visibility, v2 To: Larry Garfield , php internals References: <0a6a61cd-f203-4dea-a7f8-97e6b885c52d@app.fastmail.com> Content-Language: en-US In-Reply-To: <0a6a61cd-f203-4dea-a7f8-97e6b885c52d@app.fastmail.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit From: tim@bastelstu.be (=?UTF-8?Q?Tim_D=C3=BCsterhus?=) Hi On 5/29/24 21:15, Larry Garfield wrote: > * We've brought back the abbreviated form, as public-read, something else set is the most common use case. The most common use case is that 'get' and 'set' are symmetric. Any divergence from that should stand out and I think that the hamming distance between protected string $foo; and protected(set) string $foo; is too small. Other than that the proposal looks good to me. Ship it. ------ One note regarding the text. You already confirmed to me in private that: class Foo { private $dontTouchMe; } $backdoor = function ($key, $value) { $this->{$key} = $value; }; $f = new Foo(); $backdoor->call($f, 'dontTouchMe', 'butIDid'); var_dump($f); would work as expected with aviz. It would make sense to explicitly spell that out, just like it's explicitly spelled out that `ReflectionProperty::setValue()` works. Best regards Tim Düsterhus