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 CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- fix: restore BSD-3-Clause detection without changing license terms.
- ci: update shared workflows to `v2.0.6` and test PHP `8.6`.
- ci: use shared quality and security defaults and remove redundant local linter configuration and Composer scripts.
- fix: handle nullable `ArrayDataProvider::$allModels` and align `Controller::actions()` stub types with Yii `22.0` for PHPStan.

## 0.2.3 November 15, 2026

Expand Down
10 changes: 9 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,15 @@
"autoload-dev": {
"psr-4": {
"yii\\debug\\tests\\": "tests"
}
},
"exclude-from-classmap": [
"tests/support/stub/inertia/CorePage.php",
"tests/support/stub/inertia/Page.php",
"tests/support/stub/inertia/Vite.php",
"tests/support/stub/vite/DevelopmentConfiguration.php",
"tests/support/stub/vite/ProductionConfiguration.php",
"tests/support/stub/vite/Vite.php"
]
},
"extra": {
"branch-alias": {
Expand Down
2 changes: 1 addition & 1 deletion src/panels/ProfilingPanel.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public function getDetail(): string

$dataProvider = $searchModel->search(Yii::$app->request->getQueryParams(), $this->getModels());

$filteredRows = $this->filteredRows($dataProvider->allModels);
$filteredRows = $this->filteredRows($dataProvider->allModels ?? []);

return Yii::$app->view->render(
'panels/profile/detail',
Expand Down
8 changes: 8 additions & 0 deletions tests/db/DbSearchTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,10 @@ public function testSearchAppliesPartialMatchOnQueryType(): void
],
)->allModels;

self::assertIsArray(
$rows,
'A partial type filter must return an array of models.',
);
self::assertCount(
1,
$rows,
Expand Down Expand Up @@ -121,6 +125,10 @@ public function testSearchAppliesQueryFilterAcrossSqlText(): void

$rows = $provider->allModels;

self::assertIsArray(
$rows,
"Filtering on 'users' must return an array of models.",
);
self::assertCount(
1,
$rows,
Expand Down
2 changes: 1 addition & 1 deletion tests/support/stub/router/controllers/BadController.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public function actionOnly(): bool
* The router never reaches this body {@see init()} throws first so the returned payload is irrelevant to the
* scenario under test. Kept type-compliant with the parent contract.
*
* @return array<array-key, array{class: class-string, ...}|class-string>
* @return array<array-key, array{class?: class-string, __class?: class-string, ...}|class-string>
*/
#[Override]
public function actions(): array
Expand Down
Loading