Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:125442 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 F208E1A00BD for ; Thu, 5 Sep 2024 19:14:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1725563809; bh=IegfzQ+8vq691XMZUPVZwjjT+7DKgbxGg8TmB5f7Mng=; h=Date:From:To:Cc:In-Reply-To:References:Subject:From; b=LIDyCLH6IKDejkf8Nf8RZK/kGTVBRIebTGBRjub9u4+ZC395YWwIyUR7xXXpZJ/Ah mjjOQttgwORl97Y2BSBhp9HVxKHzXnCR167Ut339m2Yj3aTccJphdW7CZchbagaC6o /hQ7dpTZ24UlGlr9TXLiqrmbu977XSGULTysw4BQkmssptc9XloiUZB401GRavnczh /akN9YUbf2zhvYhxLQU8xizsy5g1Svmf591aXXy7Gj3d2GJ1J5OzSr/Gxa4UQ40pVg 8r6yQLvILRBDMH8J5W7N5buNY/um2BWqLe4Oz0K74uA9yCIh72YWHvZ13z2Becscu8 CXitSrp4V8eJw== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 6A89D180032 for ; Thu, 5 Sep 2024 19:16: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=0.8 required=5.0 tests=BAYES_50,DKIM_SIGNED, DKIM_VALID,DMARC_MISSING,HEADER_FROM_DIFFERENT_DOMAINS,HTML_MESSAGE, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE autolearn=no autolearn_force=no version=4.0.0 X-Spam-Virus: No X-Envelope-From: Received: from mail-yw1-f177.google.com (mail-yw1-f177.google.com [209.85.128.177]) (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 ; Thu, 5 Sep 2024 19:16:47 +0000 (UTC) Received: by mail-yw1-f177.google.com with SMTP id 00721157ae682-6d47d860fc4so9647717b3.3 for ; Thu, 05 Sep 2024 12:14:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=coggenterprises-com.20230601.gappssmtp.com; s=20230601; t=1725563689; x=1726168489; darn=lists.php.net; h=mime-version:subject:references:in-reply-to:message-id:cc:to:from :date:from:to:cc:subject:date:message-id:reply-to; bh=IegfzQ+8vq691XMZUPVZwjjT+7DKgbxGg8TmB5f7Mng=; b=Dli+TsbgDbzkAR+7SnZ+VTKXdZwwnXfgXlo8dPhSIkjBKUTBDhdNHPwI8nnq1OnXr6 u3AumFexzwIvFLHHnndHhSFGJjxauHw+95h46PNelvccgQ1Foc9RZLVrDoFfoLH1yGBG K0OdQRgFWRh6Dfjwp0XTz3OZ5BWloBJr4Ep5OWm0Ty2FKC0CiUKFsY91059HJ2IUnnqu 2wWJDWjPu+0rPvXDLbtHA8f7EdJivILIqcp8F9NCUuCh6Mng78A9oAHimwEsoDeyZDIC v1Ex7aa5YHTAkA1V/2gpbv4a7Qql77zm7xjeWIzVTFBWbhMW3YyHFAxCTlXk9WPCb3sT njrw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725563689; x=1726168489; h=mime-version:subject:references:in-reply-to:message-id:cc:to:from :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=IegfzQ+8vq691XMZUPVZwjjT+7DKgbxGg8TmB5f7Mng=; b=HdgK6iiU4flGBKUkcSImNYxX6Ua8C+LGMUU2MMZ0lHxNqmWAmtAffApxNZcIF9BpMY lbtHHdhpLM+aQhpwvox/DR3U8P0H5wo/Utj0urGwL5nDc9+0t23AhZ2SiX9iT+I0CNYo +VkSRuLQFR0DuVnsn+Dav4vdE/Wi2/J2+C1I09W6d4ItNB77YMxVxtP4q9eFRdK68O/4 NLX0Ph7oUdmFZOXzJObW576ZEr8YgzUczeBAbPRlhBj6vKWA7qToY43HWx1dUqwGYA/U XboGunTnrtXn4CMRtISIBq6SHMMZEuCcvBm1tt/2E3Tl0ET8uQaCi30cRaZejhZLGuBY i/uw== X-Gm-Message-State: AOJu0Yx+cC14YcyUKA58EjNs/L0BUIqluW3kx7r7YMAxIeo3TMoQ7VVo WUUmxvn0aFaxaJApMWFiC+IGBYNBC2UUz3MH7wSr7Jddtl11N5yzcNqWYkVfdR1OglLI9Eqv0L2 w X-Google-Smtp-Source: AGHT+IGmGhekAOxbehlb81fD8s/+XOoxZ5Yp59P8rNWMr60NjAryPXkIN+6I6TZwe5odUjGBfcVfvg== X-Received: by 2002:a05:690c:b:b0:66a:843c:4c58 with SMTP id 00721157ae682-6db452c2820mr2006397b3.34.1725563688578; Thu, 05 Sep 2024 12:14:48 -0700 (PDT) Received: from Johns-MacBook-Pro-2.local ([98.97.18.57]) by smtp.gmail.com with ESMTPSA id 6a1803df08f44-6c52031527csm10072656d6.75.2024.09.05.12.14.47 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 05 Sep 2024 12:14:48 -0700 (PDT) Date: Thu, 5 Sep 2024 15:14:46 -0400 To: =?utf-8?Q?Rowan_Tommins_=5BIMSoP=5D?= Cc: "=?utf-8?Q?internals=40lists.php.net?=" Message-ID: <5D9EE367-6D93-4E7A-853E-855EE202D8D8@getmailspring.com> In-Reply-To: <1adfd0cd-416e-44e6-8d4b-7061a31199b0@app.fastmail.com> References: <1adfd0cd-416e-44e6-8d4b-7061a31199b0@app.fastmail.com> Subject: Re: [PHP-DEV] RFC: Deprecate json_encode() on classes marked as non-serializable X-Mailer: Mailspring Precedence: bulk list-help: list-post: List-Id: internals.lists.php.net x-ms-reactions: disallow MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="66da0326_327b23c6_15a82" From: john@coggeshall.org (John Coggeshall) --66da0326_327b23c6_15a82 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Content-Disposition: inline > So if we had a #[NotSerializable] attribute (which I agree might be a good idea) it would be implemented by setting the ZEND_ACC_NOT_SERIALIZABLE flag on a class definition, and if this RFC passes, it would automatically apply to json_encode() as well as serialize(). > My mistake, I haven't familiarized myself with some of the more recent engine changes but this all makes sense. My point was more to ask the question "Would it be reasonable to expand the scope of this RFC to introduce a #[NotSerializable] attribute along with the rest of the proposal?" Coogle --66da0326_327b23c6_15a82 Content-Type: text/html; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline
So if we had a =23=5BNotSerializable=5D attribute (= which I agree might be a good idea) it would be implemented by setting th= e ZEND=5FACC=5FNOT=5FSERIALIZABLE flag on a class definition, and <= /code>if this R=46C passes, it would automatically apply to json=5Fencode= () as well as serialize().

My mistake, I= haven't familiarized myself with some of the more recent engine changes = but this all makes sense. My point was more to ask the question =22Would = it be reasonable to expand the scope of this R=46C to introduce a =23=5BN= otSerializable=5D attribute along with the rest of the proposal=3F=22
Coogle
--66da0326_327b23c6_15a82--