Skip to content

Multiple type corrections in PHPDoc annotations - #21124

Merged
samdark merged 3 commits into
yiisoft:masterfrom
mspirkov:fix-phpdocs
Oct 24, 2026
Merged

samdark merged 3 commits into
yiisoft:masterfrom
mspirkov:fix-phpdocs

Conversation

@mspirkov

Copy link
Copy Markdown
Contributor
Q A
Is bugfix? ❌
New feature? ❌
Breaks BC? ❌
Fixed issues

@coderabbitai

coderabbitai Bot commented Oct 23, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review.

Recent review info
Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI (base), Organization UI (inherited)
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: 9a5eda00-39bd-4644-ba81-58459f893fb9
Commits

Reviewing files that changed from the base of the PR and between d3d81b2 and 4b92500.

Files selected for processing: 2
  • framework/CHANGELOG.md
  • framework/widgets/Pjax.php

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.

Recent review details
Context from checks skipped due to timeout: 65
  • GitHub Check: codecov/project
  • GitHub Check: MSSQL tests / PHP 8.2-mssql-2022-latest
  • GitHub Check: MSSQL tests / PHP 8.4-mssql-2022-latest
  • GitHub Check: MSSQL tests with coverage / PHP 8.5-mssql-2022-latest
  • GitHub Check: MSSQL tests / PHP 8.0-mssql-2022-latest
  • GitHub Check: MariaDB tests with coverage / PHP 7.4-mysql-10.4
  • GitHub Check: MariaDB tests / PHP 8.2-mysql-latest
  • GitHub Check: SQLite tests / PHP 8.0-ubuntu-22.04
  • GitHub Check: MSSQL tests / PHP 8.3-mssql-2022-latest
  • GitHub Check: MySQL tests with coverage / PHP 7.4-mysql-latest
  • GitHub Check: MariaDB tests / PHP 8.1-mysql-latest
  • GitHub Check: MSSQL tests / PHP 8.1-mssql-2022-latest
  • GitHub Check: MySQL tests with coverage / PHP 7.4-mysql-5.7
  • GitHub Check: MariaDB tests / PHP 8.4-mysql-latest
  • GitHub Check: MSSQL tests with coverage / PHP 8.5-mssql-2019-latest
  • GitHub Check: MariaDB tests with coverage / PHP 8.5-mysql-10.4
  • GitHub Check: MariaDB tests with coverage / PHP 7.4-mysql-latest
  • GitHub Check: SQLite tests / PHP 8.2-ubuntu-22.04
  • GitHub Check: MySQL tests / PHP 8.3-mysql-latest
  • GitHub Check: MSSQL tests with coverage / PHP 7.4-mssql-2019-latest
  • GitHub Check: MariaDB tests / PHP 8.0-mysql-latest
  • GitHub Check: SQLite tests / PHP 8.1-ubuntu-22.04
  • GitHub Check: PostgreSQL tests with coverage / PHP 8.5-pgsql-13
  • GitHub Check: MariaDB tests with coverage / PHP 8.5-mysql-latest
  • GitHub Check: MySQL tests with coverage / PHP 8.5-mysql-latest
  • GitHub Check: MySQL tests with coverage / PHP 8.5-mysql-5.7
  • GitHub Check: MySQL tests / PHP 8.4-mysql-latest
  • GitHub Check: PostgreSQL tests with coverage / PHP 7.4-pgsql-15
  • GitHub Check: PostgreSQL tests with coverage / PHP 8.5-pgsql-14
  • GitHub Check: SQLite tests / PHP 8.4-ubuntu-22.04
  • GitHub Check: SQLite tests / PHP 8.3-ubuntu-22.04
  • GitHub Check: PostgreSQL tests with coverage / PHP 8.5-pgsql-10
  • GitHub Check: PostgreSQL tests with coverage / PHP 7.4-pgsql-17
  • GitHub Check: MSSQL tests with coverage / PHP 7.4-mssql-2022-latest
  • GitHub Check: PostgreSQL tests with coverage / PHP 7.4-pgsql-12
  • GitHub Check: PostgreSQL tests / PHP 8.0-pgsql-latest
  • GitHub Check: PostgreSQL tests with coverage / PHP 8.5-pgsql-12
  • GitHub Check: PostgreSQL tests with coverage / PHP 7.4-pgsql-latest
  • GitHub Check: MySQL tests / PHP 8.2-mysql-latest
  • GitHub Check: SQLite tests with coverage / PHP 8.5-ubuntu-22.04
  • GitHub Check: MySQL tests / PHP 8.0-mysql-latest
  • GitHub Check: phpstan / PHP 8.5-ubuntu-latest
  • GitHub Check: PostgreSQL tests with coverage / PHP 8.5-pgsql-17
  • GitHub Check: MySQL tests / PHP 8.1-mysql-latest
  • GitHub Check: SQLite tests with coverage / PHP 7.4-ubuntu-22.04
  • GitHub Check: PostgreSQL tests with coverage / PHP 8.5-pgsql-16
  • GitHub Check: PostgreSQL tests / PHP 8.3-pgsql-latest
  • GitHub Check: PostgreSQL tests / PHP 8.4-pgsql-latest
  • GitHub Check: MariaDB tests / PHP 8.3-mysql-latest
  • GitHub Check: Oracle tests with coverage / PHP 7.4-oracle-slim-faststart
  • GitHub Check: PostgreSQL tests with coverage / PHP 8.5-pgsql-latest
  • GitHub Check: PostgreSQL tests with coverage / PHP 7.4-pgsql-13
  • GitHub Check: SQLite tests with coverage / PHP 7.4-windows-latest
  • GitHub Check: PostgreSQL tests with coverage / PHP 8.5-pgsql-11
  • GitHub Check: PostgreSQL tests with coverage / PHP 8.5-pgsql-15
  • GitHub Check: PostgreSQL tests with coverage / PHP 7.4-pgsql-14
  • GitHub Check: PostgreSQL tests with coverage / PHP 7.4-pgsql-16
  • GitHub Check: phpstan-7x / PHP 7.4-ubuntu-latest
  • GitHub Check: PostgreSQL tests with coverage / PHP 7.4-pgsql-10
  • GitHub Check: php-cs-fixer / PHP 7.4-ubuntu-latest
  • GitHub Check: PostgreSQL tests with coverage / PHP 7.4-pgsql-11
  • GitHub Check: PostgreSQL tests / PHP 8.2-pgsql-latest
  • GitHub Check: Oracle tests with coverage / PHP 8.5-oracle-slim-faststart
  • GitHub Check: PostgreSQL tests / PHP 8.1-pgsql-latest
  • GitHub Check: PHP 7.4
