Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:127394 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 lists.php.net (Postfix) with ESMTPS id 8097B1A00BC for ; Sat, 17 May 2025 23:22:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1747524019; bh=AdvqpnSZbn4ABLWTdZt9eHzse3UL/E7HawACy+WyQ6Q=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=LdFNCShH7BanNra5AceZ+qcAjEIztVtj6FvsXPI+vlrj/XiJEC0jMfxBg9NtAhfRf tyxTfz6Ba28HLABBBZmuryVPhDJqp1CIYpy18NeWzRIbAWXogtcsoYuyyuk/QKbw2p Ir0NTXv13C3EgWCaJI2NvydaPdP0k4+HFiZf30UhZD/wDzHLBHzONCJTBmZn5YbQyb 0tdUkxmTY98UKpjI9f8SVHSULoQefaNPcR7ods/6GQS503ZyOIODHjuNqH9r3CWA6f GGhg6gpoJiZ3XUJw1k0yexM29VYDEVCqHC0mUlkNFmyzSl++rMz2omn5zGlQOIFnpc nvMxyaNLUq7cw== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id C7717180057 for ; Sat, 17 May 2025 23:20:18 +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_MISSING,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: Error (Cannot connect to unix socket '/var/run/clamav/clamd.ctl': connect: Connection refused) X-Envelope-From: Received: from mail-ed1-f53.google.com (mail-ed1-f53.google.com [209.85.208.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 ; Sat, 17 May 2025 23:20:18 +0000 (UTC) Received: by mail-ed1-f53.google.com with SMTP id 4fb4d7f45d1cf-6016d401501so2837940a12.2 for ; Sat, 17 May 2025 16:22:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tideways-gmbh.com; s=google; t=1747524147; x=1748128947; darn=lists.php.net; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=AdvqpnSZbn4ABLWTdZt9eHzse3UL/E7HawACy+WyQ6Q=; b=McImg2qRFS2K0IFA/dhfKRFZ5z0fSvNrDeICq4drZrRnZHH4+ghMB3BiAEhTOl91Pb oTHLzCkf8RAv1b3qvnz+p4XcUyGoIEoOmhvLm8OFDT/IsNjn9mDxqUtq7qnY+FOvz3QC xNhfc+TspYn89JTNVsJ6AM18Pz8PmyzVqAniNi4XBC9SGJNOmYaF9bS4QEHaIosuuXPm asG2HCTM16jt1KUsfd+bO+ueCjVUBOjjYNHIjSdej8GdoKtOz9QVQdXrKL/FFB7y0lNJ R8rsQ3NLVKG2AvLTkS6+Isih2rWF5eDM2Sm9xHtt3C2SFSmT/UFVUkTol3YrBSOGEpez i2tg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1747524147; x=1748128947; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=AdvqpnSZbn4ABLWTdZt9eHzse3UL/E7HawACy+WyQ6Q=; b=dDl1h7UfjGtLABEF92aCm8Tg5AG/J/vV0CPNKdaPh/9XBs4qxk1rYTTdLDTh+ZQ51f /DSGI9cwfMUKZHV5gAVWpUbEQ4tduTBRibaLSqNHtkfdquedJ9oH5ijUpvf/bU1heATY EnAE05CoFZBifGz1sni8VnfH+COjJyQFRzdKuyJOOZtmNRNTZCQnWo6PUfSOrIr/O3sa MIR39JM7OJwd9/CCIlkXTudncSocCB7GnDGgY01VjNJoLUPMuhvofZCPDG707B2Xpy/1 F1FLA9IgJfcl+X8Ca30ReYQ4Wj9sw5z6DK67nlZcIKdvSsU6Y7jPjNRF993lhbCOIBih P7Ug== X-Forwarded-Encrypted: i=1; AJvYcCW/r5h/s+DN2AfRKV6tVomgHzMVzmu8mWlX5B407Vyl0fs8afhFyy0PqMxjLHbsm9RS8J3/+Gh+1Bs=@lists.php.net X-Gm-Message-State: AOJu0YyhjKuiRUPk8F6uGP1KWKfbrKrwtIr5/dKYeYyNXGvRc+t1d52h hl7ndOs61vvsUQosD18ObfIuY+92+9ei1q4wxUMPdW7qh7z3NHDY/LGNbDb6Zi5ntWpAlWwbYnx y1kfPCicg0UuD7ByJq1I88GsO1d2+f1awu2VSAqvnDg== X-Gm-Gg: ASbGnctI8MOivj75tY37uk47WD1sPexyjQSHORzw4CbIyipfHmJQZQW9ud5NPXDWs86 qL76VpTGdksAVkGYMCobUfmQc45kldG9+M5/2jqhYI6pr/ulQUASNgrVZ41FsGHkvdvpbQzYQfA WGagdi7tVLK1sc5HlDw/FLU5Rnr38OUhlF1H3W9UpnvqbB5KqJVMPSkevX+4Io2kE= X-Google-Smtp-Source: AGHT+IEy8sVUiCYWoGJdrdpd8QSr438v7jJzIQYhlFYVAXxoQO5Z44jaFnXE5GpWHxnvgopJKRlkSa+OovEtmYl2PXg= X-Received: by 2002:a17:906:c9d5:b0:ad5:394d:60c3 with SMTP id a640c23a62f3a-ad5394db586mr515886466b.40.1747524147047; Sat, 17 May 2025 16:22:27 -0700 (PDT) Precedence: bulk list-help: list-post: List-Id: internals.lists.php.net x-ms-reactions: disallow MIME-Version: 1.0 References: <4a703db4174763586d84b9bf5606ff31@bastelstu.be> <956887e5b66e2b43459b999ebac2069d@bastelstu.be> In-Reply-To: Date: Sun, 18 May 2025 01:22:15 +0200 X-Gm-Features: AX0GCFssYYY_H_NNYDQVR6jkJjA6FIK_S2_TY9d_gWkIpplYucIMh5yIHWjjqh0 Message-ID: Subject: Re: [PHP-DEV] [RFC] Clone with v2 To: Nicolas Grekas Cc: =?UTF-8?Q?Tim_D=C3=BCsterhus?= , Larry Garfield , php internals Content-Type: multipart/alternative; boundary="00000000000005835706355d2c6a" From: volker@tideways-gmbh.com (Volker Dusch) --00000000000005835706355d2c6a Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Fri, May 16, 2025 at 9:41=E2=80=AFPM Nicolas Grekas wrote: Being able to update a readonly property even if __clone already touched it > looks critical to me because otherwise, it'd mean that adding a __clone > method after publishing a first version of some class that has no __clone > method would be a BC break. > Great input. Thank you Nicolas. While this only applies to `public public(set) readonly` protected readonly properties that are also then *touched* in the new clone method, it is indeed an E_FATAL with the current implementation. For these cases, that would indeed be an annoying gotcha, even if I don't have an example at hand, it might make sense to me to account for it. I'll update the RFC and publish a changelog on Monday, and I'll mention that there once I had another look at the implementation. --=20 Volker Dusch Head of Engineering Tideways GmbH K=C3=B6nigswinterer Str. 116 53227 Bonn https://tideways.io/imprint Sitz der Gesellschaft: Bonn Gesch=C3=A4ftsf=C3=BChrer: Benjamin Au=C3=9Fenhofer (geb. Eberlei) Registergericht: Amtsgericht Bonn, HRB 22127 --00000000000005835706355d2c6a Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

On Fri, May 16, 202= 5 at 9:41=E2=80=AFPM Nicolas Grekas <nicolas.grekas+php@gmail.com> wrote:

Being able to = update a readonly property even if __clone already touched it looks critica= l to me because otherwise, it'd mean that adding a __clone method after= publishing a first version of some class that has no __clone method would = be a BC break.

Great inpu= t. Thank you Nicolas.

While this only applies to `= public public(set) readonly` protected readonly properties that are also th= en *touched* in the new clone method, it is indeed an E_FATAL with the curr= ent implementation.

For these cases, that would in= deed be an annoying gotcha, even if I don't have an example at hand, it= might make sense to me to account for it. I'll update the RFC and publ= ish a changelog on Monday, and I'll mention that there once I had anoth= er look at the implementation.


--
Volker Dusch
Head of Engineering
Tideways GmbH
K=C3=B6nigs= winterer Str. 116
53227 Bonn

Sitz der Gesellschaft: Bon= n
Gesch=C3=A4ftsf=C3=BChrer: Benjamin Au=C3=9Fenhofer (geb. Eberl= ei)
Registergericht: Amtsgericht Bonn, HRB 22127
--00000000000005835706355d2c6a--