Skip to content

Commit f519b84

Browse files
committed
Amend PDO driver-specific class names
1 parent 956c3c2 commit f519b84

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+215
-203
lines changed

UPGRADING

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -233,22 +233,22 @@ PHP 8.4 UPGRADE NOTES
233233
or by invoking their constructor directly.
234234

235235
- PDO_DBLIB:
236-
. Added class PdoDbLib.
236+
. Added class Pdo\DbLib.
237237

238238
- PDO_FIREBIRD:
239-
. Added class PdoFirebird.
239+
. Added class Pdo\Firebird.
240240

241241
- PDO_MYSQL:
242-
. Added class PdoMysql.
242+
. Added class Pdo\Mysql.
243243

244244
- PDO_ODBC:
245-
. Added class PdoOdbc.
245+
. Added class Pdo\Odbc.
246246

247247
- PDO_PGSQL:
248-
. Added class PdoPgsql.
248+
. Added class Pdo\Pgsql.
249249

250250
- PDO_SQLITE:
251-
. Added class PdoSqlite.
251+
. Added class Pdo\Sqlite.
252252

253253
- POSIX:
254254
. Added constant POSIX_SC_CHILD_MAX

ext/pdo_dblib/pdo_dblib.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ PHP_MINIT_FUNCTION(pdo_dblib)
204204
return FAILURE;
205205
}
206206

207-
PdoDblib_ce = register_class_PdoDblib(pdo_dbh_ce);
207+
PdoDblib_ce = register_class_Pdo_Dblib(pdo_dbh_ce);
208208
PdoDblib_ce->create_object = pdo_dbh_new;
209209

210210
if (FAILURE == php_pdo_register_driver(&pdo_dblib_driver)) {

ext/pdo_dblib/pdo_dblib.stub.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,13 @@
22

33
/** @generate-class-entries */
44

5+
namespace Pdo;
6+
57
/**
68
* @strict-properties
79
* @not-serializable
810
*/
9-
class PdoDblib extends PDO
11+
class Dblib extends PDO
1012
{
1113
/** @cvalue PDO_DBLIB_ATTR_CONNECTION_TIMEOUT */
1214
public const int ATTR_CONNECTION_TIMEOUT = UNKNOWN;

ext/pdo_dblib/pdo_dblib_arginfo.h

Lines changed: 5 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

ext/pdo_dblib/tests/pdodblib_001.phpt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
--TEST--
2-
PdoDblib basic
2+
Pdo\Dblib basic
33
--EXTENSIONS--
44
pdo_dblib
55
--SKIPIF--
@@ -11,7 +11,7 @@ getDbConnection();
1111
<?php
1212

1313
require __DIR__ . '/config.inc';
14-
$db = getDbConnection(PdoDblib::class);
14+
$db = getDbConnection(Pdo\Dblib::class);
1515

1616
$db->query("CREATE TABLE #pdo_dblib_001(name VARCHAR(32)); ");
1717
$db->query("INSERT INTO #pdo_dblib_001 VALUES('PHP'), ('PHP6');");

ext/pdo_dblib/tests/pdodblib_002.phpt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
--TEST--
2-
PdoDblib create through PDO::connect
2+
Pdo\Dblib create through PDO::connect
33
--EXTENSIONS--
44
pdo_dblib
55
--SKIPIF--
@@ -13,8 +13,8 @@ getDbConnection();
1313
require __DIR__ . '/config.inc';
1414

1515
$db = connectToDb();
16-
if (!$db instanceof PdoDblib) {
17-
echo "Wrong class type. Should be PdoDblib but is " . get_class($db) . "\n";
16+
if (!$db instanceof Pdo\Dblib) {
17+
echo "Wrong class type. Should be Pdo\Dblib but is " . get_class($db) . "\n";
1818
}
1919

2020
$db->query("CREATE TABLE #pdo_dblib_002(name VARCHAR(32))");

ext/pdo_firebird/pdo_firebird.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ PHP_MINIT_FUNCTION(pdo_firebird) /* {{{ */
7070
return FAILURE;
7171
}
7272

73-
PdoFirebird_ce = register_class_PdoFirebird(pdo_dbh_ce);
73+
PdoFirebird_ce = register_class_Pdo_Firebird(pdo_dbh_ce);
7474
PdoFirebird_ce->create_object = pdo_dbh_new;
7575

7676
#ifdef ZEND_SIGNALS

ext/pdo_firebird/pdo_firebird.stub.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,13 @@
22

33
/** @generate-class-entries */
44

5+
namespace Pdo;
6+
57
/**
68
* @strict-properties
79
* @not-serializable
810
*/
9-
class PdoFirebird extends PDO
11+
class Firebird extends PDO
1012
{
1113
/** @cvalue PDO_FB_ATTR_DATE_FORMAT */
1214
public const int ATTR_DATE_FORMAT = UNKNOWN;

ext/pdo_firebird/pdo_firebird_arginfo.h

Lines changed: 5 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

ext/pdo_firebird/tests/pdofirebird_002.phpt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ See https://github.com/FirebirdSQL/firebird/issues/7849
1313
require_once __DIR__ . "/testdb.inc";
1414

1515
$db = connectToDb();
16-
if (!$db instanceof PdoFirebird) {
17-
echo "Wrong class type. Should be PdoFirebird but is " . get_class($db) . "\n";
16+
if (!$db instanceof Pdo\Firebird) {
17+
echo "Wrong class type. Should be Pdo\Firebird but is " . get_class($db) . "\n";
1818
}
1919

2020
$db->query('CREATE TABLE pdofirebird_002 (idx INT NOT NULL PRIMARY KEY, name VARCHAR(20))');

0 commit comments

Comments
 (0)