Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:123048 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 890611A009C for ; Mon, 8 Apr 2024 21:39:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1712612418; bh=dof9yvg5sJ1+b27vl2cSVoUjgzdcbpx7ZL8HdNbg8NU=; h=From:Date:Subject:To:From; b=X6A7b97J/hJ3G4SZ+OqErJ8SStSg+6Vw5vb9PQCIA8LFLwpglHcMObYhBledFpDbV ddQmxIXLgUwNJSk/aJYuxTxsnpqOmVZzBE8FrnKAilKYuV/qxK1CBG6UZ7sggRr8jA ylTDKcnpkkzRqemswTKSzqNv1nZr3+zVOGA3eXCrvvwWX4nfOKF3J/GVEOl6BtZFdb Z8B0l7HrjjZLuDKSux9bSxKIyrY9mhcHwZU8TAIy3wsF2j9q3DWXQDoACAnqkTzpmW vT89TTKjozna2rC0yg7azoQKu+myXnN/25BqYtZTM2NC0zUWir8MYd/ptMZbHt+LBR PHF5466ayLUlw== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id D7CCC18066E for ; Mon, 8 Apr 2024 21:40:17 +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,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=4.0.0 X-Spam-Virus: No X-Envelope-From: Received: from mail-ua1-f53.google.com (mail-ua1-f53.google.com [209.85.222.53]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Mon, 8 Apr 2024 21:40:17 +0000 (UTC) Received: by mail-ua1-f53.google.com with SMTP id a1e0cc1a2514c-7e3c4736d6dso929781241.2 for ; Mon, 08 Apr 2024 14:39:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1712612385; x=1713217185; darn=lists.php.net; h=content-transfer-encoding:to:subject:message-id:date:from :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=dof9yvg5sJ1+b27vl2cSVoUjgzdcbpx7ZL8HdNbg8NU=; b=WtWfxU/x7dQVC4MalYR2jQs8ZuYBsBn/1xoSvbRNTcccRUZt/ke3xrlWWuLaz23Ko2 rgOLNyhYiZpKFNkz+VsyZmMqmuiJF8/ydoQyaBQ0l7LbBnRfe+URrgxehkp/7WwEhvOU Pu4glMbWzJS8O4JjlRSThM8Br10mF76DopnvgkXYkmAnrVjGTUzKep9FSlwAGbzkFTb/ JIh4NVnRV8b5Joq1Z8/n5AecFgGM9AJiSLYRF94jqFQOwexFqjGJ6Cnhu2Vx+xfN38++ qM92G92pPzzW4EUeoVujCbtHYar2kyYOfskMWCugOI9w/ZFnI5NGhRoWQCE4A7lS2e8y KgEA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712612385; x=1713217185; h=content-transfer-encoding:to:subject:message-id:date:from :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=dof9yvg5sJ1+b27vl2cSVoUjgzdcbpx7ZL8HdNbg8NU=; b=iRH9ebHhGbYZ5Y089WnOCEIYKq5o/j2dCiU40J4QIG3YitxgzXJfz+ovFZsMOOOzaW CuyCO9Vf/CX3KKs/4NHFan6TXjfAZcK1b3tuH/oHN9zbAM/7SMM3z4vKJqETTP1Lsl4m eHEqHp1C6pT456iVqxhOmmT62cbWT8mbVwLyYmBXxH6I3CsmKlnWM/Ys4qJ5xHDPK19T atOWiL/lWJqX83WcKc2elnMEdBCB61rOdG0E5vsH2oSe6kMVXoSmsOxe05lOFA43erPJ 3HMlW/4/EbN7BrKmCQ2F/e8ORoml7Z1BvSP7MCM9YWQsS24RweWoKinCNdOpYGrJqMwH RSdQ== X-Gm-Message-State: AOJu0Yx5NLeMlmFm1zAlRyrKMTuE1P3UBZ3FiX9amjOWIeTQyWsCDU4r GMLlhk4qmk92j0i/4OL1KZcRAQQqScFhdwzTx7LoLkieXKieoGK4Rucjqr/F4s8IT0Fx8DBuu3Y /pOVc50fs6qwZQWkCaFi1c2dNdTnGisF7z7oCmQ== X-Google-Smtp-Source: AGHT+IHncnqohOCES3Ou21Q+VFbweX11n8NPz9aXP9j3g22Fpq3L8Pki0GjIvJxsztWcPRM9c9gh0dew1roVNUoTOsc= X-Received: by 2002:a05:6102:3f4f:b0:479:dc54:d33d with SMTP id l15-20020a0561023f4f00b00479dc54d33dmr7438300vsv.16.1712612384716; Mon, 08 Apr 2024 14:39:44 -0700 (PDT) Precedence: bulk list-help: list-post: List-Id: internals.lists.php.net MIME-Version: 1.0 Date: Mon, 8 Apr 2024 23:39:34 +0200 Message-ID: Subject: [PHP-DEV] [RFC][Vote announcement] Property hooks To: PHP internals Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable From: tovilo.ilija@gmail.com (Ilija Tovilo) 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 no= t 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 cha= nge 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=C5=99ej 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