Bug #78126 [Com]: PDO::sqliteCreateFunction is not exposed via reflection

From: Date: Sun, 16 Jun 2019 03:27:41 +0000
Subject: Bug #78126 [Com]: PDO::sqliteCreateFunction is not exposed via reflection
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-221333@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=78126&edit=1 ID: 78126 Comment by: camporter1 at gmail dot com Reported by: morozov at tut dot by Summary: PDO::sqliteCreateFunction is not exposed via reflection Status: Open Type: Bug Package: PDO SQLite Operating System: Linux PHP Version: 7.3.6 Block user comment: N Private report: N New Comment: The issue here as far as I can tell is that driver methods are not defined directly on the PDO class entry. Instead, an object handler is used to get these methods. From what I can tell, reflection seems to rely only on the class entry. Since I was curious, I opened https://github.com/php/php-src/pull/4271 as an experimental solution. This still wouldn't solve listing all of the available methods under get_method, and it's clunky. Previous Comments: ------------------------------------------------------------------------ [2019-06-08 00:46:18] morozov at tut dot by The same is true for other PDO::sqlite*() and PDO::pgsql*() functions. ------------------------------------------------------------------------ [2019-06-07 23:32:23] morozov at tut dot by Description: ------------ Despite being available at runtime, PDO::sqliteCreateFunction is not exposed via reflection: neither via the Reflection API, nor via the command line (php --rc). Test script: --------------- $conn = new PDO('sqlite::memory:'); var_dump(method_exists($conn, 'sqliteCreateFunction')); try { $re = new ReflectionMethod($conn, 'sqliteCreateFunction'); } catch (ReflectionException $e) { echo $e->getMessage(), PHP_EOL; } Expected result: ---------------- Method reflection is created Actual result: -------------- bool(true) Method PDO::sqliteCreateFunction() does not exist ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=78126&edit=1

« previous php.bugs (#221333) next »