Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move DataType class to Yiisoft\Db\Constant namespace #921

Merged
merged 2 commits into from
Jan 13, 2025
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions UPGRADE.md
Original file line number Diff line number Diff line change
Expand Up @@ -163,3 +163,4 @@ Each table column has its own class in the `Yiisoft\Db\Schema\Column` namespace
- Allow `QueryInterface::one()` to return an object;
- Allow `QueryInterface::all()` to return array of objects;
- Change `Quoter::quoteValue()` parameter type and return type from `mixed` to `string`;
- Move `DataType` class to `Yiisoft\Db\Constant` namespace;
2 changes: 1 addition & 1 deletion docs/guide/en/queries/transactions.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ In order for the data to be consistent when multiple commands are involved, you
```php
use Yiisoft\Db\Connection\ConnectionInterface;
use Yiisoft\Db\Query\Query;
use Yiisoft\Db\Command\DataType;
use Yiisoft\Db\Constant\DataType;

/** @var ConnectionInterface $db */

Expand Down
2 changes: 1 addition & 1 deletion docs/guide/pt-BR/queries/transactions.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Para que os dados sejam consistentes quando vários comandos estiverem envolvido
```php
use Yiisoft\Db\Connection\ConnectionInterface;
use Yiisoft\Db\Query\Query;
use Yiisoft\Db\Command\DataType;
use Yiisoft\Db\Constant\DataType;

/** @var ConnectionInterface $db */

Expand Down
1 change: 1 addition & 0 deletions src/Command/CommandInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
use Throwable;
use Yiisoft\Db\Connection\ConnectionInterface;
use Yiisoft\Db\Constant\ColumnType;
use Yiisoft\Db\Constant\DataType;
use Yiisoft\Db\Constant\PseudoType;
use Yiisoft\Db\Exception\Exception;
use Yiisoft\Db\Exception\InvalidArgumentException;
Expand Down
1 change: 1 addition & 0 deletions src/Command/Param.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

namespace Yiisoft\Db\Command;

use Yiisoft\Db\Constant\DataType;
use Yiisoft\Db\Expression\ExpressionInterface;

/**
Expand Down
2 changes: 2 additions & 0 deletions src/Command/ParamInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

namespace Yiisoft\Db\Command;

use Yiisoft\Db\Constant\DataType;

/**
* This interface represents a parameter to bind to an SQL statement.
*/
Expand Down
2 changes: 1 addition & 1 deletion src/Command/DataType.php → src/Constant/DataType.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

declare(strict_types=1);

namespace Yiisoft\Db\Command;
namespace Yiisoft\Db\Constant;

/**
* Types of data.
Expand Down
2 changes: 1 addition & 1 deletion src/QueryBuilder/AbstractQueryBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
namespace Yiisoft\Db\QueryBuilder;

use Yiisoft\Db\Command\CommandInterface;
use Yiisoft\Db\Command\DataType;
use Yiisoft\Db\Constant\DataType;
use Yiisoft\Db\Command\ParamInterface;
use Yiisoft\Db\Connection\ConnectionInterface;
use Yiisoft\Db\Connection\ServerInfoInterface;
Expand Down
2 changes: 1 addition & 1 deletion src/Schema/AbstractSchema.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
use Psr\SimpleCache\InvalidArgumentException;
use Throwable;
use Yiisoft\Db\Cache\SchemaCache;
use Yiisoft\Db\Command\DataType;
use Yiisoft\Db\Constant\DataType;
use Yiisoft\Db\Connection\ConnectionInterface;
use Yiisoft\Db\Constraint\Constraint;
use Yiisoft\Db\Constraint\IndexConstraint;
Expand Down
2 changes: 1 addition & 1 deletion src/Schema/SchemaInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
namespace Yiisoft\Db\Schema;

use Throwable;
use Yiisoft\Db\Command\DataType;
use Yiisoft\Db\Constant\DataType;
use Yiisoft\Db\Constant\ColumnType;
use Yiisoft\Db\Constant\PseudoType;
use Yiisoft\Db\Constraint\ConstraintSchemaInterface;
Expand Down
2 changes: 1 addition & 1 deletion tests/AbstractQueryBuilderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
use PHPUnit\Framework\TestCase;
use stdClass;
use Throwable;
use Yiisoft\Db\Command\DataType;
use Yiisoft\Db\Constant\DataType;
use Yiisoft\Db\Command\Param;
use Yiisoft\Db\Exception\Exception;
use Yiisoft\Db\Exception\InvalidArgumentException;
Expand Down
2 changes: 1 addition & 1 deletion tests/AbstractSchemaTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
namespace Yiisoft\Db\Tests;

use PHPUnit\Framework\TestCase;
use Yiisoft\Db\Command\DataType;
use Yiisoft\Db\Constant\DataType;
use Yiisoft\Db\Tests\Support\Assert;
use Yiisoft\Db\Tests\Support\TestTrait;

Expand Down
2 changes: 1 addition & 1 deletion tests/Common/CommonCommandTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

use ReflectionException;
use Throwable;
use Yiisoft\Db\Command\DataType;
use Yiisoft\Db\Constant\DataType;
use Yiisoft\Db\Command\Param;
use Yiisoft\Db\Constant\ColumnType;
use Yiisoft\Db\Constant\PseudoType;
Expand Down
2 changes: 1 addition & 1 deletion tests/Provider/CommandPDOProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

namespace Yiisoft\Db\Tests\Provider;

use Yiisoft\Db\Command\DataType;
use Yiisoft\Db\Constant\DataType;

class CommandPDOProvider
{
Expand Down
2 changes: 1 addition & 1 deletion tests/Provider/CommandProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
use ArrayIterator;
use IteratorAggregate;
use Traversable;
use Yiisoft\Db\Command\DataType;
use Yiisoft\Db\Constant\DataType;
use Yiisoft\Db\Command\Param;
use Yiisoft\Db\Constant\ColumnType;
use Yiisoft\Db\Expression\Expression;
Expand Down
2 changes: 1 addition & 1 deletion tests/Provider/QueryBuilderProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
namespace Yiisoft\Db\Tests\Provider;

use ArrayIterator;
use Yiisoft\Db\Command\DataType;
use Yiisoft\Db\Constant\DataType;
use Yiisoft\Db\Command\Param;
use Yiisoft\Db\Constant\ColumnType;
use Yiisoft\Db\Constant\PseudoType;
Expand Down
Loading