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
1 change: 1 addition & 0 deletions framework/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ Yii Framework 2 Change Log
- Chg #20465: Remove `PHP_VERSION_ID` checks from web `Session` class (terabytesoftw)
- Chg #20464: Remove `PHP_VERSION_ID` checks from web `Response` class (terabytesoftw)
- Enh #20511: Allow `jQuery` usage in `View` class while maintaining backward compatibility (terabytesoftw)
- Bug #20518: `PHP` 8.4 fixes for implicit nullability deprecation (terabytesoftw)

2.0.54 under development
------------------------
Expand Down
2 changes: 1 addition & 1 deletion tests/framework/base/ControllerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ public function testRunAction(): void
public function testCreateInlineAction(
string $controllerClass,
string $actionId,
string $expectedActionMethod = null
string|null $expectedActionMethod = null
): void {
$this->mockApplication();
/** @var Controller $controller */
Expand Down
2 changes: 1 addition & 1 deletion tests/framework/behaviors/AttributeBehaviorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ public function testPreserveNonEmptyValues(
string $aliasExpected,
bool $preserveNonEmptyValues,
string $name,
string $alias = null
string|null $alias = null
): void {
$model = new ActiveRecordWithAttributeBehavior();
$model->attributeBehavior->preserveNonEmptyValues = $preserveNonEmptyValues;
Expand Down
2 changes: 1 addition & 1 deletion tests/framework/console/RequestTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ public static function provider(): array
* @param array $expected The expected result.
* @param array|null $expectedException The expected exception.
*/
public function testResolve(array $params, array $expected, array $expectedException = null): void
public function testResolve(array $params, array $expected, array|null $expectedException = null): void
{
if (isset($expectedException)) {
$this->expectException($expectedException[0]);
Expand Down
2 changes: 1 addition & 1 deletion tests/framework/di/ContainerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ public function testOptionalDependencies(): void
{
$container = new Container();
// Test optional unresolvable dependency.
$closure = fn(QuxInterface $test = null) => $test;
$closure = fn(QuxInterface|null $test = null): QuxInterface|null => $test;
$this->assertNull($container->invoke($closure));
}

Expand Down
2 changes: 1 addition & 1 deletion tests/framework/filters/AccessRuleTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ protected function mockRequest(string $method = 'GET'): Request
return $request;
}

protected function mockUser(string $userid = null): User
protected function mockUser(string|null $userid = null): User
{
$user = new User([
'identityClass' => UserIdentity::class,
Expand Down
8 changes: 6 additions & 2 deletions tests/framework/helpers/HtmlTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -1652,8 +1652,12 @@ function (DynamicModel $model) {
/**
* @dataProvider errorSummaryDataProvider
*/
public function testErrorSummary(string $value, array $options, string $expectedHtml, \Closure $beforeValidate = null): void
{
public function testErrorSummary(
string $value,
array $options,
string $expectedHtml,
\Closure|null $beforeValidate = null
): void {
$model = new HtmlTestModel();
$model->name = $value;
if ($beforeValidate !== null) {
Expand Down
4 changes: 2 additions & 2 deletions tests/framework/i18n/FormatterDateTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -554,7 +554,7 @@ public static function dateInputs()
* @param mixed $value
* @param mixed|null $expectedException
*/
public function testIntlDateInput(string|bool $expected, string $value, string $expectedException = null): void
public function testIntlDateInput(string|bool $expected, string $value, string|null $expectedException = null): void
{
$this->testDateInput($expected, $value, $expectedException);
}
Expand All @@ -565,7 +565,7 @@ public function testIntlDateInput(string|bool $expected, string $value, string $
* @param mixed $value
* @param mixed|null $expectedException
*/
public function testDateInput(string|bool $expected, string $value, string $expectedException = null): void
public function testDateInput(string|bool $expected, string $value, string|null $expectedException = null): void
{
if ($expectedException !== null) {
$this->expectException($expectedException);
Expand Down
10 changes: 5 additions & 5 deletions tests/framework/rest/IndexActionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -75,12 +75,12 @@ public function testPrepareSearchQueryAttribute(): void
* @param string $expectedRawSql
*/
public function testPrepareDataProviderWithPaginationAndSorting(
\yii\data\Pagination|bool|array $pagination,
\yii\data\Sort|bool|array $sort,
int $expectedPaginationPageSize = null,
int $expectedPaginationDefaultPageSize = null,
Pagination|bool|array $pagination,
Sort|bool|array $sort,
int|null $expectedPaginationPageSize = null,
int|null $expectedPaginationDefaultPageSize = null,
array $expectedSortOrders = [],
?array $expectedSortDefaultOrder = null
array|null $expectedSortDefaultOrder = null
): void {
Yii::$app->getRequest()->setBodyParams([
'per-page' => 11,
Expand Down
9 changes: 7 additions & 2 deletions tests/framework/web/AssetBundleTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -509,8 +509,13 @@ public static function registerFileDataProvider()
* @param string|bool $appendTimestamp
* @param string|null $webAlias
*/
public function testRegisterFileAppendTimestamp(string $type, string $path, bool $appendTimestamp, string $expected, string $webAlias = null): void
{
public function testRegisterFileAppendTimestamp(
string $type,
string $path,
bool $appendTimestamp,
string $expected,
string|null $webAlias = null,
): void {
$originalAlias = Yii::getAlias('@web');
if ($webAlias === null) {
$webAlias = $originalAlias;
Expand Down
Loading