Req #74957 [NEW]: Introduce interfaces PDOInterface and PDOStatementInterface
| From: | aljosha dot papsch at vinexus dot eu | Date: | Thu, 20 Jul 2017 13:34:39 +0000 |
| Subject: | Req #74957 [NEW]: Introduce interfaces PDOInterface and PDOStatementInterface | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-210149@lists.php.net to get a copy of this message | ||
From: aljosha dot papsch at vinexus dot eu
Operating system:
PHP version: Irrelevant
Package: PDO Core
Bug Type: Feature/Change Request
Bug description:Introduce interfaces PDOInterface and PDOStatementInterface
Description:
------------
Classes PDO and PDOStatement do not implement any interface, making it
harder to add custom behaviour. For example, PDO does not handle
reconnecting to database, which is an issue especially in long running
processes. The best shot at implementing this feature is creating custom
behaviour classes with the same methods as PDO/PDOStatement (most of it
should just be adapter stuff). Unfortunately the custom behaviour class
cannot be used in functions which have PDO/PDOStatement typehint, making
them useless.
If PDO and PDOStatement implemented interfaces, it would be possible for
the custom behaviour classes to implement those interfaces as well,
making them interchangeable. No changes needed in callers of
PDO/PDOStatement.
--
Edit bug report at https://bugs.php.net/bug.php?id=74957&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=74957&r=trysnapshot54
Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=74957&r=trysnapshot55
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=74957&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=74957&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=74957&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=74957&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=74957&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=74957&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=74957&r=support
Expected behavior: https://bugs.php.net/fix.php?id=74957&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=74957&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=74957&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=74957&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=74957&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=74957&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=74957&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=74957&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=74957&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=74957&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=74957&r=mysqlcfg