Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:115852 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 92285 invoked from network); 26 Aug 2021 11:08:23 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 26 Aug 2021 11:08:23 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 3753A18050B for ; Thu, 26 Aug 2021 04:42:51 -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=-0.7 required=5.0 tests=BAYES_00,BODY_8BITS, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.2 X-Spam-ASN: AS3301 81.224.0.0/12 X-Spam-Virus: No X-Envelope-From: Received: from ts201-smtpout72.ddc.teliasonera.net (ts201-smtpout72.ddc.teliasonera.net [81.236.60.177]) (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 ; Thu, 26 Aug 2021 04:42:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telia.com; s=tssemail; t=1629978171; bh=NsprZkFZVcJNL7EZVlcztFycbHWqKe9JHsiDa9MNT74=; h=Subject:To:References:From:Message-ID:Date:MIME-Version:In-Reply-To; b=HNNEq2aCmC3fFZwx/jiJTycXeo8QYBVgWhTkytE0hbUY8PVQNQyl2o3nFcFvyBkW3hP9nXCfQI44oNOR8TAQr7mx1MPhMN5PWpo7aMykRCKvlDaLxkJYIQr99UbNKeqg5qKpVt/WQWlWC64gDljLNtUI2Y5s+g+MXP2awFekQ1gHKT0Or78+n/ebSO8PIT38z9+YSbNCv1+/xf9TuR6kA9qIZIuqnQ6JUc3/JmcAaVOnIWyKxW9rZEweu9LVONtlB3VqNwwLtvB+lE5ZcYySpnzLgFOwBeavXNgf27JBWnuOVwaB6Lw3+T71my+k7w1Jf3e3UNAzhxRdflQvyGRtfA== X-RG-Rigid: 60C471BF03C5764C X-Originating-IP: [84.216.97.227] X-RazorGate-Vade: gggruggvucftvghtrhhoucdtuddrgedvtddrudduuddggedvucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuvffgnffktefuhgdpggftfghnshhusghstghrihgsvgdpqfgfvfenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurhepuffvfhfhkffffgggjggtgfesthekredttdefjeenucfhrhhomhepuehjnphrnhgpnfgrrhhsshhonhcuoegsjhhorhhnrdigrdhlrghrshhsohhnsehtvghlihgrrdgtohhmqeenucggtffrrghtthgvrhhnpeetgeekfeeuffeiudffjedvieevfefhueeivdekleettdfhudellefgfefhffehgfenucfkphepkeegrddvudeirdeljedrvddvjeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhephhgvlhhopegludelvddrudeikedruddrudehvdgnpdhinhgvthepkeegrddvudeirdeljedrvddvjedpmhgrihhlfhhrohhmpehukeelledtieegudejsehpnhgvrdhtvghlihgrrdgtohhmpdhrtghpthhtohepihhnthgvrhhnrghlsheslhhishhtshdrphhhphdrnhgvthdprhgtphhtthhopehphhhofhhsthgvthhtvghrsehsvghnshgrthhiohhnrghlrdgthh X-RazorGate-Vade-Verdict: clean 0 X-RazorGate-Vade-Classification: clean Received: from [192.168.1.152] (84.216.97.227) by ts201-smtpout72.ddc.teliasonera.net (5.8.716) (authenticated as u89906417) id 60C471BF03C5764C; Thu, 26 Aug 2021 13:42:48 +0200 To: Philip Hofstetter , php internals References: Reply-To: =?UTF-8?Q?Bj=c3=b6rn_Larsson?= Message-ID: <775dc98a-b3c5-d498-71f7-9f19ff891f29@telia.com> Date: Thu, 26 Aug 2021 13:42:48 +0200 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.13.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-GB Content-Transfer-Encoding: 8bit Subject: Re: 8.1 / Exception / Property Type / Backwards compatbility From: internals@lists.php.net ("Björn Larsson via internals") Den 2021-08-10 kl. 11:55, skrev Philip Hofstetter: > Hello > > The following valid <= PHP 8.0 code that intends to make the $line property > public is a fatal error in 8.1 > > class FooException extends Exception { > public $line; > } > > However, the fixed code for 8.1: > > class FooException extends Exception { > public int $line; > } > > Is a fatal error in <= 8.0 > > Is there a way to create a class that makes the $line property public > that’s compatible with all versions of PHP without requiring conditional > declaration of the class? > > For method return types, we have #[ReturnTypeWillChange], but for property > types 🤷‍♀️ > > Philip > Hi, Has this been adressed / solved in some way and does it needs to be fixed? I mean we are approaching RC1. r//Björn L