Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:97346 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 66027 invoked from network); 9 Dec 2016 09:36:49 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 9 Dec 2016 09:36:49 -0000 Authentication-Results: pb1.pair.com header.from=php@beccati.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=php@beccati.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain beccati.com designates 176.9.123.236 as permitted sender) X-PHP-List-Original-Sender: php@beccati.com X-Host-Fingerprint: 176.9.123.236 box.beccati.com Received: from [176.9.123.236] ([176.9.123.236:48387] helo=box.beccati.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 6D/EC-12501-B2B7A485 for ; Fri, 09 Dec 2016 04:36:45 -0500 Received: from authenticated-user (box.beccati.com [176.9.123.236]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by box.beccati.com (Postfix) with ESMTPSA id C449E2001F4; Fri, 9 Dec 2016 10:36:40 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=beccati.com; s=mail; t=1481276200; bh=Qj2RQHOT1zIxP0OAB7Tln/aVr9R+k08O7qhPKKc84v0=; h=Subject:To:References:Cc:From:Date:In-Reply-To:From; b=YisqlBMwL22AQVt1NK6INONciO9iOELGYS4aBZdQWdhyB2jS3oDw30eLNKXJNbJBD bBKp43D8+M/a+ps5pqqmlrPBSyQgVAXqfhdbJB8L4M6MVeTQwwrX2gGyf4n5bs5jVA hka2qE8EOFfCfDUeGdVtAkfvI+dBnQRbirkD7pwkjieI6DPltc9xWZvpFc+AErkqQR rl9rtSRh/CBDDNGqx+PU92USfRqVx8KK791cHWr34EfJUjXY88QmfhwxAA6CmDW95F 1NWl5q41Y3A1yKFaSf14XiZekamRLBHBQ4tW2wCS/TJ7EloK/pIImHkIPrQ9d3bLJt RVtX+BL+RGaHQ== To: "guilhermeblanco@gmail.com" , Lester Caine References: <758680d9-cfe2-4a93-3831-7aa03b4bc9db@nunninger.info> <933676c1-e828-9eb5-405e-13242fee39a7@lsces.co.uk> Cc: PHP internals Message-ID: Date: Fri, 9 Dec 2016 10:36:38 +0100 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] Re: [RFC] Debugging PDO Prepared Statement Emulation v2 From: php@beccati.com (Matteo Beccati) Hi Guilherme, it's not really a new method. Just some more output to the existing debugDumpParams method, which is indeed available after execute() when emulated prepares is supported by the driver and currently active. The method output already depends on its location: before/after binding parameters. To me, this is much better than v1 of the RFC that was adding a new debug method specifically for this. That said, I think we should prepare yet another RFC to have the debug information optionally returned as array. Cheers On 09/12/2016 05:27, guilhermeblanco@gmail.com wrote: > Hi Adam, > > Providing my input on why I voted "NO". > Your proposed new method is not pure. This means it does have distinct > responses depending on where it's located in the code. > That's a big no-no for me. > > Cheers, > > On Tue, Dec 6, 2016 at 12:15 PM, Lester Caine wrote: > >> On 06/12/16 16:30, Adam Baratz wrote: >>>> This issue is not difficult to solve in userland, at least well enough >> for >>>> debugging in my experience. Here's an older example I wrote up on my >> blog >>>> that worked (but I'm told is broken right now): >> https://daveyshafik.com/ >>>> archives/605-debugging-pdo-prepared-statements.html >>>> >>> I want to be able to write .phpt tests that validate how values are >> getting >>> interpolated into emulated prepares. Since this creates a separate code >>> path, it wouldn't let me validate what gets sent to the server. >>> PDO::quote() doesn't necessarily produce the same output as >>> pdo_parse_params(). >> >> The whole point of testing is that it tests real results not testing >> 'test code' that tries to emulate the real world. The whole point of >> 'emulated prepare statements' is that it creates a SQL query that the >> target database engine can actually work with rather than one that a >> more capable database engine will process. Testing the innards of some >> driver is simply wrong, one tests the whole process is working! And >> IDEALLY the test suit for PDO should work which ever target is selected, >> but that is not lightly to happen any time soon. >> >> -- >> Lester Caine - G8HFL >> ----------------------------- >> Contact - http://lsces.co.uk/wiki/?page=contact >> L.S.Caine Electronic Services - http://lsces.co.uk >> EnquirySolve - http://enquirysolve.com/ >> Model Engineers Digital Workshop - http://medw.co.uk >> Rainbow Digital Media - http://rainbowdigitalmedia.co.uk >> >> -- >> PHP Internals - PHP Runtime Development Mailing List >> To unsubscribe, visit: http://www.php.net/unsub.php >> >> > > -- Matteo Beccati Development & Consulting - http://www.beccati.com/