mirror of
https://github.com/php/php-src.git
synced 2026-04-29 03:03:26 +02:00
1cb166cbbb
From what I see the incorrect scope is not observable in any other way. The mixin methods are completely invisible to Reflection and a SQLite function referring to a private method is still properly called as before. Fixes php/php-src#20095.
26 lines
520 B
PHP
26 lines
520 B
PHP
--TEST--
|
|
GH-20095: Incorrect class name in deprecation message for PDO mixins
|
|
--EXTENSIONS--
|
|
pdo_sqlite
|
|
--FILE--
|
|
<?php
|
|
|
|
class Foo extends PDO {
|
|
private function test() {
|
|
echo "foo";
|
|
}
|
|
|
|
public function register() {
|
|
$this->sqliteCreateFunction('my_test', [$this, "test"]);
|
|
}
|
|
}
|
|
|
|
$pdo = new Foo('sqlite::memory:');
|
|
$pdo->register();
|
|
$pdo->query("SELECT my_test()");
|
|
|
|
?>
|
|
--EXPECTF--
|
|
Deprecated: Method PDO::sqliteCreateFunction() is deprecated since 8.5, use Pdo\Sqlite::createFunction() instead in %s on line %d
|
|
foo
|