Additional context used
PHPMD (3.0.0)
framework/widgets/Pjax.php

[error] 47-220: The name yii in namespace yii\widgets is not named in CamelCase. (Controversial Rules)

(CamelCaseNamespace)

[error] 47-220: The name widgets in namespace yii\widgets is not named in CamelCase. (Controversial Rules)

(CamelCaseNamespace)

Additional comments: 2
framework/widgets/Pjax.php: 1

16-16: LGTM!

Also applies to: 93-96

framework/CHANGELOG.md: 1

55-55: LGTM!

📝 Summary

Summary by CodeRabbit

  • Documentation
    • Clarified documented types for controller request and response properties, database column operations and connections, logged messages, and URL parsing results.
    • Updated relation property types to include null and specified nullable values for database column metadata.
    • Expanded Pjax scroll documentation to cover dynamic positioning callbacks and clarify scrolling to the Pjax container.
  • Tests
    • Updated logger test data to match the documented message structure.

This change updates PHPDoc annotations for database types, controller and logger properties, URL parsing return values, and Pjax scrolling. Logger test fixtures now use six-field message records. The changelog records the annotation updates.

Changes: PHPDoc annotation updates

Layer / File(s) Summary
Database type annotations
framework/db/ActiveRelationTrait.php, framework/db/ColumnSchema.php, framework/db/Command.php, framework/db/Migration.php, framework/db/QueryBuilder.php, framework/db/{mssql,oci,pgsql,sqlite}/QueryBuilder.php
The documentation now allows null for inverseOf and selected ColumnSchema properties. Column method type parameters now include ColumnSchemaBuilder. Migration::$db has documented read and write types.
Controller and logger annotations
framework/console/Controller.php, framework/web/Controller.php, framework/log/Logger.php, tests/framework/log/LoggerTest.php
Controller annotations distinguish read and write property types. Logger documentation describes six-field records, and test fixtures use six-field records.
URL parsing and Pjax annotations
framework/web/UrlManager.php, framework/web/UrlRule.php, framework/web/UrlRuleInterface.php, framework/widgets/Pjax.php, framework/CHANGELOG.md
The parseRequest() return annotations specify `array

Suggested labels: status:code review

Priority: Low

Change: Other

Merge Risk: Minimal · up to 4b925

The documentation corrections align with the inspected runtime values and test fixtures, so the change is mergeable.

Pre-merge checks: Passed 5
Check name Status Explanation
Title check Passed The title "Multiple type corrections in PHPDoc annotations" matches the changeset. The raw summary shows PHPDoc-only type corrections across about 17 files, including ActiveRelationTrait, Command, Mig…
Description check Passed The description is a PR template with the Q/A table (bugfix, new feature, BC break flags) and an empty fixed-issues field. It does not describe the changes, but it is not off-topic. The objectives sta…
Docstring Coverage Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 10 functions across 17 files. (1 skipped: …
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title "Multiple type corrections in PHPDoc annotations" matches the changeset. The raw summary shows PHPDoc-only type corrections across about 17 files, including ActiveRelationTrait, Command, Migration, QueryBuilder variants, Logger, UrlManager, UrlRule, ColumnSchema, and Pjax. No runtime code changed. The title is specific enough for a reviewer scanning history, though it does not name the individual corrections.

Full details: Description check

Explanation

The description is a PR template with the Q/A table (bugfix, new feature, BC break flags) and an empty fixed-issues field. It does not describe the changes, but it is not off-topic. The objectives state the PR is a PHPDoc type correction with no BC break, which matches the template answers. The check is lenient and the description relates to the changeset in a general way.

Full details: Docstring Coverage

Explanation

Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 10 functions across 17 files. (1 skipped: 1 unsupported.)

Finishing Touches: 💡 1
🛠️ Fix failing CI checks: 💡
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

A rabbit checks the types in rows,
Then hops where nullable wording goes.
Six fields sit in the logger’s tray,
A Pjax scroll can choose its way.
The changelog joins the review today.

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot added the status:code review The pull request needs review. label Oct 23, 2026
@codecov

codecov Bot commented Oct 23, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 81.91%. Comparing base (79b6d5f) to head (4b92500).
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff            @@
##             master   #21124   +/-   ##
=========================================
  Coverage     81.91%   81.91%           
  Complexity    11560    11560           
=========================================
  Files           374      374           
  Lines         30305    30305           
=========================================
  Hits          24824    24824           
  Misses         5481     5481           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@samdark
samdark merged commit bee0737 into yiisoft:master Oct 24, 2026
82 of 84 checks passed
@samdark

samdark commented Oct 24, 2026

Copy link
Copy Markdown
Member

👍

@mspirkov
mspirkov deleted the fix-phpdocs branch October 24, 2026 08:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

status:code review The pull request needs review.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants