Skip to content

Commit 1a4a698

Browse files
committed
Working code (not tested, just running) for Mysqli Driver
Signed-off-by: Joey Smith <jsmith@webinertia.net> Signed-off-by: Joey Smith <jsmith@webinertia.net>
1 parent 9cbe4ed commit 1a4a698

File tree

3 files changed

+7
-79
lines changed

3 files changed

+7
-79
lines changed

src/Container/AdapterManagerDelegator.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,10 @@ public function __invoke(
3131
'aliases' => [
3232
'MySqli' => Driver\Mysqli\Mysqli::class,
3333
'MySQLi' => Driver\Mysqli\Mysqli::class,
34+
'Mysqli' => Driver\Mysqli\Mysqli::class,
3435
'mysqli' => Driver\Mysqli\Mysqli::class,
36+
'PDO_MySQL' => Driver\Pdo\Pdo::class,
37+
'Pdo_MySQL' => Driver\Pdo\Pdo::class,
3538
'Pdo_Mysql' => Driver\Pdo\Pdo::class,
3639
'pdo_mysql' => Driver\Pdo\Pdo::class,
3740
'pdomysql' => Driver\Pdo\Pdo::class,

src/Container/InterfaceFactoryTrait.php

Lines changed: 0 additions & 66 deletions
This file was deleted.

src/Platform/Mysql.php

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -37,17 +37,14 @@ class Mysql extends AbstractPlatform
3737
*/
3838
protected $quoteIdentifierFragmentPattern = '/([^0-9,a-z,A-Z$_\-:])/i';
3939

40-
/**
41-
* todo: track down if this still needs to accept null
42-
*/
4340
public function __construct(
4441
protected readonly DriverInterface|\mysqli|\PDO $driver
4542
) {}
4643

4744
/**
4845
* {@inheritDoc}
4946
*/
50-
public function getName()
47+
public function getName(): string
5148
{
5249
return self::PLATFORM_NAME;
5350
}
@@ -57,18 +54,12 @@ public function getSqlPlatformDecorator(): PlatformDecoratorInterface
5754
return new SqlPlatform();
5855
}
5956

60-
/**
61-
* {@inheritDoc}
62-
*/
63-
public function quoteIdentifierChain($identifierChain)
57+
public function quoteIdentifierChain(array|string $identifierChain): string
6458
{
6559
return '`' . implode('`.`', (array) str_replace('`', '``', $identifierChain)) . '`';
6660
}
6761

68-
/**
69-
* {@inheritDoc}
70-
*/
71-
public function quoteValue($value)
62+
public function quoteValue(string $value): string
7263
{
7364
$quotedViaDriverValue = $this->quoteViaDriver($value);
7465

@@ -78,7 +69,7 @@ public function quoteValue($value)
7869
/**
7970
* {@inheritDoc}
8071
*/
81-
public function quoteTrustedValue($value)
72+
public function quoteTrustedValue(int|float|string|bool $value): ?string
8273
{
8374
$quotedViaDriverValue = $this->quoteViaDriver($value);
8475

0 commit comments

Comments
 (0)