Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:129025 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 A9D501A00BC for ; Fri, 31 Oct 2025 12:23:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1761913408; bh=oUwGoMLqGlt6mOMgeEKjOcPGaYh+VQ+x7LBDoXJyHeA=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=JVvEp9May7IqXm13PDh2O7DODpqCMqIsHprIZ5T7iOKiE+qPvzyqJYz8AEPCwCy7g 1Xyyf7FMSI/OL9ateLO7L2BhY1uvp+qC1q98vufCRCMW7XNoR5tNvab7rY0uL5jbIs AQK8F24GWL72Gfy4in7ey2CzM1lxUfeP2f/X7TAeqZLqw8/x/eMaXhL9LF5uCceApv qPYPJNDBaIjJO+BSkogMpuHC0RA7Uf0JWrRjrwJIBcNVjuxjMHnp4AZQXYQICjSF0J xOdgT+1AbL0Iz22okSgsa7mYc+PhL71nQWX02xipZ3gV2Uvo0yB6SpKHP/NQOuXswk 89Snoow8talZg== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 4055718003F for ; Fri, 31 Oct 2025 12:23:24 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=-0.2 required=5.0 tests=BAYES_20,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,DMARC_PASS,SPF_HELO_NONE, T_SPF_TEMPERROR autolearn=no autolearn_force=no version=4.0.1 X-Spam-Virus: No X-Envelope-From: Received: from chrono.xqk7.com (chrono.xqk7.com [176.9.45.72]) (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, 31 Oct 2025 12:23:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bastelstu.be; s=mail20171119; t=1761913397; bh=9pbAEhBU0bya8+d3a9E47Aidnv4gMIYFkL0nS04MI8Q=; h=MIME-Version:Date:From:To:Cc:Subject:In-Reply-To:References: Message-ID:Content-Type:from:to:cc:subject:message-id; b=TqfR8XSLgtI+MWUHXQC4bRXeGfJF0Qazgv5ppDksJMS99hJO0L9qROfHpsl4Qgtox c87BmCN30M2D3aasrucUFhTQ5fBMMIEQmCGAdUUi8Ie2a6kdYjLrmD9QF0LNa6B5ia eJUFe7s90N9ALnHPJxqUV7hyP5qX5pgYpoouuGzK1voVvTOV07VlSOUjfkUkR+RmIG qlAAdtWUdlqSVZjIJf1wp/kE2vWZKAjeAXjx5eij+3i7cJHoRcWuAxjnG05CHh86Ww sLmV1kebBJeHRL1oDuH2KAzp9VRGHB+p1T02+c1Cs14ftaOMj2b11jM/nKYYd8yfFN LySIpfH/J3GbQ== Precedence: list list-help: list-unsubscribe: list-post: List-Id: x-ms-reactions: disallow MIME-Version: 1.0 Date: Fri, 31 Oct 2025 13:23:17 +0100 To: erictnorris@gmail.com Cc: Dmytro Kulyk , Ilija Tovilo , PHP internals Subject: Re: [PHP-DEV] [RFC][Discussion] Add #[NoSerialize] attribute for excluding properties or classes from serialization In-Reply-To: References: <4b6abc36d8ab6cd306e95141869db3b0@bastelstu.be> <21ff8dee5016a1b7ecc412c44233abd1@bastelstu.be> <3a20b5ef66fc23de6bad022685b41190@bastelstu.be> Message-ID: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit From: tim@bastelstu.be (=?UTF-8?Q?Tim_D=C3=BCsterhus?=) Hi Am 2025-10-31 13:16, schrieb Eric Norris: > I hope I'm not starting a bikeshed discussion, but I've been following > along - can I suggest "DoNotSerialize"? "NoSerialize" sounds odd to me, > whereas "DoNotSerialize" can be seen as both an instruction to PHP - > "don't > serialize this property when serializing the class" - and an > instruction to > developers - "do not attempt to serialize this class". I don't have a particularly strong opinion on naming, but I'd like to note that #[\NoSerialize] is in line with #[\NoDiscard] (added in PHP 8.5, https://wiki.php.net/rfc/marking_return_value_as_important). Best regards Tim Düsterhus