Re: com web/bugs: Add .editorconfig file: .editorconfig

From: Date: Fri, 14 Dec 2018 14:35:07 +0000
Subject: Re: com web/bugs: Add .editorconfig file: .editorconfig
References: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15  Groups: php.webmaster 
Request: Send a blank email to php-webmaster+get-27567@lists.php.net to get a copy of this message
> But why should there be a wrapper in the first place if we use > straight PDO? The wrapper doesn't add anything besides the exception > of a better escaping method. If the wrapper is for unit testing, then > I still wonder why as its already well tested in php-src. Like Christoph already mentioned about the PDO wrapper being written prior to all these changes, two main reasons why more abstraction, wrapping into its own classes, and more: 1 - Chaining methods was implemented (this is one very nice and major addition actually). With using raw PDO class and object, this would not be possible: $dbh->prepare($query)->execute()->fetchAll() All these statements can be really one liners actually. Even further in majority of the SQL queries across the apps there is only a single most important method to be used and can be wrapped into a "run()" or similar which combines prepare() and execute() and query() when no arguments are passed. 2 - And further option to extend this more and use an Adapter for implementing configuration... But this needs to be rechecked a bit. PDO wrapper is already smart enough and should stay, however it should be slightly fixed... Pull request to address this particular issue is in progress here: https://github.com/php/web-bugs/pull/60 -- Peter Kokot

« previous php.webmaster (#27567) next »