diff --git a/.php-cs-fixer.dist.php b/.php-cs-fixer.dist.php index 841e41e5b..7571f3048 100644 --- a/.php-cs-fixer.dist.php +++ b/.php-cs-fixer.dist.php @@ -13,12 +13,16 @@ ]); 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 ], diff --git a/CHANGELOG.md b/CHANGELOG.md index 7e623c632..d1941284e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,7 +4,8 @@ - Bug #1127: Fix `AbstractSchema::hasTable()` and `AbstractSchema::hasView()` methods to support names quoted with curly brackets `{{%table}}` (@batyrmastyr) -- Enh #1145: Explicitly import classes, functions, and constants in "use" section (@mspirkov) +- Enh #1145, #1148: Explicitly import classes, functions, and constants in "use" section (@mspirkov) +- Enh #1148: Add `declare(strict_types=1)` to `Yiisoft\Db\Constant\ColumnInfoSource` (@mspirkov) ## 2.0.0 December 05, 2025 diff --git a/src/Constant/ColumnInfoSource.php b/src/Constant/ColumnInfoSource.php index 79cb4f448..b88fecb03 100644 --- a/src/Constant/ColumnInfoSource.php +++ b/src/Constant/ColumnInfoSource.php @@ -1,5 +1,7 @@