Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
2 changes: 1 addition & 1 deletion .github/workflows/rector-cs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,6 @@ jobs:
token: ${{ secrets.YIISOFT_GITHUB_TOKEN }}
with:
repository: ${{ github.event.pull_request.head.repo.full_name }}
php: '8.5'
php: '8.1'
required-packages: >-
['db']
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,4 @@ composer.phar

# PHP CS Fixer
/.php-cs-fixer.cache
/.php-cs-fixer.php
12 changes: 12 additions & 0 deletions .php-cs-fixer.dist.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,23 @@
]);

return (new Config())
->setRiskyAllowed(true)
->setParallelConfig(ParallelConfigFactory::detect())
->setRules([
'@PER-CS3.0' => true,
'no_unused_imports' => true,
'ordered_class_elements' => true,
'class_attributes_separation' => ['elements' => ['method' => 'one']],
'declare_strict_types' => true,
'native_function_invocation' => true,
'native_constant_invocation' => true,
'fully_qualified_strict_types' => [
'import_symbols' => true
],
'global_namespace_import' => [
'import_classes' => true,
'import_constants' => true,
'import_functions' => true,
],
])
->setFinder($finder);
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

- Enh #477, #478: Improve performance of `ArrayParser::parse()` method (@Tigrov)
- Enh #478: Improve performance of `StructuredParser::parse()` method (@Tigrov)
- Enh #479: Explicitly import functions and constants in "use" section (@mspirkov)

## 2.0.0 December 05, 2025

Expand Down
1 change: 1 addition & 0 deletions src/Column/BitColumn.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
use Yiisoft\Db\Schema\Column\AbstractColumn;

use function bindec;
use function is_string;

final class BitColumn extends AbstractColumn
{
Expand Down
2 changes: 2 additions & 0 deletions src/Column/ColumnBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
use Yiisoft\Db\Schema\Column\DateTimeColumn;
use Yiisoft\Db\Schema\Column\DoubleColumn;

use const PHP_INT_SIZE;

final class ColumnBuilder extends \Yiisoft\Db\Schema\Column\ColumnBuilder
{
public static function boolean(): BooleanColumn
Expand Down
2 changes: 2 additions & 0 deletions src/Column/RangeBoundColumnFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
use Yiisoft\Db\Schema\Column\DateTimeColumn;
use Yiisoft\Db\Schema\Column\DoubleColumn;

use const PHP_INT_SIZE;

/**
* @internal
*/
Expand Down
1 change: 1 addition & 0 deletions tests/CommandTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
use Yiisoft\Db\Tests\Common\CommonCommandTest;

use function serialize;
use function strlen;

/**
* @group pgsql
Expand Down
2 changes: 1 addition & 1 deletion tests/Provider/QueryBuilderProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -628,7 +628,7 @@ public static function multiOperandFunctionBuilder(): iterable
];
$data['Longest with 3 operands'][2] = "(SELECT value FROM (SELECT :qp0 AS value UNION SELECT (SELECT 'longest'::text)"
. ' AS value UNION SELECT :qp1 AS value) AS t ORDER BY LENGTH(value) DESC LIMIT 1)';
$data['Shortest with 3 operands'][1] = static fn(Connectioninterface $db) => [
$data['Shortest with 3 operands'][1] = static fn(ConnectionInterface $db) => [
new Value('short'),
$db->select(new Expression("'longest'::text")),
new Param('string', DataType::STRING),
Expand Down
2 changes: 2 additions & 0 deletions tests/Provider/SchemaProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@
use Yiisoft\Db\Schema\Column\StringColumn;
use Yiisoft\Db\Tests\Support\Assert;

use function sprintf;

final class SchemaProvider extends \Yiisoft\Db\Tests\Provider\SchemaProvider
{
public static function columns(): array
Expand Down
2 changes: 2 additions & 0 deletions tests/SchemaTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@
use Yiisoft\Db\Tests\Common\CommonSchemaTest;
use Yiisoft\Db\Tests\Support\TestHelper;

use function count;

/**
* @group pgsql
*/
Expand Down
Loading