Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:122087 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 86446 invoked from network); 3 Jan 2024 07:12:07 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 3 Jan 2024 07:12:07 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1704265958; bh=AiaExd45iBM2pbIVzeMlUkbPsOH1Crgvc6GeO7wi46g=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=Sp+bLcOIme6TRDCyKicgfoJjXYNar4uUy/rLqWqeqLnJdUS12Kq8C8rLAVrenuA/I U+HYqo529ojadFbLxbqQIDajN6czeRkIuhduUjhA3haLcv5jrnR4bt0x5dCUs1xxsx 9DehwBCD0v9vYPyfgR3vnCiIkbRZwRxku91++qoMRqSlsBHCdji433n4HMFvcKS/RR CZOB1J/6FJvfj6xsGLUYWaAshzZEPhblw5KUNTcgrFZlDTPi3WNeY2eYhJVU9HgWQj DXqiIr7RlTdxwmEmyGG9MhYlLW2vFJzMKyOVq3712PAAHJ/+bO/mbVr/E8CP/OEQyE kK2VHy511/YfQ== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 71CCE18005B for ; Tue, 2 Jan 2024 23:12:37 -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=-1.2 required=5.0 tests=BAYES_20,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-lj1-f169.google.com (mail-lj1-f169.google.com [209.85.208.169]) (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 ; Tue, 2 Jan 2024 23:12:30 -0800 (PST) Received: by mail-lj1-f169.google.com with SMTP id 38308e7fff4ca-2cceb90b398so46153091fa.3 for ; Tue, 02 Jan 2024 23:12:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1704265919; x=1704870719; 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=AiaExd45iBM2pbIVzeMlUkbPsOH1Crgvc6GeO7wi46g=; b=MdYDkc0cnfwcbmnpcwzaDVO42l8smgayO+fHSmueCbhFmATdQLWCYMPorBKszpf2SF Fjd0VV1DdvKqcXRA8UOLnHYQ+4HgqevlVCdvQbe/Wr2S7IzQWkxp47YObjrUoDQigphk gcGshQmmsae6qOO+zOJj3SlgFqqn8k1SUB3y6HfdEHjGdCoVvwwy9qxdgsDeap2wPfeG G0sRsKTFNe3n5K7YZK0scKtJqQgf88NS65Vc4vuAq60zwVaBjMxQmbYclty3SOcT2S9b H03zCfhB8VNmyOnDyDMjBuPJdZ1wzaquivArojMzbC0tiO/AUZXhj+Dgha2i+lNwb/kH N6gQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704265919; x=1704870719; 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=AiaExd45iBM2pbIVzeMlUkbPsOH1Crgvc6GeO7wi46g=; b=aJc4KRcn9IBLdnBFBDSBzmct+pmf2NophTng+qaq+AMS9ETC8zaP/sdisz4JNpOr/p aqAEAh6Q8xq+NAsVBHs/OhqWnZXKcGibKeTnLxmyIlT07lD54sXu0BRzlfUCizmqbHeG 6B6DsuPmv/MyZVF5jgJvUdI4n+gYVhSqNwu6yTEbo7A2surrLqbmnLRvff4iG/F75PLl FNj1ag26gc+js9YhAnr/isy78x58KADAXRcZ84wJ05zpGY+LgFlAbN3CGdheCW7lFSGY 80D3t77Qf8ql0ROzmbQJPkD2WhL8YxAxPiOq9DuPpjJExQ+70U9DUcr6gPXayFLt5niZ ZMbA== X-Gm-Message-State: AOJu0YyvvTul1laI6SoXCyFlTjW8HGUI9qd7EWZNeq1O6zPt8D5elHIf xqeYRiKhxwQjTKhevxBBz6B35lLqCWWrPcBckhw= X-Google-Smtp-Source: AGHT+IG/0lk3/dBn9HYlJ6wujhh/uDaCNISIyrODFzUfclfXXKXgWQWRCYnH1BDoQiy8Mo3KSC0WTOaPFVhj1yNYvYk= X-Received: by 2002:a05:6512:3da6:b0:50e:7bf2:6a with SMTP id k38-20020a0565123da600b0050e7bf2006amr6930128lfv.88.1704265918290; Tue, 02 Jan 2024 23:11:58 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: Date: Wed, 3 Jan 2024 08:11:44 +0100 Message-ID: To: Max Semenik Cc: Internals Content-Type: multipart/alternative; boundary="000000000000a99ec5060e05543f" Subject: Re: [PHP-DEV] [RFC][Discussion] NotSerializable attribute From: nicolas.grekas+php@gmail.com (Nicolas Grekas) --000000000000a99ec5060e05543f Content-Type: text/plain; charset="UTF-8" Hi Max, Hi, I'd like to propose a new attribute, #[NotSerializable]. This > functionality is already available for internal classes - userspace should > benefit from it, too. > > The RFC: https://wiki.php.net/rfc/not_serializable > Proposed implementation: https://github.com/php/php-src/pull/12788 > > Please let me know what you think. > Regarding the inheritance-related behavior ("The non-serializable flag is inherited by descendants"), this is very unlike any other attributes, and this actively prevents writing a child class that'd make a parent serializable if it wants to. To me, if this is really the behavior we want, then the attribute should be replaced by a maker interface. Then, a simple "instanceof NotSerializable" would be enough instead of adding yet another method to ReflectionClass. Cheers, Nicolas --000000000000a99ec5060e05543f--