Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:97944 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 28272 invoked from network); 24 Jan 2017 09:44:46 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 24 Jan 2017 09:44:46 -0000 Authentication-Results: pb1.pair.com header.from=nicolas.grekas@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=nicolas.grekas@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.223.171 as permitted sender) X-PHP-List-Original-Sender: nicolas.grekas@gmail.com X-Host-Fingerprint: 209.85.223.171 mail-io0-f171.google.com Received: from [209.85.223.171] ([209.85.223.171:33768] helo=mail-io0-f171.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id F6/87-00729-E0227885 for ; Tue, 24 Jan 2017 04:44:46 -0500 Received: by mail-io0-f171.google.com with SMTP id v96so67946971ioi.0 for ; Tue, 24 Jan 2017 01:44:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=3wuo6nB2QqDibAQNNoJht8rnLGpz32B/8lD3BCyuG5k=; b=AQYuG1DcCpB5uH+6tifStnm/FObfSM4OxDDxEKmoXe5D9deJ965u53x34nOr7RoOU0 XOE0ns7bydPQceXoFdv1FUJJboaA8qsD4OiH9n06lzhy6pLTz8KbixtxqE+vmlbCM5Ey z721F1kDd4madDzQFCo5cwjtvb0MZx9cJrgwa7zIpmne4IusWO6SnBJffwjUSdMHzQiD 0reSlc68Y4J++wKYkyzzuTYzvORFuAiwZJnNBtxp0/QKD+0lc/hOMoEUcB8EN1hOiyov 3p+c4RFq5ZZTs0tw8gbEYU+nGG98e1CKfzs3Fl1/RBU3l2c3LpSNpINEnq8yFnuLcMX7 OJ5A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=3wuo6nB2QqDibAQNNoJht8rnLGpz32B/8lD3BCyuG5k=; b=VyaN4MzKURyXr5kjzVY0Yp0JsPBRp33nQMt59EOwnb/E+YWMSC7o4qHV5ZClPonBMR DrdqZIzoYLBpVnbvGnGMRDzmtHPl8hzWjjjl+MMMCgEy23aNEKuOL2IOaXWgWdGBzNi4 oXgNmCu8oQMMlGyn4KdrSLT8xcdNW1lFHo+bSi8nXG+FdIRtm4pZ2MPkvUwEwdGbFKnk b56CoiX/Gq7YotfrXZ5XL4A+L9aBapkQV96jZWPydx64A/YZDn4adOnXEfneFwPcPs/l 23ViSvH0bZ6G4UUXGnNSsSMxlb+1v+z2JmY/YdYtoU6Unk+PjrXHvuMqKUVZcNlNDa/m u0Dg== X-Gm-Message-State: AIkVDXL2jA25t6rSyYtDUAij6pZ9d1SGCjjJV829hsyBMDW5FyncQtuEF5i7PwXb1zxupNZI7SfspLP1sNYmzg== X-Received: by 10.107.6.156 with SMTP id f28mr27587491ioi.6.1485251083367; Tue, 24 Jan 2017 01:44:43 -0800 (PST) MIME-Version: 1.0 Sender: nicolas.grekas@gmail.com Received: by 10.107.130.38 with HTTP; Tue, 24 Jan 2017 01:44:22 -0800 (PST) In-Reply-To: References: Date: Tue, 24 Jan 2017 10:44:22 +0100 X-Google-Sender-Auth: vsFPsJ29k-HF7Dl1na5eLStMAHg Message-ID: To: Nikita Popov Cc: PHP internals Content-Type: multipart/alternative; boundary=001a113bd5dc39fec30546d3f789 Subject: Re: [PHP-DEV] [RFC] Deprecations for PHP 7.2 From: nicolas.grekas+php@gmail.com (Nicolas Grekas) --001a113bd5dc39fec30546d3f789 Content-Type: text/plain; charset=UTF-8 Hi Nikita, hi all, https://wiki.php.net/rfc/deprecations_php_7_2 I just realized that in Symfony, we use the $errcontext argument of error handlers to work around the limitation of __toString not being able to throw. Excerpt from https://github.com/symfony/symfony/blob/master/src/Symfony/Component/Debug/ErrorHandler.php#L439 : // Here, we know trigger_error() has been called from __toString(). // HHVM is fine with throwing from __toString() but PHP triggers a fatal error instead. // A small convention allows working around the limitation: // given a caught $e exception in __toString(), quitting the method with // `return trigger_error($e, E_USER_ERROR);` allows this error handler // to make $e get through the __toString() barrier. This is a hack, but that's what the Debug component is about: leverage several hacks and ship them as a set of useful experience-enhancers to devs. In short, I'm all for deprecating $errcontext, and looking at the ongoing vote it'll be accepted soon. BUT, it would great to fix the inability of __toString to throw in 7.2 also. Regards, Nicolas --001a113bd5dc39fec30546d3f789--