Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:123059 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 B8B5C1A009C for ; Tue, 9 Apr 2024 14:03:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1712671440; bh=eXC1Pj1xx7kdvgSM2ryDECc8H3glY4UGMoWIBxe1QVw=; h=Subject:To:References:From:Date:In-Reply-To:From; b=XcrIaouVqDvEqO18/QT2402vN9MgaBNoVWpZVLw8SPVx7GsCf+zXlzah37H42vR+L IH0gSwbhT2f3/CVy4Q4L887zYl9V/JuGFjAgsosT+J1nab+Lm0QYn1jash7fLGxstp kFh9aLxNCSXLjUx17UK6Gksz/Z1rW+IIC+th69ljthPKRqH8nhZTq4Bm2lFKt5QecL KlaUIGwtjdGUN7PnGiGNGegDjAkEenaW9gAuMyLjaFzjyIA0bfLOkruYnQBWVgn3sI H+8epQjyom3YujG+M5NGT4uZzBw15OiytHCQ/tZvzJR4XaWn5DlvILC+OQQB9vEICu NlHKZtqDAL6lA== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 7643F180081 for ; Tue, 9 Apr 2024 14:03:58 +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.8 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_05, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,DMARC_MISSING, HTML_MESSAGE,NICE_REPLY_A,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2, SPF_HELO_NONE,SPF_SOFTFAIL,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=4.0.0 X-Spam-Virus: No X-Envelope-From: Received: from cross.elm.relay.mailchannels.net (cross.elm.relay.mailchannels.net [23.83.212.46]) (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 ; Tue, 9 Apr 2024 14:03:57 +0000 (UTC) X-Sender-Id: a2hosting|x-authuser|juliette@adviesenzo.nl Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id A5F5083954 for ; Tue, 9 Apr 2024 14:03:24 +0000 (UTC) Received: from nl1-ss105.a2hosting.com (unknown [127.0.0.6]) (Authenticated sender: a2hosting) by relay.mailchannels.net (Postfix) with ESMTPA id 1235783900 for ; Tue, 9 Apr 2024 14:03:22 +0000 (UTC) ARC-Seal: i=1; s=arc-2022; d=mailchannels.net; t=1712671403; a=rsa-sha256; cv=none; b=N7OpEk84/YJ69mqmp70zHYFrBmBJRxL0SxGmcfTnep2D1O74A1AGCVzTg/hIpnkqELXITX swspukPfXx/FFXk3ffCbDnQIkUP5Olajx/pt8GG3o36CWrUV20MpI+BKNXX8iYl3lcDC67 yM+dGGfmbS5FPubdiioi5gPQbu6JPt5Y804f6klCmpfbOgg3oxK9Vn3U02RyAs4V04lIeU YqrSKqEESP4bRsZdxNOz0KieR/u4HFVBuFBUpVhkzl98ocZCJVXBs/DOjFdiIeRDnKApEQ N817g4kqJTBVfFv8GyB9Uz6KLqgha0dHrDcb5v8MQ3CT5TOFojVR1p68Sk8y1g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=mailchannels.net; s=arc-2022; t=1712671403; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references:dkim-signature; bh=z/KqRkJgGW+iakFogE7tL5dffibXjmUdCuPGTStdmUs=; b=CEYnwaEut4DLvouz+K1YRNpZc+PQFbkfUKU1WP42BNtAboKjOrkqCBr/qCmRvxaRZJ0mFt nN7vxzHcKZ0BnopgbtH45tUe5c4lIOFiCRlcL8Lnt/aajlAovD6UMooB/SsoMLATpD8NWj hMU97J1qh8u6wPFd1NhMqESAQQ3XF3vH10Tn06zOKFtOsf9B0xDegi5AcMIxi8pavn5qJ7 cBw/VcagFRG5+SSbdpk8E8nQ9yh4mLLHv4fH3zXetO+F+fOh/jkzxujvyg2sMff///1kGz 59TRAy7qERuIukfLrxFvhOL94AiBe87S2+F13Yrh17uUYl0/a+val3Q82derMQ== ARC-Authentication-Results: i=1; rspamd-86f86f958-tnf2x; auth=pass smtp.auth=a2hosting smtp.mailfrom=php-internals_nospam@adviesenzo.nl X-Sender-Id: a2hosting|x-authuser|juliette@adviesenzo.nl X-MC-Relay: Neutral X-MailChannels-SenderId: a2hosting|x-authuser|juliette@adviesenzo.nl X-MailChannels-Auth-Id: a2hosting X-Exultant-Whistle: 7c16949a7edbc073_1712671403627_4047881755 X-MC-Loop-Signature: 1712671403627:1736114274 X-MC-Ingress-Time: 1712671403627 Received: from nl1-ss105.a2hosting.com (nl1-ss105.a2hosting.com [85.187.142.69]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384) by 100.111.183.71 (trex/6.9.2); Tue, 09 Apr 2024 14:03:23 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=adviesenzo.nl; s=default; h=Content-Type:In-Reply-To:MIME-Version:Date: Message-ID:From:References:To:Subject:Sender:Reply-To:Cc: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=z/KqRkJgGW+iakFogE7tL5dffibXjmUdCuPGTStdmUs=; b=df0N/Ixz8Lj0g6Lz0G2cZPfNK6 8Cy1Z/MYUtY7c400vQMrwkTKiEBaXHPHz0IBbZrMpbkx1bF/TLust+ML8bZz0HTxHve1ejf/ud9B/ FobmtDc7h0tubAjalBbeodvsFLV+DEHyClwzyecCt06LrqWu429p0VtBC5g2vGb1Ei8A=; Received: from mailnull by nl1-ss105.a2hosting.com with spam-scanner (Exim 4.96.2) (envelope-from ) id 1ruC4H-0092tu-0l for internals@lists.php.net; Tue, 09 Apr 2024 16:03:21 +0200 X-ImunifyEmail-Filter-Info: X0RSVUdTX01NX1BST05PVU5DRSBSQ1ZEX1ZJQV9TTVRQX0FV VEggUkN WRF9UTFNfQUxMIFZFUklMT0NLX0NCIFJDVkRfQ09VTlRfT05FIEJBWU VTX0hBTSBNSU1FX1VOS05PV04gQVJDX05BIE1JRF9SSFNfTUFUQ0hfR lJPTSBJRV9WTF9QQkxfQUNDT1VOVF8wNSBNSU1FX1RSQUNFIEZST01f RVFfRU5WRlJPTSBGUk9NX0hBU19ETiBUT19ETl9OT05FIFJDUFRfQ09 VTlRfT05FIElFX1ZMX1BCTF9BQ0NPVU5UXzAxIFRPX01BVENIX0VOVl JDUFRfQUxMIF9EUlVHU19NTV9ESVNDT1VOVCBBU04= X-ImunifyEmail-Filter-Action: no action X-ImunifyEmail-Filter-Score: 0.79 X-ImunifyEmail-Filter-Version: 3.5.11/202404052205 Received: from [143.178.154.86] (port=53676 helo=[192.168.1.16]) by nl1-ss105.a2hosting.com with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96.2) (envelope-from ) id 1ruC4I-0092tc-2C for internals@lists.php.net; Tue, 09 Apr 2024 16:03:21 +0200 Subject: Re: [PHP-DEV] [RFC][Vote announcement] Property hooks To: internals@lists.php.net References: Message-ID: <66154AA0.1040905@adviesenzo.nl> Date: Tue, 9 Apr 2024 16:03:12 +0200 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.7.0 Precedence: bulk list-help: list-post: List-Id: internals.lists.php.net MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/alternative; boundary="------------030107090600060503060007" X-AuthUser: juliette@adviesenzo.nl From: php-internals_nospam@adviesenzo.nl (Juliette Reinders Folmer) This is a multi-part message in MIME format. --------------030107090600060503060007 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit On 8-4-2024 23:39, Ilija Tovilo wrote: > Hi everyone > > Heads-up: Larry and I would like to start the vote of the property > hooks RFC tomorrow: > https://wiki.php.net/rfc/property-hooks > > We have worked long and hard on this RFC, and hope that we have found > some middle-ground that works for the majority. One last concern we > have not officially clarified on the list: > > https://externals.io/message/122445#122667 > >>> I personally do not feel strongly about whether asymmetric types make it into the initial implementation. Larry does, however, and I think it is not fair to exclude them without providing any concrete reasons not to. [snip] >> My concern is more about the external impact of what is effectively a change to the type system of the language: [snip] will tools like PhpStan and Psalm require complex changes to analyse code using such properties? > In particular, this paragraph is referencing the ability to widen the > accepted $value parameter type of the set hook, described at the > bottom of https://wiki.php.net/rfc/property-hooks#set. I have talked > to Ondřej Mirtes, the maintainer of PHPStan, and he confirmed that > this should not be complex to implement in PHPStan. In fact, PHPStan > already offers the @property-read and @property-write class > annotations, which can be used to describe "virtual" properties > handled within __get/__set, already providing asymmetric types of > sorts. Hence, this concern should be a non-issue. > > Thank you to everybody who has contributed to the discussion! > > Ilija > Ilija, Heads-up: I'm still writing up an opinion and intend to send it to the list before end of day (CET). I know I'm late to the party, but I've been having trouble finding the words to express myself properly regarding this RFC (and have been struggling to find the right words for months). Smile, Juliette --------------030107090600060503060007 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: 8bit
On 8-4-2024 23:39, Ilija Tovilo wrote:
Hi everyone

Heads-up: Larry and I would like to start the vote of the property
hooks RFC tomorrow:
https://wiki.php.net/rfc/property-hooks

We have worked long and hard on this RFC, and hope that we have found
some middle-ground that works for the majority. One last concern we
have not officially clarified on the list:

https://externals.io/message/122445#122667

I personally do not feel strongly about whether asymmetric types make it into the initial implementation. Larry does, however, and I think it is not fair to exclude them without providing any concrete reasons not to. [snip]
My concern is more about the external impact of what is effectively a change to the type system of the language: [snip] will tools like PhpStan and Psalm require complex changes to analyse code using such properties?
In particular, this paragraph is referencing the ability to widen the
accepted $value parameter type of the set hook, described at the
bottom of https://wiki.php.net/rfc/property-hooks#set. I have talked
to Ondřej Mirtes, the maintainer of PHPStan, and he confirmed that
this should not be complex to implement in PHPStan. In fact, PHPStan
already offers the @property-read and @property-write class
annotations, which can be used to describe "virtual" properties
handled within __get/__set, already providing asymmetric types of
sorts. Hence, this concern should be a non-issue.

Thank you to everybody who has contributed to the discussion!

Ilija


Ilija,

Heads-up: I'm still writing up an opinion and intend to send it to the list before end of day (CET). I know I'm late to the party, but I've been having trouble finding the words to express myself properly regarding this RFC (and have been struggling to find the right words for months).

Smile,
Juliette
--------------030107090600060503060007--