Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:103073 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 26451 invoked from network); 10 Aug 2018 10:47:56 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 10 Aug 2018 10:47:56 -0000 Authentication-Results: pb1.pair.com smtp.mail=cmbecker69@gmx.de; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=cmbecker69@gmx.de; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmx.de designates 212.227.15.19 as permitted sender) X-PHP-List-Original-Sender: cmbecker69@gmx.de X-Host-Fingerprint: 212.227.15.19 mout.gmx.net Received: from [212.227.15.19] ([212.227.15.19:38773] helo=mout.gmx.net) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 1E/93-18754-95D6D6B5 for ; Fri, 10 Aug 2018 06:47:55 -0400 Received: from [192.168.2.101] ([87.167.201.185]) by mail.gmx.com (mrgmx002 [212.227.17.190]) with ESMTPSA (Nemesis) id 0LoE4f-1gPLa846Ar-00gEw7; Fri, 10 Aug 2018 12:47:50 +0200 To: Nicolas Grekas , PHP Internals List References: Message-ID: Date: Fri, 10 Aug 2018 12:47:50 +0200 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: de-DE Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K1:4KE5OjJlR0QWOrkbI/x6jXxglCodHua7jT1mUd0AObSG0kFoubD CB4SkW6nniGTlGIUjVAJdapKkQT4rmc8vD1YW/QJ8lFfAg/m3HhQN1Cyt6UQxo5l1DV3q9O 7bbZMPmReRSVGTO8hBwmPZ02GXuP0T+ipp4lKT76Gr+g472BBpOb0QtfpEGCi6DXbkBqYUe DQj0Ds9I7JaJzPRCeQmFQ== X-UI-Out-Filterresults: notjunk:1;V01:K0:+HSqnZjz4W4=:3lkuOICJIfssZRfWZCPw0l 902nnyv2rSAnoOHqSIQazCV30g0oscwP6m927pxE98V9ztRZwq1LK+Bz1+WEikOjDN76wlQ40 MH/0zbvQLDjDGIAu9EKG5nsEah1bkYwK3gQ6KjNhaXTEHU3NBAuSb4N5Eqz7Ma8vTN8WCFqCw fVwn5NKNpL+lAHAN4K0ytic0jJZKy1xo0m7ilNPWJnJNiZYtuQRDVbuFM3Gv2fxOJYDf191jg 7QlIVNgBbbJad6A/RpKud3KFT+gMIVAElYzMiulcBJXYi6aAAqM0svSwwaIIqfm+ndRkNKnBi bRR/iPnw7bm59+pCVu2QXBkiYSUhwrEtV73+EiVdgd+qyElEiJ4xoskLB6PUSRktTUfCyHZRh THL0O7MrI8klhJDi1Bn7RhaTb214k/9gEc4rlm3Na8CB0iGiEioztXeKoSNVRFhWTcqubkxEa BhSNfNhEkAYzIFKjaEPSaWzQFy8uS5A8VML/K0cxqh0VU/gu/AzH684meurKBzEbikeI/1s+f 9t76mFXjk7UuKf1xKlugPt8eVps2RN1Fn8wKEhbw+Zep6IooTDqXA0htbXUzo1r5y1lC684x6 0tKvofxSIsMYjXpjJ1MgkdASNgcyRCwm7Keh9Ww2t3f/hVuTpPt/xTfPm1Ysmx3yMKL1gcDK4 mPkN0NTectzfgNm42E7mKYWCeLnEAoBZPof8jje3jSedwC57BJAyPVBKLh6CfbmnHgebSMuXD JlOTfCak0b+nWcOGqx07PZPJKVegGf0j2bc1jkVUkbUN22GEtJY6L/zxbmT8Fd6Qapsnl2rTm GpHJhBt Subject: Re: Getting rid of PHP_Incomplete_Class and "unserialize_callback_func" From: cmbecker69@gmx.de ("Christoph M. Becker") On 06.08.2018 at 15:08, Nicolas Grekas wrote: > I recently submitted https://bugs.php.net/76681: Make unserialize() handle > a new "callback" option entry > > The full story is that I'd like a way to get rid of any > PHP_Incomplete_Class in my code. > The way to do it currently is to change the "unserialize_callback_func" ini > setting at runtime and define a throwing callable. But this feels like bad > design... > > Do we want a better way to do it? > > Note that this should also apply to nested calls to unserialize (since the > Serializable interface encourages doing so.) Thanks, Nicolas! In my opinion, a callback that is explicitly passed to unserialize() is much better than an ini setting, but not so much, if the parameter would have global state (i.e. works for nested unserialize() calls as well). However, that would not be necessary, if we add a replacement for the Serializable interface as suggested by Nikita[1]. [1] -- Christoph M. Becker