Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:129479 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 lists.php.net (Postfix) with ESMTPS id 9B36C1A00BC for ; Mon, 1 Dec 2025 10:36:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1764585419; bh=AKstfzbgBmvjtXZYRIogzBN6PETXNYc7MKLhuexB2G0=; h=Date:From:To:cc:Subject:In-Reply-To:References:From; b=aIk9jEEw0UuJBrroh+oRgQFjen8C3j30lwfae9H7NVrDlH0mtbyWPhmOlO/M9AWU9 SEQsNACiTWDnkcM1K5gCYNIuBvr7nwIaVvkGuNSr3z0x2FxtmjGSSviJcacNGpShaE e0HlgdwwBvpACX/GLiRIT2CSH3gakEP3EsDyN7RPT0qL3ccK5k0CbvtI8h3tUGEKKB A2E2LKSKiZ1ZHoaFmpUZRW6snW6IO0PV3AD8t/Jjx28rllocrG/G3YmPt0FSB3Pl3Z jMrYULT2idFQznbBssE9xCrbeb6RWrJ2ceb45vbMCPjhunJGPmYb0Xhvx/3pxAMMiv TG2dJX2VBkeTA== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 6375A18005B for ; Mon, 1 Dec 2025 10:36:58 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on php-smtp4.php.net X-Spam-Level: *** X-Spam-Status: No, score=3.6 required=5.0 tests=BAYES_50,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,DMARC_PASS,SPF_HELO_PASS, SPF_SOFTFAIL autolearn=no autolearn_force=no version=4.0.1 X-Spam-Virus: No X-Envelope-From: Received: from xdebug.org (xdebug.org [82.113.146.227]) (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 ; Mon, 1 Dec 2025 10:36:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1764585411; bh=AKstfzbgBmvjtXZYRIogzBN6PETXNYc7MKLhuexB2G0=; h=Date:From:To:cc:Subject:In-Reply-To:References:From; b=eUlqhLfzf6lnHlm4ZjvV4oneqbK0ipksJJcjTEqZ+np2Y7rCXgNvCyUqiIrruivpw C9lHY64h9EeeH+xEhX9ftE7CruN9nn9z9R/CJiSF12MHtJzVMgeXskBMIb335Ps5D0 OVOMHuQMk4Zy2eRrCJQxrUSM8R3PqfQ9I7Hz9I7dLDCFFDtvMX1uy3fyZ7eB/RLega ig92OdF63T1uY9PnggsIQj+YTeZm1ZgL0xeys4Ohfgrsy5D9fMVsIpewpzkL5n6+7A /4tlvOkVDSMJUTgTbIpraPdabDePeZD936hTfzYqmHgFt+tEqwRa6AIwDYr9U5kvbo mVOgozKZFkfsA== Received: from localhost (localhost [IPv6:::1]) by xdebug.org (Postfix) with ESMTPS id BE81310C033; Mon, 01 Dec 2025 10:36:51 +0000 (GMT) Date: Mon, 1 Dec 2025 10:36:51 +0000 (GMT) To: "Marc B." cc: PHP internals Subject: Re: [PHP-DEV] Possibility to include called object in exception backtrace In-Reply-To: <6f3167c3-b6e7-4f25-8154-ce20de7d3e82@mabe.berlin> Message-ID: <1c04232d-5a9c-16c7-b01b-1469d566aefa@php.net> References: <6f3167c3-b6e7-4f25-8154-ce20de7d3e82@mabe.berlin> Precedence: list list-help: list-unsubscribe: list-post: List-Id: x-ms-reactions: disallow MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="8323329-1609456599-1764585411=:29692" From: derick@php.net (Derick Rethans) This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --8323329-1609456599-1764585411=:29692 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: QUOTED-PRINTABLE On Sat, 29 Nov 2025, Marc B. wrote: > I have opened a simple PR to add the possibility to include called=20 > object in exception backtrace. >=20 > https://github.com/php/php-src/pull/20599 >=20 > This needs=C2=A0a discussion here to see if there are objections. >=20 > About the patch: >=20 > The patch adds the ability to populate the called |object| into=20 > exception backtraces. I do this in Xdebug (as part of https://bugs.xdebug.org/1562) and it's=20 causing some issues with fframeworks/applications that rely on=20 destructors being called at a specific time, or in a specific order:=20 https://bugs.xdebug.org/2222 The Xdebug situation is probably a little worse, as I keep that last 8=20 exception traces *too*, but I am sure this is going to trip up people. >=20 > Previously, only |debug_backtrace()| could include the called object=20 > in its frames, but |Exception::getTrace()| could not. This change=20 > aligns |Exception::getTrace()| with |debug_backtrace()| by introducing=20 > a new INI directive: >=20 > |zend.exception_provide_object (boolean)| I don't think that adding an INI setting (again) is a good idea. If you=20 want to make this configurable, it should be an option on=20 Exception::getTrace() =E2=80=94 INI settings make applications less portabl= e=20 (even though this is a debugging option). cheers, Derick --8323329-1609456599-1764585411=:29692--