Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:125438 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 911CC1A00BD for ; Thu, 5 Sep 2024 16:03:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1725552338; bh=aqXIpnAZACiNNgez80bH7Ipv/D3FJ6JZLivZxL9Sf7U=; h=Date:From:To:Cc:In-Reply-To:References:Subject:From; b=bsknDVP4skjegp8KxV/g1uLZyklYWMFMNl9JWO5bi2YWDdNLwbRUXNVl3UboP5zR6 2FtdauoqXJbsSELbyJFgRsVATV/8uw5NW/L/ZZL1XETOphlqihpmr0dflmnE7PciSM VsHUFxL6hAJp7Qjrw1xbNnWgHk/tCdM/BMSePrNpMRhm+WJy/Mw38sPtgekyqymK8w S614g9Hy/j4liTWCtHExV+ppSm/ualaiaBn8vzZ8gPhFjn2SxUKHSEaCdNWi8ERail lD9NLNkXEC0h9LS1rW86PvcYQaT+kRgtqVX1JGNYnwddR0awe1tf1N+nP+5RR8vg0S Z087FZOdbE/QA== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 1431218006E for ; Thu, 5 Sep 2024 16:05:38 +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-qv1-f44.google.com (mail-qv1-f44.google.com [209.85.219.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 ; Thu, 5 Sep 2024 16:05:37 +0000 (UTC) Received: by mail-qv1-f44.google.com with SMTP id 6a1803df08f44-6c358b72615so5423626d6.0 for ; Thu, 05 Sep 2024 09:03:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=coggenterprises-com.20230601.gappssmtp.com; s=20230601; t=1725552218; x=1726157018; 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=aqXIpnAZACiNNgez80bH7Ipv/D3FJ6JZLivZxL9Sf7U=; b=chtROZCJUf78axbNmDjcrNH2O/4/V4bap3448+g/fblIjtoy0VM531o8l09ar5bgeh PQIVP+CByrfwdoFSTEvMizB9GTQBqA0q50Lx1vDkb2Ts/eJEY4FoH8nBT7hljCsBwokc pIPYZBQQe2VV46CRfhq1VzE/lBccJ2VFQm9Bz8l9+ZB1kQVDgzueWaKar7PkI5G0+HZV OOhA7Nhzpf3B+WSgmdx6vPuB02lQoTx1po9tNawA4Y7+eHZIdmxI98oG9uUGXAAMQ6Ns pcmtTmnhdEy5Pw0q3Xm61i3v4HJJHXwJOLJTY/4lLjNutVSkMC5CPFzxKNGBDrkGigyF HPrA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725552218; x=1726157018; 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=aqXIpnAZACiNNgez80bH7Ipv/D3FJ6JZLivZxL9Sf7U=; b=grI10OaNtrbRsrd/Hc5ZhknZRsc77sfXv6Jj0h6CqBY7vpNt+oAKR/yoFsqAH5gsdk QtmqjUU5Bqel4zFQJVu/hsje3a2uImbwfnUomZ9q3dwznG2jVJW+i7PfaXffOigNc/TE 34NbV8ShE1KxwL/cdo/76vaT8VCx7Jdh6cNvQVkB7ZnQt+86Zvm7Ny8vnMkQIWj4njPL mFHeWjqLMTLMVvgfrRM0d0sVOu8YbtRjVBIDXYhNLoiDYPx2TkgoSifFto9LoiJWR5k1 ziBC0SRYNc3H8GZj0l5nCnusQQENdfJaZolOvxZ2Knpt7pQgPwprYJEFB9VGVJVQCetc FP1w== X-Gm-Message-State: AOJu0Yy4cncYHWgiMEvc9Mz8RuGkikpPzhTuGwKm2EMR2j5K5bQUSHYA 6m/P0D9ZMBBNc6nH7pZ6XRGEWYDnL2GYNYLM4PObWvVAKHSVIyCDa7mBeADXSRkZKI3FOO83xwk 9 X-Google-Smtp-Source: AGHT+IHNrIvR2HJavfl6DZDnLOrNFAhBz57FD9UMFv05lleWD7LjpWC0xpWlzN7/Vir84phsBKz6/A== X-Received: by 2002:a05:6214:4b09:b0:6c3:4c0b:df5c with SMTP id 6a1803df08f44-6c510d0ab33mr131832806d6.47.1725552218008; Thu, 05 Sep 2024 09:03:38 -0700 (PDT) Received: from Johns-MacBook-Pro-2.local ([98.97.18.57]) by smtp.gmail.com with ESMTPSA id 6a1803df08f44-6c5201e4bf4sm8654726d6.56.2024.09.05.09.03.36 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 05 Sep 2024 09:03:37 -0700 (PDT) Date: Thu, 5 Sep 2024 12:03:36 -0400 To: Philip Hofstetter Cc: PHP internals Message-ID: <98553A91-FD3F-4E1B-91D9-D8B00CAD5FC5@getmailspring.com> In-Reply-To: References: 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="66d9d658_6b8b4567_15a82" From: john@coggeshall.org (John Coggeshall) --66d9d658_6b8b4567_15a82 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Content-Disposition: inline > As per my previous email to the list, I have now created the official RFC to deprecate calling json_serialize() on instances of classes marked with ZEND_ACC_NOT_SERIALIZABLE. I would suggest we take a step back from this and look at it with a bit more of a wider lens. It seems to me that this would be a good place to have an attribute (e.g. #[NotSerializable] ) that could be defined for any class (with ZEND_ACC_NOT_SERIALIZABLE being automatically given this attribute)? It just seems to be a more holistic approach that makes sense, rather than basing it on internal engine stuff and/or limiting it to internal objects. Coogle --66d9d658_6b8b4567_15a82 Content-Type: text/html; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline
As pe= r my previous email to the list, I have now created the official R=46C to= deprecate calling json=5Fserialize() on instances of classes marked with= ZEND=5FACC=5FNOT=5FSERIALIZABLE.

I would suggest we t= ake a step back from this and look at it with a bit more of a wider lens.= It seems to me that this would be a good place to have an attribute (e.g= . =23=5BNotSerializable=5D )  that could be define= d for any class (with ZEND=5FACC=5FNOT=5FSERIALIZABLE  = being automatically given this attribute)=3F It just seems to be a more h= olistic approach that makes sense, rather than basing it on internal engi= ne stuff and/or limiting it to internal objects.

Coogle

--66d9d658_6b8b4567_15a82--