Skip to content

Commit 0283457

Browse files
committed
Restructures /src files and updates namespaces in class files but not all references.
Signed-off-by: Joey Smith <jsmith@webinertia.net> Signed-off-by: Joey Smith <jsmith@webinertia.net>
1 parent 5982841 commit 0283457

14 files changed

Lines changed: 26 additions & 28 deletions

composer.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
},
2929
"extra": {
3030
"laminas": {
31-
"config-provider": "PhpDb\\Adapter\\Mysql\\ConfigProvider"
31+
"config-provider": "PhpDb\\Mysql\\ConfigProvider"
3232
}
3333
},
3434
"require": {
@@ -50,13 +50,13 @@
5050
},
5151
"autoload": {
5252
"psr-4": {
53-
"PhpDb\\Adapter\\Mysql\\": "src/"
53+
"PhpDb\\Mysql\\": "src/"
5454
}
5555
},
5656
"autoload-dev": {
5757
"psr-4": {
58-
"PhpDbTest\\Adapter\\Mysql\\": "test/unit/",
59-
"PhpDbIntegrationTest\\Adapter\\Mysql\\": "test/integration/"
58+
"PhpDbTest\\Mysql\\": "test/unit/",
59+
"PhpDbIntegrationTest\\Mysql\\": "test/integration/"
6060
}
6161
},
6262
"scripts": {
Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,19 @@
22

33
declare(strict_types=1);
44

5-
namespace PhpDb\Adapter\Mysql\Platform;
5+
namespace PhpDb\Mysql;
66

77
use mysqli;
88
use Override;
99
use PDO;
1010
use PhpDb\Adapter\Driver\DriverInterface;
11-
use PhpDb\Adapter\Mysql\Sql\Platform\Mysql\Mysql as SqlPlatform;
1211
use PhpDb\Adapter\Platform\AbstractPlatform;
1312
use PhpDb\Sql\Platform\PlatformDecoratorInterface;
1413

1514
use function implode;
1615
use function str_replace;
1716

18-
class Mysql extends AbstractPlatform
17+
class AdapterPlatform extends AbstractPlatform
1918
{
2019
public final const PLATFORM_NAME = 'MySQL';
2120

@@ -54,7 +53,7 @@ public function getName(): string
5453
#[Override]
5554
public function getSqlPlatformDecorator(): PlatformDecoratorInterface
5655
{
57-
return new SqlPlatform();
56+
return new Sql\Platform();
5857
}
5958

6059
/**
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
declare(strict_types=1);
44

5-
namespace PhpDb\Adapter\Mysql\Driver\Mysqli;
5+
namespace PhpDb\Mysql;
66

77
use Exception as GenericException;
88
use Override;
@@ -25,7 +25,7 @@
2525

2626
class Connection extends AbstractConnection implements DriverAwareInterface
2727
{
28-
protected Mysqli $driver;
28+
protected Driver $driver;
2929

3030
/** @var \mysqli */
3131
protected $resource;

src/DatabasePlatformNameTrait.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
declare(strict_types=1);
44

5-
namespace PhpDb\Adapter\Mysql;
5+
namespace PhpDb\Mysql;
66

77
use PhpDb\Adapter\Driver\DriverInterface;
88
use PhpDb\Adapter\Exception;
Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
declare(strict_types=1);
44

5-
namespace PhpDb\Adapter\Mysql\Driver\Mysqli;
5+
namespace PhpDb\Mysql;
66

77
use mysqli_stmt;
88
use PhpDb\Adapter\Driver\ConnectionInterface;
@@ -11,7 +11,6 @@
1111
use PhpDb\Adapter\Driver\ResultInterface;
1212
use PhpDb\Adapter\Driver\StatementInterface;
1313
use PhpDb\Adapter\Exception;
14-
use PhpDb\Adapter\Mysql\DatabasePlatformNameTrait;
1514
use PhpDb\Adapter\Profiler\ProfilerAwareInterface;
1615
use PhpDb\Adapter\Profiler\ProfilerInterface;
1716

@@ -20,7 +19,7 @@
2019
use function extension_loaded;
2120
use function is_string;
2221

23-
final class Mysqli implements DriverInterface, ProfilerAwareInterface
22+
final class Driver implements DriverInterface, ProfilerAwareInterface
2423
{
2524
use DatabasePlatformNameTrait;
2625

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
declare(strict_types=1);
44

5-
namespace PhpDb\Adapter\Mysql\Metadata\Source;
5+
namespace PhpDb\Mysql\Metadata;
66

77
use DateTime;
88
use Exception;
@@ -20,7 +20,7 @@
2020
use const CASE_LOWER;
2121
use const PREG_PATTERN_ORDER;
2222

23-
final class MysqlMetadata extends AbstractSource
23+
final class Source extends AbstractSource
2424
{
2525
/**
2626
* @throws Exception
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
declare(strict_types=1);
44

5-
namespace PhpDb\Adapter\Mysql\Driver\Pdo;
5+
namespace PhpDb\Mysql\Pdo;
66

77
use Override;
88
use PDO;
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,16 @@
22

33
declare(strict_types=1);
44

5-
namespace PhpDb\Adapter\Mysql\Driver\Pdo;
5+
namespace PhpDb\Mysql\Pdo;
66

77
use Override;
88
use PDOStatement;
99
use PhpDb\Adapter\Driver\Pdo\AbstractPdo;
1010
use PhpDb\Adapter\Driver\Pdo\Result;
1111
use PhpDb\Adapter\Driver\ResultInterface;
12-
use PhpDb\Adapter\Mysql\DatabasePlatformNameTrait;
12+
use PhpDb\Mysql\DatabasePlatformNameTrait;
1313

14-
class Pdo extends AbstractPdo
14+
class Driver extends AbstractPdo
1515
{
1616
use DatabasePlatformNameTrait;
1717

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
declare(strict_types=1);
44

5-
namespace PhpDb\Adapter\Mysql\Driver\Mysqli;
5+
namespace PhpDb\Mysql;
66

77
use Iterator;
88
use mysqli;

src/Sql/Platform/Mysql/Ddl/AlterTableDecorator.php renamed to src/Sql/Ddl/AlterTableDecorator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
declare(strict_types=1);
44

5-
namespace PhpDb\Adapter\Mysql\Sql\Platform\Mysql\Ddl;
5+
namespace PhpDb\Mysql\Sql\Ddl;
66

77
use PhpDb\Adapter\Platform\PlatformInterface;
88
use PhpDb\Sql\Ddl\AlterTable;

0 commit comments

Comments
 (0)