Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:126475 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 BEF031A00BC for ; Fri, 21 Feb 2025 20:10:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1740168468; bh=tQOnF3BH0wxeyplnRASIv6p3sZRqbUCSKz8jBynH9a0=; h=From:Date:Subject:To:From; b=HXOr+B+EN5QLVWxFU4UYZSwPfvILecUIx/ttl1o3YWhPFmom524cTsjeSQFekikoY ZlYo6mjweQM/9bXjVc6Kznz2fHEjfX5MqC7GJPgGKQjNSCDyC4RhboDUZftc6VnfsR 21G/2nP2axMLag1K7XvAnnMZvped9wABT3qQl59vQmERGv4FCUHnehpnBeYXaa4knu /nkyZHCLri3RNvTazlWDNxmxw14ghNSdn4pTQ4JnJejdQ6nuSYHomIGucmH8NNEvic rd8cpsQPtnwcz3olcVl56muI5f/0qE2iQp++9M36a+jr9h0gj9sHdN7g/DI7ZZ2B8V 0PDkBfnJQTP3Q== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 0943F18004A for ; Fri, 21 Feb 2025 20:07:48 +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=-1.2 required=5.0 tests=BAYES_50,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,DMARC_PASS,FREEMAIL_FROM, HTML_MESSAGE,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=4.0.0 X-Spam-Virus: No X-Envelope-From: Received: from mail-vs1-f44.google.com (mail-vs1-f44.google.com [209.85.217.44]) (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 ; Fri, 21 Feb 2025 20:07:44 +0000 (UTC) Received: by mail-vs1-f44.google.com with SMTP id ada2fe7eead31-4be5b33ff91so676447137.1 for ; Fri, 21 Feb 2025 12:10:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1740168623; x=1740773423; darn=lists.php.net; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=tQOnF3BH0wxeyplnRASIv6p3sZRqbUCSKz8jBynH9a0=; b=kHMYeWCbhPYaBgW14Tz1gSfRbzAxZjE1SEiMjnBQHqw0VNgMfG2QtKbwWrXjOOvy0K LF0i1yamG1Wdr1xpQS6gWXbi72sALSBxLr92VkkKR6QKyzHGcm/2NCGcYN9UC4osu93m 0frz14R1g18kd+GDI5Lm3jb+NJnDYcZs9TSNpXL6fh26VywJDnmChPHSa3mnTyRCPlAp HtVfJ30QlRmYMIEATV8xEUY0hmuOzSVgX2YszrHRrVkpe4ZdlD6A2fUf/5MbC8JPr+Nu 1tdtSam5rd6E4JRagU5RRL7PqXHURrOlHfiNWsOMWXPaP2U6lKQMzJ5uhWPpr1+G/Buu OxcQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1740168623; x=1740773423; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=tQOnF3BH0wxeyplnRASIv6p3sZRqbUCSKz8jBynH9a0=; b=LDyUzVOJL2OsSigEuyf7hRfUgR77L5Oz7xkugGfK3Ku+K4nEydpfxqTIZIIeSUsX5i rQH69dymNPPyJV4eB9dFpO5v+LFg+ALc1pvkqbBkIGjCxt2nj/dAmnPf5uYISl3m3Rzj Z2XPGuiDWLr1H4INxqlXnfV0rsS5aa1yauoot9JsUwhO5iR6eU7DM9ZyYt9YDzz9mh12 TvwJ4JYyisUC+EzBRCPjqoK3X5oWxgSEJyFBPrVDDWqQoGZZeA4yHbRXJoZHrUbQgkC9 aEXIwpX5mz2XMZPFlzkZkAjktsF9fCR06+fzwTR+Lu9CVw3uAyx08/nzJMzkKAFekf3u hFvQ== X-Gm-Message-State: AOJu0YzJAqk16J20XE28BmD07zhuMROXVbuEu/q/NE7jfTfWpoY4IQ0g 2MHumZGCvWUYpyaXDSB5hXBl+5APUBDk9c6Q8DnLNqrhjh9C9bGdgKhok885S3pkQ1jqrnCugX7 T8C/ZqgO2qCjaBULnYTICwRTwtWAFLB1u X-Gm-Gg: ASbGncv9ROJKUH8qhnrpF9vFEQRj66bhpj23/ZopD4mG5f4gKoK1fc0k+2DPBENx1xU 3BdfXy2csUqUAedHzEbzTR2Tyj8BoewgxfHSkWfrvzK9LFMGt2GJSImgM4L6iLxIda3NmGTvSFy rX0Akubp0kWhd2s1Ai5Ako1FDGdZlVPaFIGab+yw== X-Google-Smtp-Source: AGHT+IGpDeNZagqFLX4HHyqWu1ehT58RY053jGV1VxiIdI4b//M0vzaPWZjUZv9lM1yFMAtTTsI3EJeP9kMZ7B77Tlk= X-Received: by 2002:a05:6102:41ac:b0:4bb:e80b:473b with SMTP id ada2fe7eead31-4bfc00d37d7mr3170046137.15.1740168623571; Fri, 21 Feb 2025 12:10:23 -0800 (PST) Precedence: bulk list-help: list-post: List-Id: internals.lists.php.net x-ms-reactions: disallow MIME-Version: 1.0 Date: Fri, 21 Feb 2025 12:09:46 -0800 X-Gm-Features: AWEUYZkxuOFbosURTfxbiaPTf40zgLYne6v3peVPsYv3qrI60uEViCvLwM87iM0 Message-ID: Subject: [PHP-DEV] Constructor property promotion for final properties To: internals@lists.php.net Content-Type: multipart/alternative; boundary="000000000000a84a5f062eac9437" From: daniel.e.scherzer@gmail.com (Daniel Scherzer) --000000000000a84a5f062eac9437 Content-Type: text/plain; charset="UTF-8" Hi internals, I recently found out that constructor property promotion cannot be used for final properties. I propose that it become allowed. Thoughts? Would this need an RFC, or is this minor enough to be acceptable with just a mailing list discussion? Background: In the process of trying to help support PHP 8.4 syntax in PHPCS[1], I discovered that constructor property promotion cannot be used with final properties. I thought that this was a bug, and filed GH-17860 with the report[2]. But, in the discussion on the patch that I sent to fix the bug[3], I was told that this was intentionally omitted. So, now the bug is a feature request. -Daniel [1] https://github.com/PHPCSStandards/PHP_CodeSniffer/issues/734 [2] https://github.com/php/php-src/issues/17860 [3] https://github.com/php/php-src/issues/17861 --000000000000a84a5f062eac9437 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi internals,

I recently found out that= constructor property promotion cannot be used for final properties. I prop= ose that it become allowed. Thoughts? Would this need an RFC, or is this mi= nor enough to be acceptable with just=C2=A0a mailing list discussion?

Background:
In the process of trying to help su= pport PHP 8.4 syntax in PHPCS[1], I discovered that constructor property pr= omotion cannot be used with final properties. I thought that this was a bug= , and filed GH-17860 with the report[2]. But, in the discussion on the patc= h that I sent to fix the bug[3], I was told that this was intentionally omi= tted. So, now the bug is a feature request.

-Danie= l

--000000000000a84a5f062eac9437--