Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:121977 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 59560 invoked from network); 9 Dec 2023 17:16:01 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 9 Dec 2023 17:16:01 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 32E31180038 for ; Sat, 9 Dec 2023 09:16:15 -0800 (PST) X-Spam-Checker-Version: SpamAssassin 4.0.0 (2022-12-13) on php-smtp4.php.net X-Spam-Level: ** X-Spam-Status: No, score=2.1 required=5.0 tests=BAYES_40,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,DMARC_PASS,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,RCVD_IN_SBL_CSS,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=4.0.0 X-Spam-Virus: No X-Envelope-From: Received: from mail-wm1-f44.google.com (mail-wm1-f44.google.com [209.85.128.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 ; Sat, 9 Dec 2023 09:16:14 -0800 (PST) Received: by mail-wm1-f44.google.com with SMTP id 5b1f17b1804b1-40c26a45b2dso17176875e9.1 for ; Sat, 09 Dec 2023 09:16:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1702142159; x=1702746959; darn=lists.php.net; h=content-transfer-encoding:mime-version:message-id:references :in-reply-to:user-agent:subject:to:from:date:from:to:cc:subject:date :message-id:reply-to; bh=+LQk9IhQN9zlukPKBsHnp+uCh+3A6WXIHWtVe+7Dykk=; b=kVUd2Cll97sMqiNmaPClgWC+RinP0VHbWGC0EtM2IPB0DWc6MM62PXvLBIXuldBybN s79Mpw9rfTW7TpSsS2oXlkswNFGFMT2VFpGs/V6DGuTAUKnHJ3Qwr2UcYJUSyxonYve6 /ij5e+wUrg4CiPXFvPAgbuax3OehTlGJCnSoBuQx5Fu0yNTxM/7YpUjHAPBOe0tVJbvo Rp3dtVXiyP40iHOKDHbC5UZNdZ3hav203v8QJz58Y5+1CGmtK/ZyRy734ZRKyKFiPKkt 3BwroPUdI2+K/jXhWhU+sueAFpreeDNItVye1vFmhYYJ8srMKy4BZ/3U6yIVW3SaczNu IR6A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1702142159; x=1702746959; h=content-transfer-encoding:mime-version:message-id:references :in-reply-to:user-agent:subject:to:from:date:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=+LQk9IhQN9zlukPKBsHnp+uCh+3A6WXIHWtVe+7Dykk=; b=nqmStC/dOpcaSBQuBfLO6wpsLnBYLV43PO80wi7hgSccKIoyT/dycbiux3VefvM4+k ZEVituAk/bWqN0i5FtF+cLzGHt1gBPfcR+4/1z+kLnQ9nGQUwdiQ0wd0z2IBebdDOHG3 MAlVQcTvBMq91yDM3gs3wrIVnvYhB5+T1ps/zoI5TeOUE+8ygyIjJHohPUDDXx534qg/ VP+yvXHWfX6/lRw+TF4PHA/HItKQcm8Lav5uzljg2JJzB1GSbZWErqIHlubOqniJNQYY basXeFjnyjxakHRMuI6rIaWVRxmMBqywS4FRRJ76/wbWHkJlB59ZE7LI9VLLBpA9jfMC MJxw== X-Gm-Message-State: AOJu0YxcF77nF60uNjay9+cpJltao7r12TltON7wnATJ7IAZ6A05UK2u F131KUd1+8j/UWoHeyAoQ4Br1L4026lVKw== X-Google-Smtp-Source: AGHT+IH694ef/3KdtmjAUDphFbNWIdDYnbf88J87ut+7WS1xhgqJa+SIjg1s8g4UBwGTXstY4tc5CQ== X-Received: by 2002:a7b:cb93:0:b0:40b:5e4a:2348 with SMTP id m19-20020a7bcb93000000b0040b5e4a2348mr992759wmi.74.1702142158717; Sat, 09 Dec 2023 09:15:58 -0800 (PST) Received: from [127.0.0.1] (92.40.171.98.threembb.co.uk. [92.40.171.98]) by smtp.gmail.com with ESMTPSA id n21-20020a05600c4f9500b0040b36ad5413sm6893258wmq.46.2023.12.09.09.15.57 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 09 Dec 2023 09:15:58 -0800 (PST) Date: Sat, 09 Dec 2023 17:15:55 +0000 To: internals@lists.php.net User-Agent: K-9 Mail for Android In-Reply-To: References: Message-ID: <54BE3A8E-046E-495E-B371-CCF917B6BB49@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [PHP-DEV] [RFC][Discussion] NotSerializable attribute From: rowan.collins@gmail.com (Rowan Tommins) On 9 December 2023 12:30:29 GMT, Max Semenik wr= ote: >Hi, I'd like to propose a new attribute, #[NotSerializable]=2E This >functionality is already available for internal classes - userspace shoul= d >benefit from it, too=2E If this ends up approximately the same as implementing serialisation as an= exception, it feels quite a thin feature=2E If you put __sleep and __wakeu= p as shown into a trait, it's already as short and explicit as "use NotSeri= alizable;" What would make it more compelling is if the engine itself could do more w= ith the attribute=2E For instance, a direct isSerializable() on ReflectionC= lass that covered both internal and attribute-marked classes=2E It would also be useful to have some interface for classes that are *somet= imes* serializable, because they contain open-ended collections of other ob= jects=2E An example being exceptions, which may collect objects as part of = the backtrace information=2E Such a class could iterate its contained objec= ts, checking if they are unserializable classes, or classes which should re= cursively be asked if the instance is serializable=2E Regards, --=20 Rowan Tommins [IMSoP]