From 9ed97e8575a422189760e131aaf1ea4eef60bbce Mon Sep 17 00:00:00 2001 From: flashwave Date: Fri, 4 Oct 2024 22:35:57 +0000 Subject: [PATCH] Changed Data namespace to Db. In case you wanted more breaking changes. --- README.md | 4 ++-- VERSION | 2 +- composer.json | 4 ++-- src/Config/Db/DbConfig.php | 2 +- src/Config/Db/DbConfigValueInfo.php | 2 +- src/{Data => Db}/DbBackend.php | 4 ++-- src/{Data => Db}/DbConnection.php | 4 ++-- src/{Data => Db}/DbConnectionInfo.php | 4 ++-- src/{Data => Db}/DbResult.php | 4 ++-- src/{Data => Db}/DbResultIterator.php | 4 ++-- src/{Data => Db}/DbResultTrait.php | 4 ++-- src/{Data => Db}/DbStatement.php | 4 ++-- src/{Data => Db}/DbStatementCache.php | 4 ++-- src/{Data => Db}/DbTools.php | 10 +++++----- src/{Data => Db}/DbTransactions.php | 4 ++-- src/{Data => Db}/DbType.php | 4 ++-- src/{Data => Db}/MariaDb/MariaDbBackend.php | 6 +++--- src/{Data => Db}/MariaDb/MariaDbCharacterSetInfo.php | 4 ++-- src/{Data => Db}/MariaDb/MariaDbConnection.php | 6 +++--- src/{Data => Db}/MariaDb/MariaDbConnectionInfo.php | 6 +++--- src/{Data => Db}/MariaDb/MariaDbParameter.php | 6 +++--- src/{Data => Db}/MariaDb/MariaDbResult.php | 6 +++--- src/{Data => Db}/MariaDb/MariaDbResultLib.php | 4 ++-- src/{Data => Db}/MariaDb/MariaDbResultNative.php | 4 ++-- src/{Data => Db}/MariaDb/MariaDbStatement.php | 6 +++--- src/{Data => Db}/MariaDb/MariaDbWarning.php | 4 ++-- src/{Data => Db}/Migration/DbMigration.php | 6 +++--- src/{Data => Db}/Migration/DbMigrationInfo.php | 6 +++--- src/{Data => Db}/Migration/DbMigrationManager.php | 12 ++++++------ src/{Data => Db}/Migration/DbMigrationRepo.php | 4 ++-- src/{Data => Db}/Migration/FsDbMigrationInfo.php | 6 +++--- src/{Data => Db}/Migration/FsDbMigrationRepo.php | 4 ++-- src/{Data => Db}/NullDb/NullDbBackend.php | 6 +++--- src/{Data => Db}/NullDb/NullDbConnection.php | 6 +++--- src/{Data => Db}/NullDb/NullDbConnectionInfo.php | 6 +++--- src/{Data => Db}/NullDb/NullDbResult.php | 6 +++--- src/{Data => Db}/NullDb/NullDbStatement.php | 6 +++--- src/{Data => Db}/Sqlite/SqliteBackend.php | 6 +++--- src/{Data => Db}/Sqlite/SqliteConnection.php | 6 +++--- src/{Data => Db}/Sqlite/SqliteConnectionInfo.php | 6 +++--- src/{Data => Db}/Sqlite/SqliteResult.php | 6 +++--- src/{Data => Db}/Sqlite/SqliteStatement.php | 6 +++--- tests/DbConfigTest.php | 2 +- tests/DbToolsTest.php | 12 ++++++------ 44 files changed, 114 insertions(+), 114 deletions(-) rename src/{Data => Db}/DbBackend.php (96%) rename src/{Data => Db}/DbConnection.php (97%) rename src/{Data => Db}/DbConnectionInfo.php (84%) rename src/{Data => Db}/DbResult.php (98%) rename src/{Data => Db}/DbResultIterator.php (96%) rename src/{Data => Db}/DbResultTrait.php (96%) rename src/{Data => Db}/DbStatement.php (97%) rename src/{Data => Db}/DbStatementCache.php (97%) rename src/{Data => Db}/DbTools.php (94%) rename src/{Data => Db}/DbTransactions.php (97%) rename src/{Data => Db}/DbType.php (94%) rename src/{Data => Db}/MariaDb/MariaDbBackend.php (98%) rename src/{Data => Db}/MariaDb/MariaDbCharacterSetInfo.php (98%) rename src/{Data => Db}/MariaDb/MariaDbConnection.php (99%) rename src/{Data => Db}/MariaDb/MariaDbConnectionInfo.php (99%) rename src/{Data => Db}/MariaDb/MariaDbParameter.php (94%) rename src/{Data => Db}/MariaDb/MariaDbResult.php (94%) rename src/{Data => Db}/MariaDb/MariaDbResultLib.php (96%) rename src/{Data => Db}/MariaDb/MariaDbResultNative.php (95%) rename src/{Data => Db}/MariaDb/MariaDbStatement.php (98%) rename src/{Data => Db}/MariaDb/MariaDbWarning.php (97%) rename src/{Data => Db}/Migration/DbMigration.php (81%) rename src/{Data => Db}/Migration/DbMigrationInfo.php (89%) rename src/{Data => Db}/Migration/DbMigrationManager.php (97%) rename src/{Data => Db}/Migration/DbMigrationRepo.php (85%) rename src/{Data => Db}/Migration/FsDbMigrationInfo.php (93%) rename src/{Data => Db}/Migration/FsDbMigrationRepo.php (95%) rename src/{Data => Db}/NullDb/NullDbBackend.php (89%) rename src/{Data => Db}/NullDb/NullDbConnection.php (85%) rename src/{Data => Db}/NullDb/NullDbConnectionInfo.php (65%) rename src/{Data => Db}/NullDb/NullDbResult.php (92%) rename src/{Data => Db}/NullDb/NullDbStatement.php (87%) rename src/{Data => Db}/Sqlite/SqliteBackend.php (95%) rename src/{Data => Db}/Sqlite/SqliteConnection.php (99%) rename src/{Data => Db}/Sqlite/SqliteConnectionInfo.php (97%) rename src/{Data => Db}/Sqlite/SqliteResult.php (93%) rename src/{Data => Db}/Sqlite/SqliteStatement.php (97%) diff --git a/README.md b/README.md index 101a700..19bc109 100644 --- a/README.md +++ b/README.md @@ -20,13 +20,13 @@ The way each implementation stores data is NOT guaranteed to be compatible, plea Requires the `redis` extension. Valkey is the name of the Linux Foundation's fork of Redis. -### `Index\Data\MariaDb` +### `Index\Db\MariaDb` Requires the `mysqli` extension. `mysqlnd` is recommended as the underlying driver, but `libmysql` should work without a hitch. This driver also works for MySQL as the dependencies would suggest, but you should consider using MariaDB instead of possible. -### `Index\Data\Sqlite` +### `Index\Db\Sqlite` Requires the `sqlite3` extension. diff --git a/VERSION b/VERSION index 88f81de..da0e292 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.2410.42227 +0.2410.42235 diff --git a/composer.json b/composer.json index c802ab5..30593b4 100644 --- a/composer.json +++ b/composer.json @@ -13,8 +13,8 @@ "phpstan/phpstan": "^1.11" }, "suggest": { - "ext-mysqli": "Support for the Index\\Data\\MariaDb namespace (both mysqlnd and libmysql are supported).", - "ext-sqlite3": "Support for the Index\\Data\\Sqlite namespace." + "ext-mysqli": "Support for the Index\\Db\\MariaDb namespace (both mysqlnd and libmysql are supported).", + "ext-sqlite3": "Support for the Index\\Db\\Sqlite namespace." }, "authors": [ { diff --git a/src/Config/Db/DbConfig.php b/src/Config/Db/DbConfig.php index 9f822fb..ddc7664 100644 --- a/src/Config/Db/DbConfig.php +++ b/src/Config/Db/DbConfig.php @@ -7,7 +7,7 @@ namespace Index\Config\Db; use InvalidArgumentException; use Index\Config\{Config,GetValueInfoTrait,GetValuesTrait,MutableConfigTrait,ScopedConfig}; -use Index\Data\{DbConnection,DbStatementCache,DbTools}; +use Index\Db\{DbConnection,DbStatementCache,DbTools}; /** * Provides a configuration based on a {@see DbConnection} instance. diff --git a/src/Config/Db/DbConfigValueInfo.php b/src/Config/Db/DbConfigValueInfo.php index 380bebc..728d8a0 100644 --- a/src/Config/Db/DbConfigValueInfo.php +++ b/src/Config/Db/DbConfigValueInfo.php @@ -7,7 +7,7 @@ namespace Index\Config\Db; use UnexpectedValueException; use Index\Config\ConfigValueInfo; -use Index\Data\DbResult; +use Index\Db\DbResult; /** * Provides information about a databased configuration value. diff --git a/src/Data/DbBackend.php b/src/Db/DbBackend.php similarity index 96% rename from src/Data/DbBackend.php rename to src/Db/DbBackend.php index 7e079f9..fee1621 100644 --- a/src/Data/DbBackend.php +++ b/src/Db/DbBackend.php @@ -1,9 +1,9 @@ assertInstanceOf(NullDbConnection::class, $nullDbConn1); - $nullDbConn2 = DbTools::create('Index-Data-NullDb-NullDbBackend:'); + $nullDbConn2 = DbTools::create('Index-Db-NullDb-NullDbBackend:'); $this->assertInstanceOf(NullDbConnection::class, $nullDbConn2); $maria = new MariaDbBackend;