-
-
Notifications
You must be signed in to change notification settings - Fork 2
fix(docs): Update workflows and documentation for improved CI/CD processes and feature clarity. #77
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…esses and feature clarity.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #77 +/- ##
===========================================
Coverage 100.00% 100.00%
Complexity 71 71
===========================================
Files 2 2
Lines 129 129
===========================================
Hits 129 129 ☔ View full report in Codecov by Sentry. |
WalkthroughRepo-wide housekeeping: CI workflows switched to yii2-framework reusable actions with permissions and path anchors; templates and Code of Conduct reformatted; README, LICENSE and docs updated; tests reorganized—bootstrap moved to Changes
Sequence Diagram(s)sequenceDiagram
autonumber
participant Dev as Developer (PR)
participant GH as GitHub Actions
participant Reuse as yii2-framework/actions
participant CI as Workflow Jobs
participant Tests as PHPUnit/PHPStan
participant Boot as tests/support/bootstrap.php
Dev->>GH: push PR (workflows, tests, docs, stubs)
GH->>Reuse: uses: yii2-framework/...@v1
Reuse->>CI: run jobs (phpunit, phpstan, ecs, super-linter)
CI->>Tests: execute suites
Tests->>Boot: require 'tests/support/bootstrap.php'
Boot-->>Tests: initialize autoloader & Yii
Tests-->>CI: report results
CI-->>GH: update status checks
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Poem
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (7)
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. Comment |
…roved dependency management.
…ependency management.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 2
🧹 Nitpick comments (1)
.github/workflows/linter.yml (1)
1-17
: Pin external workflow reference for reproducibility
Verifiedyii2-framework/actions/.github/workflows/super-linter.yml@v1
exists and was updated on 2025-10-08; to avoid unexpected changes, reference a specific commit SHA or semantic version tag instead of@v1
.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (2)
docs/svgs/features-mobile.svg
is excluded by!**/*.svg
docs/svgs/features.svg
is excluded by!**/*.svg
📒 Files selected for processing (64)
.github/CODE_OF_CONDUCT.md
(3 hunks).github/FUNDING.yml
(1 hunks).github/ISSUE_TEMPLATE.md
(1 hunks).github/PULL_REQUEST_TEMPLATE.md
(1 hunks).github/dependabot.yml
(1 hunks).github/linters/actionlint.yml
(1 hunks).github/workflows/build.yml
(1 hunks).github/workflows/dependency-check.yml
(1 hunks).github/workflows/ecs.yml
(1 hunks).github/workflows/linter.yml
(1 hunks).github/workflows/static.yml
(1 hunks).gitignore
(2 hunks)CHANGELOG.md
(1 hunks)LICENSE
(1 hunks)LICENSE.md
(0 hunks)README.md
(3 hunks)phpstan-console.neon
(1 hunks)phpstan.neon
(1 hunks)phpunit.xml.dist
(1 hunks)tests/ServiceMapBehaviorTest.php
(2 hunks)tests/ServiceMapComponentTest.php
(2 hunks)tests/ServiceMapServiceTest.php
(1 hunks)tests/bootstrap.php
(0 hunks)tests/config/components-unsupported-id-not-string.php
(1 hunks)tests/config/definitions-unsupported-id-not-string.php
(1 hunks)tests/config/phpstan-config.php
(1 hunks)tests/config/singletons-unsupported-id-not-string.php
(1 hunks)tests/data/method/BehaviorMethodsClassReflectionType.php
(1 hunks)tests/data/property/BehaviorPropertiesClassReflectionType.php
(1 hunks)tests/data/property/UserPropertiesClassReflectionType.php
(1 hunks)tests/data/type/ActiveQueryDynamicMethodReturnType.php
(8 hunks)tests/data/type/ActiveRecordDynamicMethodReturnType.php
(9 hunks)tests/data/type/ActiveRecordDynamicStaticMethodReturnType.php
(2 hunks)tests/data/type/ActiveRecordGetAttributeDynamicMethodReturnType.php
(1 hunks)tests/data/type/ContainerDynamicMethodReturnType.php
(15 hunks)tests/data/type/ServiceLocatorDynamicMethodReturnType.php
(3 hunks)tests/method/BehaviorMethodsClassReflectionExtensionTest.php
(1 hunks)tests/property/BehaviorPropertiesClassReflectionExtensionTest.php
(1 hunks)tests/property/UserPropertiesClassReflectionExtensionTest.php
(1 hunks)tests/support/bootstrap.php
(1 hunks)tests/support/extension-test.neon
(1 hunks)tests/support/stub/ApplicationCustom.php
(1 hunks)tests/support/stub/BehaviorOne.php
(1 hunks)tests/support/stub/BehaviorTwo.php
(1 hunks)tests/support/stub/Category.php
(1 hunks)tests/support/stub/ModelWithConflictingProperty.php
(1 hunks)tests/support/stub/ModelWithMultipleBehaviors.php
(1 hunks)tests/support/stub/MyActiveRecord.php
(1 hunks)tests/support/stub/MyComponent.php
(1 hunks)tests/support/stub/NestedSetsBehavior.php
(1 hunks)tests/support/stub/NestedSetsModel.php
(1 hunks)tests/support/stub/Post.php
(1 hunks)tests/support/stub/PostQuery.php
(1 hunks)tests/support/stub/SlugBehavior.php
(1 hunks)tests/support/stub/User.php
(1 hunks)tests/type/ActiveQueryDynamicReturnTypeExtensionTest.php
(1 hunks)tests/type/ActiveRecordDynamicMethodReturnTypeExtensionTest.php
(1 hunks)tests/type/ActiveRecordDynamicStaticMethodReturnTypeExtensionTest.php
(1 hunks)tests/type/ActiveRecordGetAttributeDynamicMethodReturnTypeExtensionTest.php
(1 hunks)tests/type/ContainerDynamicMethodReturnTypeExtensionTest.php
(1 hunks)tests/type/HeaderCollectionDynamicMethodReturnTypeExtensionTest.php
(1 hunks)tests/type/ServiceLocatorDynamicMethodReturnTypeExtensionTest.php
(1 hunks)tests/web/data/property/ApplicationPropertiesClassReflectionType.php
(1 hunks)tests/web/property/ApplicationPropertiesClassReflectionExtensionTest.php
(1 hunks)
💤 Files with no reviewable changes (2)
- LICENSE.md
- tests/bootstrap.php
🧰 Additional context used
🧠 Learnings (1)
📚 Learning: 2025-06-14T17:41:48.820Z
Learnt from: terabytesoftw
PR: yii2-extensions/phpstan#40
File: src/ServiceMap.php:0-0
Timestamp: 2025-06-14T17:41:48.820Z
Learning: The yii2-extensions/phpstan repository contains a PHPStan extension specifically designed for static analysis of Yii framework applications.
Applied to files:
README.md
🧬 Code graph analysis (13)
tests/config/definitions-unsupported-id-not-string.php (1)
tests/support/stub/MyActiveRecord.php (1)
MyActiveRecord
(23-48)
tests/data/method/BehaviorMethodsClassReflectionType.php (1)
tests/support/stub/MyComponent.php (1)
MyComponent
(22-28)
tests/ServiceMapComponentTest.php (2)
tests/support/stub/MyActiveRecord.php (1)
MyActiveRecord
(23-48)tests/support/stub/User.php (1)
User
(26-66)
tests/data/property/BehaviorPropertiesClassReflectionType.php (1)
tests/support/stub/MyComponent.php (1)
MyComponent
(22-28)
tests/config/components-unsupported-id-not-string.php (1)
tests/support/stub/MyActiveRecord.php (1)
MyActiveRecord
(23-48)
tests/ServiceMapBehaviorTest.php (4)
tests/support/stub/BehaviorOne.php (1)
BehaviorOne
(22-56)tests/support/stub/BehaviorTwo.php (1)
BehaviorTwo
(22-40)tests/support/stub/MyComponent.php (1)
MyComponent
(22-28)src/ServiceMap.php (1)
getBehaviorsByClassName
(170-173)
tests/data/type/ActiveRecordDynamicStaticMethodReturnType.php (3)
tests/support/stub/Category.php (1)
Category
(31-46)tests/support/stub/MyActiveRecord.php (1)
MyActiveRecord
(23-48)tests/support/stub/User.php (1)
User
(26-66)
tests/data/type/ActiveRecordDynamicMethodReturnType.php (3)
tests/support/stub/Category.php (1)
Category
(31-46)tests/support/stub/MyActiveRecord.php (1)
MyActiveRecord
(23-48)tests/support/stub/User.php (1)
User
(26-66)
tests/config/singletons-unsupported-id-not-string.php (1)
tests/support/stub/MyActiveRecord.php (1)
MyActiveRecord
(23-48)
tests/data/type/ServiceLocatorDynamicMethodReturnType.php (1)
tests/support/stub/MyActiveRecord.php (1)
MyActiveRecord
(23-48)
tests/ServiceMapServiceTest.php (1)
tests/support/stub/MyActiveRecord.php (1)
MyActiveRecord
(23-48)
tests/data/type/ContainerDynamicMethodReturnType.php (1)
tests/support/stub/MyActiveRecord.php (1)
MyActiveRecord
(23-48)
tests/data/type/ActiveQueryDynamicMethodReturnType.php (3)
tests/support/stub/MyActiveRecord.php (1)
MyActiveRecord
(23-48)tests/support/stub/Post.php (2)
Post
(35-49)find
(40-43)tests/support/stub/PostQuery.php (1)
published
(40-43)
🪛 actionlint (1.7.7)
.github/workflows/static.yml
11-11: "push" section is alias node but mapping node is expected
(syntax-check)
.github/workflows/build.yml
11-11: "push" section is alias node but mapping node is expected
(syntax-check)
.github/workflows/dependency-check.yml
11-11: "push" section is alias node but mapping node is expected
(syntax-check)
.github/workflows/ecs.yml
11-11: "push" section is alias node but mapping node is expected
(syntax-check)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (5)
- GitHub Check: phpunit / PHP 8.3-ubuntu-latest
- GitHub Check: phpunit-compatibility / PHP 8.1-ubuntu-latest
- GitHub Check: phpunit-compatibility / PHP 8.4-ubuntu-latest
- GitHub Check: linter / Super Linter
- GitHub Check: linter / Super Linter
🔇 Additional comments (70)
.github/FUNDING.yml (1)
1-2
: Funding configuration looks good.YAML header and
github
handle are valid—GitHub Sponsors will pick this up without issues.tests/support/stub/PostQuery.php (1)
5-5
: LGTM! Namespace migration is clean.The namespace update correctly reflects the relocation of test stubs to the
support/stub
directory structure.tests/support/stub/BehaviorTwo.php (1)
5-5
: LGTM! Namespace update is consistent.The namespace change aligns with the broader test stub migration to
tests/support/stub
..github/PULL_REQUEST_TEMPLATE.md (1)
1-8
: LGTM! Template formatting improved.The added spacing enhances readability of the PR template header without changing any functionality.
tests/method/BehaviorMethodsClassReflectionExtensionTest.php (1)
45-45
: LGTM! Configuration path correctly updated.The path change correctly reflects the relocation of
extension-test.neon
to thesupport
directory, consistent with the broader test infrastructure reorganization.phpstan.neon (1)
8-8
: LGTM! Bootstrap path correctly updated.The bootstrap file path update correctly reflects the relocation of the test bootstrap to the
support
directory.tests/support/stub/Category.php (1)
5-5
: LGTM! Namespace migration is consistent.The namespace update correctly follows the pattern established across all test stub files.
LICENSE (1)
5-5
: Verify the copyright year.The copyright year is listed as 2008. Please confirm this is accurate for this project, as the repository history and changelog suggest more recent activity (earliest changelog entry is 2024).
If the year is incorrect, consider updating it to reflect the actual project start date.
CHANGELOG.md (1)
10-10
: LGTM! Changelog entry added.The changelog entry appropriately documents the workflow and documentation updates in this PR.
.gitignore (1)
4-5
: LGTM!The additions of
copilot
and.vscode
ignore patterns are standard practices for preventing accidental commits of AI assistant configurations and IDE-specific workspace settings.Also applies to: 23-24
.github/dependabot.yml (1)
1-15
: LGTM!The Dependabot configuration follows best practices with daily update schedules for both GitHub Actions and Composer dependencies. The
increase-if-necessary
versioning strategy for Composer is a conservative approach that only updates when necessary, which is appropriate for maintaining stability.phpstan-console.neon (2)
11-12
: LGTM!The
ignoreErrors
patterns appropriately suppress coverage warnings for PHPStan's internal reflection APIs, which is reasonable for a PHPStan extension test suite where these calls are expected but not the focus of coverage.
8-8
: Approve phpstan-console.neon changes: The updated bootstrap path points to an existing file (tests/support/bootstrap.php
) that correctly initializes the test environment; the addedignoreErrors
patterns are valid.tests/support/stub/MyComponent.php (1)
5-5
: All references to MyComponent updated to the new tests\support\stub namespace. Verified no remaining imports or usages of the old namespace.tests/support/stub/ApplicationCustom.php (1)
5-5
: No external references to ApplicationCustom
Ripgrep returned no matches for ApplicationCustom outside tests/support/stub/ApplicationCustom.php; the namespace change is safe.tests/support/stub/User.php (1)
5-5
: All User stub references updated The namespace refactor toyii2\extensions\phpstan\tests\support\stub\User
is reflected in all imports and usages across tests and data fixtures.tests/support/stub/ModelWithMultipleBehaviors.php (1)
5-5
: AllModelWithMultipleBehaviors
references now use the new namespace..github/ISSUE_TEMPLATE.md (1)
1-15
: LGTM!The template improvements enhance clarity:
- Consistent heading levels (##) improve document structure
- New "What do you get instead?" section helps distinguish actual from expected behavior
- Markdown table format is more readable than the previous list format
.github/workflows/ecs.yml (3)
3-11
: YAML anchor pattern is valid; actionlint warning is a false positive.The use of YAML anchors (
&ignore-paths
and*ignore-paths
) to centralize the path-ignore list is valid YAML syntax and follows DRY principles. The actionlint warning can be safely ignored.
15-17
: LGTM!Adding explicit permissions follows GitHub Actions security best practices by implementing least-privilege access:
contents: read
- minimum access for checkoutpull-requests: write
- required for commenting on PRs
21-21
: Reusable workflow verified
ecs.yml
exists atyii2-framework/actions/.github/workflows/ecs.yml@v1
..github/workflows/dependency-check.yml (3)
3-11
: YAML anchor pattern is valid; actionlint warning is a false positive.The centralized path-ignore configuration using YAML anchors is valid syntax and improves maintainability. The actionlint warning can be safely ignored.
15-17
: LGTM!Explicit permissions block implements security best practices with least-privilege access.
21-21
: Verified reusable workflow presence Thecomposer-require-checker.yml@v1
workflow inyii2-framework/actions/.github/workflows
is present and accessible..github/workflows/build.yml (4)
3-11
: YAML anchor pattern is valid; actionlint warning is a false positive.The centralized path-ignore configuration using YAML anchors is valid YAML syntax. The actionlint warning can be safely ignored.
15-16
: LGTM!Permissions block implements least-privilege access.
33-33
: LGTM!Adding the
intl
extension to the phpunit-compatibility job is appropriate for testing internationalization-related functionality across different PHP versions.
20-20
: Reusable PHPUnit workflow verified:yii2-framework/actions/.github/workflows/phpunit.yml@v1
exists and is accessible.README.md (7)
36-98
: LGTM!The installation and configuration examples are clear and comprehensive:
- Concise composer installation command
- Well-structured phpstan.neon example with key configuration options
- Practical config/phpstan-config.php demonstrating behaviors and components setup
- Examples follow PHPStan best practices
100-211
: LGTM!The type inference examples effectively demonstrate the extension's capabilities:
- Active Record examples show generic type inference
- Component access shows proper typing based on configuration
- Behavior examples clearly explain property/method resolution
- DI, header collection, and service locator examples are practical
- Each example includes helpful comments explaining the inferred types
29-32
: SVG assets verified: docs/svgs/features.svg and docs/svgs/features-mobile.svg are present.
234-234
: Confirm Super-Linter workflow existsThe
.github/workflows/linter.yml
file is present and correctly references the Super-Linter action, so the badge is valid.
3-7
: Logo images are accessible Both dark and light theme SVG URLs returned HTTP 200.
243-243
: LICENSE file exists, badge link is correct.
224-228
: Verify version badges and CI coverage
- composer.json requires PHP >= 8.1 and Yii ^2.0.53|^22, matching the README badges.
- Ensure your CI matrix includes PHP 8.1+ and runs tests against Yii 2.0.53 and 22.0.x.
tests/support/stub/MyActiveRecord.php (1)
5-5
: All references updated to new namespace
No occurrences of the oldyii2\extensions\phpstan\tests\stub\MyActiveRecord
remain; imports, type hints, and PHPStan configuration now consistently useyii2\extensions\phpstan\tests\support\stub\MyActiveRecord
.phpunit.xml.dist (1)
5-5
: Bootstrap path verified The filetests/support/bootstrap.php
exists and contains the necessary initialization code.tests/support/stub/ModelWithConflictingProperty.php (1)
5-5
: All references updated Verified no occurrences of the old namespace remain; imports and usages all reference yii2\extensions\phpstan\tests\support\stub\ModelWithConflictingProperty.tests/property/BehaviorPropertiesClassReflectionExtensionTest.php (1)
45-45
: LGTM!The path update correctly reflects the relocation of the extension config file to
tests/support/extension-test.neon
.tests/web/property/ApplicationPropertiesClassReflectionExtensionTest.php (1)
45-45
: LGTM!The use of
dirname(__DIR__, 2)
correctly navigates up two directory levels to accommodate the deeper nesting of this test file.tests/support/extension-test.neon (1)
2-2
: LGTM!The include path correctly adjusts for the file's new location in
tests/support/
.tests/type/ContainerDynamicMethodReturnTypeExtensionTest.php (1)
47-47
: LGTM!The path update aligns with the broader test configuration restructuring.
tests/support/stub/NestedSetsBehavior.php (1)
5-5
: LGTM!The namespace correctly reflects the file's new location under
tests/support/stub/
.tests/config/definitions-unsupported-id-not-string.php (1)
5-5
: LGTM!The import path correctly references the updated stub namespace.
tests/type/ActiveRecordDynamicStaticMethodReturnTypeExtensionTest.php (1)
47-47
: LGTM!The configuration path update is consistent with the test support restructuring.
tests/config/phpstan-config.php (1)
6-6
: Old namespace references updated successfully. No occurrences ofyii2\extensions\phpstan\tests\stub\
remain.tests/web/data/property/ApplicationPropertiesClassReflectionType.php (1)
155-155
: LGTM! Namespace migration applied consistently.The type assertion correctly references the new
tests\support\stub\User
namespace, aligning with the test reorganization.tests/ServiceMapComponentTest.php (2)
11-11
: LGTM! Import statement correctly updated.The grouped import statement properly references the new
tests\support\stub
namespace for bothMyActiveRecord
andUser
classes.
75-75
: LGTM! Assertion updated to match new namespace.The expected assertion value correctly references the relocated stub class in the
support\stub
namespace.tests/type/ActiveQueryDynamicReturnTypeExtensionTest.php (1)
47-47
: LGTM! Config path migration applied.The configuration file path correctly points to the relocated
tests/support/extension-test.neon
file.tests/data/method/BehaviorMethodsClassReflectionType.php (1)
7-7
: LGTM! Import statement updated to new namespace.The import correctly references
MyComponent
from the newtests\support\stub
namespace.tests/type/ActiveRecordGetAttributeDynamicMethodReturnTypeExtensionTest.php (1)
50-50
: LGTM! Config path correctly updated.The PHPStan configuration file path properly references the relocated
tests/support/extension-test.neon
.tests/type/HeaderCollectionDynamicMethodReturnTypeExtensionTest.php (1)
48-48
: LGTM! Config path migration complete.The configuration file path correctly points to
tests/support/extension-test.neon
.tests/data/property/UserPropertiesClassReflectionType.php (1)
43-43
: LGTM! Type assertion updated to new namespace.The type assertion correctly references
yii2\extensions\phpstan\tests\support\stub\User|null
, completing the namespace migration for the User stub class.tests/type/ServiceLocatorDynamicMethodReturnTypeExtensionTest.php (1)
47-47
: Approve updated config path references
extension-test.neon
is only referenced viatests/support/extension-test.neon
; no stale paths found.tests/property/UserPropertiesClassReflectionExtensionTest.php (1)
45-45
: LGTM! Config path correctly updated.The path adjustment to load the Neon configuration from the
support
directory is correct and aligns with the test infrastructure reorganization.tests/type/ActiveRecordDynamicMethodReturnTypeExtensionTest.php (1)
47-47
: LGTM! Config path correctly updated.The path adjustment to load the Neon configuration from the
support
directory is correct and consistent with the test infrastructure reorganization.tests/ServiceMapServiceTest.php (1)
15-15
: LGTM! Namespace import correctly updated.The import path update from
tests\stub
totests\support\stub
is correct and aligns with the test stub reorganization.tests/config/singletons-unsupported-id-not-string.php (1)
5-5
: LGTM! Namespace import correctly updated.The import path update to
tests\support\stub
is correct and maintains consistency with the test infrastructure reorganization.tests/config/components-unsupported-id-not-string.php (1)
5-5
: LGTM! Namespace import correctly updated.The import path update to
tests\support\stub
is correct and consistent with the test infrastructure reorganization.tests/support/stub/BehaviorOne.php (1)
5-5
: LGTM! Namespace declaration correctly updated.The namespace update from
tests\stub
totests\support\stub
is correct and represents the new organization for test stub classes.tests/support/stub/Post.php (1)
5-5
: LGTM! Namespace declaration correctly updated.The namespace update to
tests\support\stub
is correct and consistent with the test infrastructure reorganization.tests/data/property/BehaviorPropertiesClassReflectionType.php (1)
7-7
: LGTM — no remaining old namespace references detected.tests/data/type/ServiceLocatorDynamicMethodReturnType.php (1)
11-11
: LGTM! Clean namespace migration.The namespace update from
tests\stub
totests\support\stub
is consistent across the import statement and all type assertion strings. This aligns with the broader test structure reorganization mentioned in the PR objectives.Also applies to: 44-44, 54-54
tests/ServiceMapBehaviorTest.php (1)
11-11
: LGTM! Namespace migration correctly applied to test expectations.The namespace update is consistent across imports and test assertions. The
getBehaviorsByClassName
argument and expected behavior class strings are correctly updated to reference the newtests\support\stub
namespace.Also applies to: 65-70
tests/data/type/ActiveRecordDynamicMethodReturnType.php (1)
8-8
: LGTM! Comprehensive namespace update.The namespace migration is applied consistently throughout the file. All import statements and type assertion strings correctly reference the new
tests\support\stub
namespace forCategory
,MyActiveRecord
, andUser
classes.Also applies to: 61-145
tests/data/type/ActiveRecordGetAttributeDynamicMethodReturnType.php (1)
8-13
: LGTM! Import statement correctly updated.The namespace migration to
tests\support\stub
is correctly applied for all imported test stub classes (ModelWithConflictingProperty
,ModelWithMultipleBehaviors
,NestedSetsModel
,Post
).tests/data/type/ActiveRecordDynamicStaticMethodReturnType.php (1)
8-8
: LGTM! Consistent namespace migration with formatting improvements.The namespace update to
tests\support\stub
is applied consistently across all type assertions. The multi-line formatting of someassertType
calls improves readability without affecting functionality.Also applies to: 46-178
tests/data/type/ActiveQueryDynamicMethodReturnType.php (1)
8-8
: LGTM! Thorough namespace migration across all test cases.The namespace update to
tests\support\stub
is consistently applied throughout all test methods. All type assertions correctly referenceMyActiveRecord
andPost
from the new namespace, and the multi-line formatting enhances readability.Also applies to: 43-302
tests/data/type/ContainerDynamicMethodReturnType.php (1)
10-10
: LGTM! Complete namespace migration for container tests.The namespace update to
tests\support\stub
is correctly applied to both import statements and all references toMyActiveRecord
in type assertions and runtime class name strings. All changes are consistent with the broader test structure reorganization.Also applies to: 48-242
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 2
🧹 Nitpick comments (4)
.gitignore (2)
4-6
: Confirm Copilot ignore path; consider using .copilot/Many setups create a hidden “.copilot/” directory rather than “copilot”. If your environment uses the hidden dir, update the pattern accordingly to avoid missing artifacts.
Suggested change:
-#copilot -copilot +# Copilot +.copilot/
23-25
: .vscode ignore LGTM; optionally allow recommended extensionsIgnoring the entire .vscode folder is fine. If you want to share only recommendations, use negation for extensions list:
-# vscode -.vscode +# VS Code +.vscode/* +!.vscode/extensions.json.github/dependabot.yml (1)
10-15
: Reduce PR noise and add routing metadata (optional)Consider:
- Grouping Composer dev tools (phpstan, ecs, phpunit) and yiisoft deps to batch updates.
- Adding labels/assignees/commit-message prefix and setting time/timezone and open-pull-requests-limit.
Example diff:
- package-ecosystem: "composer" directory: "/" schedule: - interval: "daily" + interval: "daily" + time: "06:00" + timezone: "UTC" versioning-strategy: increase-if-necessary + open-pull-requests-limit: 10 + labels: + - "dependencies" + commit-message: + prefix: "chore(deps)" + groups: + dev-tools: + patterns: + - "phpunit/*" + - "phpstan/*" + - "friendsofphp/*" + - "symfony/*" + update-types: + - "minor" + - "patch" + yiisoft: + patterns: + - "yiisoft/*"tests/support/stub/Post.php (1)
40-43
: Prefer late static binding in find().Using static::class allows correct behavior for subclasses, aligning with Yii AR conventions.
- return new PostQuery(self::class); + return new PostQuery(static::class);
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (2)
docs/svgs/features-mobile.svg
is excluded by!**/*.svg
docs/svgs/features.svg
is excluded by!**/*.svg
📒 Files selected for processing (64)
.github/CODE_OF_CONDUCT.md
(3 hunks).github/FUNDING.yml
(1 hunks).github/ISSUE_TEMPLATE.md
(1 hunks).github/PULL_REQUEST_TEMPLATE.md
(1 hunks).github/dependabot.yml
(1 hunks).github/linters/actionlint.yml
(1 hunks).github/workflows/build.yml
(1 hunks).github/workflows/dependency-check.yml
(1 hunks).github/workflows/ecs.yml
(1 hunks).github/workflows/linter.yml
(1 hunks).github/workflows/static.yml
(1 hunks).gitignore
(2 hunks)CHANGELOG.md
(1 hunks)LICENSE
(1 hunks)LICENSE.md
(0 hunks)README.md
(3 hunks)phpstan-console.neon
(1 hunks)phpstan.neon
(1 hunks)phpunit.xml.dist
(1 hunks)tests/ServiceMapBehaviorTest.php
(2 hunks)tests/ServiceMapComponentTest.php
(2 hunks)tests/ServiceMapServiceTest.php
(1 hunks)tests/bootstrap.php
(0 hunks)tests/config/components-unsupported-id-not-string.php
(1 hunks)tests/config/definitions-unsupported-id-not-string.php
(1 hunks)tests/config/phpstan-config.php
(1 hunks)tests/config/singletons-unsupported-id-not-string.php
(1 hunks)tests/data/method/BehaviorMethodsClassReflectionType.php
(1 hunks)tests/data/property/BehaviorPropertiesClassReflectionType.php
(1 hunks)tests/data/property/UserPropertiesClassReflectionType.php
(1 hunks)tests/data/type/ActiveQueryDynamicMethodReturnType.php
(8 hunks)tests/data/type/ActiveRecordDynamicMethodReturnType.php
(9 hunks)tests/data/type/ActiveRecordDynamicStaticMethodReturnType.php
(2 hunks)tests/data/type/ActiveRecordGetAttributeDynamicMethodReturnType.php
(1 hunks)tests/data/type/ContainerDynamicMethodReturnType.php
(15 hunks)tests/data/type/ServiceLocatorDynamicMethodReturnType.php
(3 hunks)tests/method/BehaviorMethodsClassReflectionExtensionTest.php
(1 hunks)tests/property/BehaviorPropertiesClassReflectionExtensionTest.php
(1 hunks)tests/property/UserPropertiesClassReflectionExtensionTest.php
(1 hunks)tests/support/bootstrap.php
(1 hunks)tests/support/extension-test.neon
(1 hunks)tests/support/stub/ApplicationCustom.php
(1 hunks)tests/support/stub/BehaviorOne.php
(1 hunks)tests/support/stub/BehaviorTwo.php
(1 hunks)tests/support/stub/Category.php
(1 hunks)tests/support/stub/ModelWithConflictingProperty.php
(1 hunks)tests/support/stub/ModelWithMultipleBehaviors.php
(1 hunks)tests/support/stub/MyActiveRecord.php
(1 hunks)tests/support/stub/MyComponent.php
(1 hunks)tests/support/stub/NestedSetsBehavior.php
(1 hunks)tests/support/stub/NestedSetsModel.php
(1 hunks)tests/support/stub/Post.php
(1 hunks)tests/support/stub/PostQuery.php
(1 hunks)tests/support/stub/SlugBehavior.php
(1 hunks)tests/support/stub/User.php
(1 hunks)tests/type/ActiveQueryDynamicReturnTypeExtensionTest.php
(1 hunks)tests/type/ActiveRecordDynamicMethodReturnTypeExtensionTest.php
(1 hunks)tests/type/ActiveRecordDynamicStaticMethodReturnTypeExtensionTest.php
(1 hunks)tests/type/ActiveRecordGetAttributeDynamicMethodReturnTypeExtensionTest.php
(1 hunks)tests/type/ContainerDynamicMethodReturnTypeExtensionTest.php
(1 hunks)tests/type/HeaderCollectionDynamicMethodReturnTypeExtensionTest.php
(1 hunks)tests/type/ServiceLocatorDynamicMethodReturnTypeExtensionTest.php
(1 hunks)tests/web/data/property/ApplicationPropertiesClassReflectionType.php
(1 hunks)tests/web/property/ApplicationPropertiesClassReflectionExtensionTest.php
(1 hunks)
💤 Files with no reviewable changes (2)
- tests/bootstrap.php
- LICENSE.md
🧰 Additional context used
🧠 Learnings (1)
📚 Learning: 2025-06-14T17:41:48.820Z
Learnt from: terabytesoftw
PR: yii2-extensions/phpstan#40
File: src/ServiceMap.php:0-0
Timestamp: 2025-06-14T17:41:48.820Z
Learning: The yii2-extensions/phpstan repository contains a PHPStan extension specifically designed for static analysis of Yii framework applications.
Applied to files:
README.md
🧬 Code graph analysis (13)
tests/data/property/BehaviorPropertiesClassReflectionType.php (1)
tests/support/stub/MyComponent.php (1)
MyComponent
(22-28)
tests/config/components-unsupported-id-not-string.php (1)
tests/support/stub/MyActiveRecord.php (1)
MyActiveRecord
(23-48)
tests/data/type/ActiveRecordDynamicStaticMethodReturnType.php (3)
tests/support/stub/Category.php (1)
Category
(31-46)tests/support/stub/MyActiveRecord.php (1)
MyActiveRecord
(23-48)tests/support/stub/User.php (1)
User
(26-66)
tests/data/type/ServiceLocatorDynamicMethodReturnType.php (1)
tests/support/stub/MyActiveRecord.php (1)
MyActiveRecord
(23-48)
tests/data/type/ActiveQueryDynamicMethodReturnType.php (3)
tests/support/stub/MyActiveRecord.php (1)
MyActiveRecord
(23-48)tests/support/stub/Post.php (2)
Post
(35-49)find
(40-43)tests/support/stub/PostQuery.php (1)
published
(40-43)
tests/ServiceMapServiceTest.php (1)
tests/support/stub/MyActiveRecord.php (1)
MyActiveRecord
(23-48)
tests/ServiceMapBehaviorTest.php (4)
tests/support/stub/BehaviorOne.php (1)
BehaviorOne
(22-56)tests/support/stub/BehaviorTwo.php (1)
BehaviorTwo
(22-40)tests/support/stub/MyComponent.php (1)
MyComponent
(22-28)src/ServiceMap.php (1)
getBehaviorsByClassName
(170-173)
tests/config/definitions-unsupported-id-not-string.php (1)
tests/support/stub/MyActiveRecord.php (1)
MyActiveRecord
(23-48)
tests/data/type/ContainerDynamicMethodReturnType.php (1)
tests/support/stub/MyActiveRecord.php (1)
MyActiveRecord
(23-48)
tests/data/type/ActiveRecordDynamicMethodReturnType.php (3)
tests/support/stub/Category.php (1)
Category
(31-46)tests/support/stub/MyActiveRecord.php (1)
MyActiveRecord
(23-48)tests/support/stub/User.php (1)
User
(26-66)
tests/ServiceMapComponentTest.php (2)
tests/support/stub/MyActiveRecord.php (1)
MyActiveRecord
(23-48)tests/support/stub/User.php (1)
User
(26-66)
tests/config/singletons-unsupported-id-not-string.php (1)
tests/support/stub/MyActiveRecord.php (1)
MyActiveRecord
(23-48)
tests/data/method/BehaviorMethodsClassReflectionType.php (1)
tests/support/stub/MyComponent.php (1)
MyComponent
(22-28)
🪛 actionlint (1.7.7)
.github/workflows/dependency-check.yml
11-11: "push" section is alias node but mapping node is expected
(syntax-check)
.github/workflows/ecs.yml
11-11: "push" section is alias node but mapping node is expected
(syntax-check)
.github/workflows/static.yml
11-11: "push" section is alias node but mapping node is expected
(syntax-check)
.github/workflows/build.yml
11-11: "push" section is alias node but mapping node is expected
(syntax-check)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (18)
- GitHub Check: phpunit / PHP 8.3-windows-2022
- GitHub Check: phpunit-compatibility / PHP 8.1-ubuntu-latest
- GitHub Check: linter / Super Linter
- GitHub Check: easy-coding-standard / PHP 8.4-ubuntu-latest
- GitHub Check: phpstan / PHP 8.4-ubuntu-latest
- GitHub Check: phpstan-console / PHP 8.4-ubuntu-latest
- GitHub Check: composer-require-checker / PHP 8.4-ubuntu-latest
- GitHub Check: Analyze (actions)
- GitHub Check: phpunit / PHP 8.3-windows-2022
- GitHub Check: phpunit / PHP 8.3-ubuntu-latest
- GitHub Check: phpunit / PHP 8.1-ubuntu-latest
- GitHub Check: phpunit-compatibility / PHP 8.2-ubuntu-latest
- GitHub Check: phpunit-compatibility / PHP 8.1-ubuntu-latest
- GitHub Check: phpunit-compatibility / PHP 8.3-windows-2022
- GitHub Check: linter / Super Linter
- GitHub Check: phpstan / PHP 8.4-ubuntu-latest
- GitHub Check: composer-require-checker / PHP 8.4-ubuntu-latest
- GitHub Check: easy-coding-standard / PHP 8.4-ubuntu-latest
🔇 Additional comments (79)
.github/dependabot.yml (1)
5-8
: Dependabot config correct All workflows reference versioned Actions (no @main/@master); composer.json present at repo root.tests/support/stub/ModelWithMultipleBehaviors.php (1)
5-5
: LGTM! Namespace change aligns with test structure refactor.The namespace update from
yii2\extensions\phpstan\tests\stub
toyii2\extensions\phpstan\tests\support\stub
is consistent with the broader reorganization of test stubs in this PR..github/FUNDING.yml (1)
1-2
: LGTM! Standard GitHub funding configuration.The YAML document marker and funding entry syntax are correct. This properly configures GitHub Sponsors for the repository.
.github/workflows/linter.yml (2)
8-11
: LGTM! Appropriate permissions following least-privilege principle.The permissions block correctly grants minimal necessary access: read for contents, write for checks and statuses. This is a security best practice.
13-17
: LGTM! Properly delegates to reusable workflow.The workflow correctly references the shared super-linter from yii2-framework/actions and securely passes the GITHUB_TOKEN. This aligns with the PR's goal of standardizing CI/CD processes.
tests/support/stub/ModelWithConflictingProperty.php (1)
5-5
: LGTM! Namespace change consistent with refactor.The namespace update aligns with the broader test stub reorganization to
tests\support\stub
..github/linters/actionlint.yml (1)
1-7
: LGTM! Appropriate suppressions for workflow alias format.The ignores correctly suppress actionlint warnings about alias nodes in workflow trigger sections, which is expected when using the sequence format for
pull_request
andpush
triggers (as seen in linter.yml)..github/PULL_REQUEST_TEMPLATE.md (1)
1-8
: LGTM! Improved template formatting.The reformatting adds a clear section title and improves table readability while maintaining the same functional content.
tests/support/stub/ApplicationCustom.php (1)
5-5
: LGTM! Namespace change consistent with refactor.The namespace update maintains consistency with the test stub reorganization pattern applied across the PR.
.github/ISSUE_TEMPLATE.md (1)
1-15
: LGTM! Improved issue template structure.The restructuring provides clearer section headers and a well-formatted metadata table, improving the issue reporting experience for contributors.
tests/data/type/ActiveRecordDynamicMethodReturnType.php (1)
8-8
: LGTM! Namespace updates are consistent.The import and assertType namespace references have been correctly updated to reflect the relocation of test stubs from
tests\stub
totests\support\stub
. All references are consistent throughout the file.Also applies to: 61-61, 71-71, 81-81, 91-92, 121-121, 131-131, 144-145, 154-154
.github/CODE_OF_CONDUCT.md (1)
12-24
: LGTM! Formatting and wording improvements.The changes standardize the formatting and normalize the wording throughout the Code of Conduct document. No policy content has been modified.
Also applies to: 28-34, 39-39, 57-57, 69-69
.github/workflows/build.yml (3)
26-27
: Clarify the purpose of the empty hook section.The
hook
section is defined but contains no content. Is this intentional as a placeholder for future use, or should it be removed?
20-20
: LGTM! Action source migration looks correct.The migration from
php-forge/actions
toyii2-framework/actions
is consistent with the broader repository refactoring. The simplified composer command and extension configuration updates are appropriate.Also applies to: 24-24, 29-29
3-11
: No changes needed. The YAML alias for path ignores is valid in GitHub Actions and matches existing repository conventions..github/workflows/static.yml (2)
15-18
: LGTM! Permissions and action updates are appropriate.The addition of
contents: read
andpull-requests: write
permissions is appropriate for a static analysis workflow. The migration toyii2-framework/actions
is consistent with other workflow updates.Also applies to: 21-21, 25-25
3-11
: Remove alias syntax check YAML anchors are valid and supported by GitHub Actions; no changes needed.Likely an incorrect or invalid review comment.
phpstan-console.neon (1)
8-8
: LGTM! Bootstrap path update is correct.The bootstrap path has been correctly updated to reflect the relocated test support infrastructure.
tests/support/stub/BehaviorTwo.php (1)
5-5
: LGTM! Namespace update is correct.The namespace has been properly updated to reflect the new location of the stub file under
tests/support/stub
.tests/property/BehaviorPropertiesClassReflectionExtensionTest.php (1)
45-45
: LGTM! Configuration path update is correct.The configuration path has been correctly updated to reference the relocated test extension configuration under the
support
directory.tests/type/ServiceLocatorDynamicMethodReturnTypeExtensionTest.php (1)
47-47
: LGTM! Configuration path update is correct.The configuration path has been correctly updated to reference the relocated test extension configuration under the
support
directory, consistent with the broader test infrastructure reorganization.tests/support/stub/PostQuery.php (1)
5-5
: Namespace move confirmed.No functional changes; generics and return typing remain consistent.
tests/data/method/BehaviorMethodsClassReflectionType.php (1)
7-7
: Updated import path LGTM.Matches new support\stub location for MyComponent; type assertions remain valid.
tests/support/stub/BehaviorOne.php (1)
5-5
: Namespace relocation LGTM.Docblocks/generics resolve correctly within the same namespace.
CHANGELOG.md (1)
10-10
: Changelog entry looks good.Entry for Bug #76 is clear and consistent with prior format.
tests/support/stub/Post.php (1)
5-5
: Namespace relocation LGTM.Custom query wiring remains intact.
tests/support/stub/Category.php (1)
5-5
: Namespace relocation validated. No stale references to the oldtests\stub
namespace were detected.tests/support/extension-test.neon (1)
2-2
: Include paths verified –../../extension.neon
correctly targetsextension.neon
at the project root, and%rootDir%/../../../tests/config/phpstan-config.php
resolves totests/config/phpstan-config.php
.tests/type/ContainerDynamicMethodReturnTypeExtensionTest.php (1)
47-47
: LGTM! Configuration path correctly updated.The path now points to
support/extension-test.neon
, aligning with the test structure reorganization.tests/type/ActiveRecordDynamicMethodReturnTypeExtensionTest.php (1)
47-47
: LGTM! Configuration path correctly updated.The path now points to
support/extension-test.neon
, consistent with the test structure reorganization.tests/support/stub/SlugBehavior.php (1)
5-5
: LGTM! Namespace declaration correctly updated.The namespace declaration matches the new file location under
tests/support/stub/
.tests/data/property/UserPropertiesClassReflectionType.php (1)
43-43
: LGTM! Type assertion correctly updated.The type assertion now references the new namespace
yii2\extensions\phpstan\tests\support\stub\User|null
, ensuring PHPStan type inference tests match the refactored structure.tests/data/property/BehaviorPropertiesClassReflectionType.php (1)
7-7
: LGTM! Import statement correctly updated.The import now references
yii2\extensions\phpstan\tests\support\stub\MyComponent
, consistent with the test structure reorganization.tests/method/BehaviorMethodsClassReflectionExtensionTest.php (1)
45-45
: LGTM! Configuration path correctly updated.The path now points to
support/extension-test.neon
, consistent with the test structure reorganization applied across all test extension classes.tests/config/components-unsupported-id-not-string.php (1)
5-5
: Tests stub namespace update approved
All occurrences ofyii2\extensions\phpstan\tests\stub
have been replaced withtests\support\stub
.phpstan.neon (1)
8-8
: Bootstrap path update confirmedThe file
tests/support/bootstrap.php
exists and includes the necessary initialization (error reporting, autoloader, Yii setup).tests/support/stub/User.php (1)
5-5
: Namespace update aligns with test restructuring.The namespace change correctly reflects the relocation of test stubs to the
support
directory, maintaining consistency with the broader refactoring effort across the test suite.tests/ServiceMapServiceTest.php (1)
15-15
: Import path correctly updated.The import statement properly reflects the new location of
MyActiveRecord
in thesupport\stub
namespace, aligning with the test restructuring.tests/data/type/ServiceLocatorDynamicMethodReturnType.php (1)
11-11
: Import and type assertions consistently updated.The import statement, type assertion, and string literal for
MyActiveRecord
are all correctly updated to reference the newsupport\stub
namespace, maintaining consistency across the test file.Also applies to: 44-44, 54-54
phpunit.xml.dist (1)
5-5
: Bootstrap path updated to new location.The bootstrap path correctly points to the relocated test bootstrap file at
tests/support/bootstrap.php
, as confirmed by the PR summary indicating this file was added as part of the restructuring.tests/support/stub/NestedSetsModel.php (1)
5-5
: Namespace update aligns with test restructuring.The namespace change correctly reflects the relocation of test stubs to the
support
directory, consistent with the broader refactoring effort.tests/web/property/ApplicationPropertiesClassReflectionExtensionTest.php (1)
45-45
: Config path correctly updated.The path construction properly references the relocated extension test configuration at
tests/support/extension-test.neon
, correctly usingdirname(__DIR__, 2)
to navigate fromtests/web/property
to thetests
directory.tests/ServiceMapComponentTest.php (1)
11-11
: Import consolidation and assertion update are correct.The grouped import statement efficiently combines
MyActiveRecord
andUser
from the newsupport\stub
namespace. The assertion at line 75 correctly expects the updated namespace path for theUser
identity class.Also applies to: 75-75
tests/type/ActiveRecordDynamicStaticMethodReturnTypeExtensionTest.php (1)
47-47
: Config path correctly updated.The path construction properly references the relocated extension test configuration at
tests/support/extension-test.neon
, correctly usingdirname(__DIR__)
to navigate fromtests/type
to thetests
directory.tests/property/UserPropertiesClassReflectionExtensionTest.php (1)
45-45
: LGTM! Config path correctly updated.The config file path has been updated to reflect the new location under the
support/
subdirectory, consistent with the repository-wide test organization refactoring.tests/config/phpstan-config.php (1)
6-17
: LGTM! Import namespace correctly updated.The grouped import statement has been updated to use the new
support\stub
namespace while preserving all the imported classes. This change aligns with the test stub relocation.tests/data/type/ContainerDynamicMethodReturnType.php (2)
10-10
: LGTM! Import namespace correctly updated.The import statement has been updated to reference the new
support\stub
namespace location forMyActiveRecord
.
48-243
: LGTM – namespace migration complete All type assertion strings referenceyii2\extensions\phpstan\tests\support\stub
, and no stale occurrences of the old namespace remain.tests/support/stub/MyActiveRecord.php (1)
5-5
: LGTM! Namespace declaration correctly updated.The namespace has been updated to
yii2\extensions\phpstan\tests\support\stub
to reflect the new file location. This change is consistent with the repository-wide test stub reorganization.tests/config/singletons-unsupported-id-not-string.php (1)
5-5
: LGTM! Import namespace correctly updated.The import statement has been updated to use the new
support\stub
namespace, maintaining consistency with the test stub relocation.tests/support/stub/MyComponent.php (1)
5-5
: LGTM! Namespace declaration correctly updated.The namespace has been updated to match the new file location under
support\stub
, consistent with the test infrastructure reorganization.tests/type/ActiveRecordGetAttributeDynamicMethodReturnTypeExtensionTest.php (1)
50-50
: LGTM! Config path correctly updated.The configuration file path has been updated to load from the
support/
subdirectory, aligning with the repository-wide test organization improvements.tests/config/definitions-unsupported-id-not-string.php (1)
5-5
: LGTM! Import namespace correctly updated.The import statement has been updated to reference the new
support\stub
namespace, completing the consistent namespace migration across test configuration files.tests/data/type/ActiveRecordGetAttributeDynamicMethodReturnType.php (1)
8-13
: LGTM! Namespace update aligns with test reorganization.The import statement correctly reflects the move of test stubs from
tests\stub
totests\support\stub
.tests/web/data/property/ApplicationPropertiesClassReflectionType.php (1)
155-155
: LGTM! Type assertion updated correctly.The expected generic type parameter now correctly references
yii2\extensions\phpstan\tests\support\stub\User
, consistent with the namespace reorganization.tests/support/stub/NestedSetsBehavior.php (1)
5-5
: LGTM! Namespace updated for file relocation.The namespace correctly reflects the new location at
tests/support/stub/
.tests/ServiceMapBehaviorTest.php (2)
11-11
: LGTM! Import statement updated correctly.The import now references the relocated stub classes at
tests\support\stub
.
65-74
: LGTM! String references updated to match new namespace.The fully-qualified class name strings correctly reflect the new
tests\support\stub
namespace forMyComponent
,BehaviorOne
, andBehaviorTwo
..github/workflows/dependency-check.yml (3)
3-11
: LGTM! YAML anchor/alias pattern is valid syntax.The use of YAML anchors (
&ignore-paths
) and aliases (*ignore-paths
) to deduplicate path-ignore rules is correct YAML syntax. The actionlint warning is a false positive.
15-17
: LGTM! Permissions follow least-privilege principle.The explicit permissions grant only necessary access:
contents: read
andpull-requests: write
, which is appropriate for a dependency check workflow.
21-21
: Verified yii2-framework/actions contains composer-require-checker.yml@v1.tests/data/type/ActiveRecordDynamicStaticMethodReturnType.php (2)
8-8
: LGTM! Import statement updated correctly.The import now references stub classes from the relocated
tests\support\stub
namespace.
46-178
: LGTM! Type assertions updated consistently.All
assertType
calls now reference the correct namespace (yii2\extensions\phpstan\tests\support\stub
) forCategory
,MyActiveRecord
, andUser
. The changes are consistent throughout the file.tests/type/ActiveQueryDynamicReturnTypeExtensionTest.php (1)
47-47
: Approve config file path update Verified thattests/support/extension-test.neon
exists.tests/support/bootstrap.php (1)
1-16
: Bootstrap file referenced in PHPUnit and PHPStan configsphpunit.xml.dist (line 5), phpstan-console.neon (line 8) and phpstan.neon (line 8) include tests/support/bootstrap.php.
tests/type/HeaderCollectionDynamicMethodReturnTypeExtensionTest.php (1)
48-48
: LGTM! Configuration path updated correctly.The path update to include the
/support/
subdirectory aligns with the test infrastructure reorganization described in the PR summary.tests/data/type/ActiveQueryDynamicMethodReturnType.php (2)
8-8
: LGTM! Import statement updated to new namespace.The namespace change from
tests\stub
totests\support\stub
is consistent with the test infrastructure reorganization.
43-302
: LGTM! All type assertions updated consistently.All
assertType
string literals have been correctly updated to reference the new namespaceyii2\extensions\phpstan\tests\support\stub
. The changes are thorough and consistent throughout the file..github/workflows/ecs.yml (3)
15-17
: LGTM! Permissions block added correctly.The permissions block appropriately restricts workflow access to only what's needed: read access to contents and write access to pull requests.
21-21
: LGTM! Workflow source updated.The action source has been updated from
php-forge/actions
toyii2-framework/actions
, which aligns with the PR objectives for improved CI/CD processes.
3-11
: Approve YAML anchor usage in workflow triggers
GitHub Actions accepts YAML anchors/aliases in theon
block (confirmed via GH API), so no changes are needed.README.md (8)
1-11
: LGTM! Header section improved with modern branding.The header now includes proper dark/light mode logo support with the picture element, improving the visual presentation across different color schemes. The markdownlint disable/enable comments are appropriately placed.
22-25
: LGTM! Subtitle added for better context.The centered subtitle clearly communicates the extension's purpose and key capabilities, improving the documentation's clarity.
29-32
: LGTM! Feature presentation modernized.Using responsive SVG images for the feature overview is a good approach, with proper mobile fallback support.
40-92
: LGTM! Quick start section well-structured.The installation and configuration examples are clear and comprehensive, providing both PHPStan configuration and sample config file examples that users can easily adapt.
100-211
: LGTM! Type inference examples are comprehensive.The examples cover all major use cases (Active Record, application components, behaviors, dependency injection, header collection, and service locator) with clear inline comments showing the expected types. This provides excellent guidance for users.
234-234
: LGTM! Super-Linter badge added.The addition of the Super-Linter workflow badge enhances visibility of code quality checks.
243-243
: LGTM! License badge updated with enhanced styling.The BSD-3-Clause license badge now includes improved branding with the Open Source Initiative logo.
224-226
: Correct Yii badge version in README
Replace the third badge’s label “Yii 22.0.x” with “Yii 2.0.x” and update its link from/tree/22.0
to/tree/2.0
.⛔ Skipped due to learnings
Learnt from: terabytesoftw PR: yii2-extensions/phpstan#60 File: composer.json:14-15 Timestamp: 2025-06-27T08:46:56.224Z Learning: The yiisoft/yii2 package has a 22.0 development branch available on Packagist as 22.0.x-dev, making the version constraint ^22 valid in composer.json files.
…dist` for improved readability.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (10)
.editorconfig
(1 hunks).github/workflows/build.yml
(1 hunks).github/workflows/static.yml
(1 hunks).styleci.yml
(1 hunks)CHANGELOG.md
(4 hunks)README.md
(6 hunks)composer.json
(1 hunks)docs/examples.md
(25 hunks)docs/installation.md
(3 hunks)extension.neon
(1 hunks)
✅ Files skipped from review due to trivial changes (5)
- docs/examples.md
- .editorconfig
- extension.neon
- docs/installation.md
- composer.json
🧰 Additional context used
🧠 Learnings (3)
📚 Learning: 2025-06-14T17:41:48.820Z
Learnt from: terabytesoftw
PR: yii2-extensions/phpstan#40
File: src/ServiceMap.php:0-0
Timestamp: 2025-06-14T17:41:48.820Z
Learning: The yii2-extensions/phpstan repository contains a PHPStan extension specifically designed for static analysis of Yii framework applications.
Applied to files:
README.md
📚 Learning: 2025-10-10T12:54:55.168Z
Learnt from: terabytesoftw
PR: yii2-extensions/phpstan#77
File: .github/workflows/static.yml:3-0
Timestamp: 2025-10-10T12:54:55.168Z
Learning: In GitHub Actions workflows for the yii2-extensions/phpstan repository, the user prefers to use YAML anchors as `pull_request: &ignore-paths` with the full mapping rather than anchoring just the `paths-ignore` list, as this pattern has proven to work correctly for them across multiple repositories despite actionlint warnings.
Applied to files:
.github/workflows/build.yml
.github/workflows/static.yml
📚 Learning: 2025-10-10T12:54:50.133Z
Learnt from: terabytesoftw
PR: yii2-extensions/phpstan#77
File: .github/linters/actionlint.yml:5-7
Timestamp: 2025-10-10T12:54:50.133Z
Learning: In the yii2-extensions/phpstan repository, the maintainer prefers to keep the actionlint.yml configuration with the generic ignore entry `"section is alias node but mapping node is expected"` as it works correctly for their workflows, and previous suggestions to change it have failed in other repositories.
Applied to files:
.github/workflows/static.yml
🪛 actionlint (1.7.7)
.github/workflows/build.yml
11-11: "push" section is alias node but mapping node is expected
(syntax-check)
.github/workflows/static.yml
11-11: "push" section is alias node but mapping node is expected
(syntax-check)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (19)
- GitHub Check: phpstan / PHP 8.4-ubuntu-latest
- GitHub Check: phpunit / PHP 8.4-ubuntu-latest
- GitHub Check: phpunit / PHP 8.3-windows-2022
- GitHub Check: phpunit / PHP 8.1-windows-2022
- GitHub Check: phpunit / PHP 8.2-ubuntu-latest
- GitHub Check: phpunit-compatibility / PHP 8.3-windows-2022
- GitHub Check: phpunit-compatibility / PHP 8.3-ubuntu-latest
- GitHub Check: phpunit-compatibility / PHP 8.1-windows-2022
- GitHub Check: phpunit-compatibility / PHP 8.2-windows-2022
- GitHub Check: phpunit-compatibility / PHP 8.4-ubuntu-latest
- GitHub Check: phpunit-compatibility / PHP 8.1-ubuntu-latest
- GitHub Check: phpunit-compatibility / PHP 8.2-ubuntu-latest
- GitHub Check: linter / Super Linter
- GitHub Check: easy-coding-standard / PHP 8.4-ubuntu-latest
- GitHub Check: composer-require-checker / PHP 8.4-ubuntu-latest
- GitHub Check: phpunit / PHP 8.3-ubuntu-latest
- GitHub Check: phpunit / PHP 8.1-ubuntu-latest
- GitHub Check: phpunit-compatibility / PHP 8.4-ubuntu-latest
- GitHub Check: linter / Super Linter
🔇 Additional comments (1)
.github/workflows/build.yml (1)
24-24
: Fix the Yii2 version constraint.
composer require yiisoft/yii2:22.0.x-dev
installs a non-existent release, so this job will fail at runtime. Switch back to the 2.x constraint used previously.Apply this diff:
- composer-command: require yiisoft/yii2:22.0.x-dev + composer-command: require yiisoft/yii2:2.0.x-dev⛔ Skipped due to learnings
Learnt from: terabytesoftw PR: yii2-extensions/phpstan#60 File: composer.json:14-15 Timestamp: 2025-06-27T08:46:56.224Z Learning: The yiisoft/yii2 package has a 22.0 development branch available on Packagist as 22.0.x-dev, making the version constraint ^22 valid in composer.json files.
… file patterns are included.
…nd testing guides.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
.gitignore
(2 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (7)
- GitHub Check: phpunit / PHP 8.2-ubuntu-latest
- GitHub Check: phpunit-compatibility / PHP 8.4-windows-2022
- GitHub Check: phpunit-compatibility / PHP 8.2-ubuntu-latest
- GitHub Check: phpunit-compatibility / PHP 8.3-ubuntu-latest
- GitHub Check: phpunit-compatibility / PHP 8.2-windows-2022
- GitHub Check: linter / Super Linter
- GitHub Check: linter / Super Linter
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (3)
.gitignore (3)
7-8
: Narrow the “copilot” ignore to intended toolingBare “copilot” will ignore any directory named copilot (e.g., AWS Copilot apps). If the intent is GitHub Copilot settings, scope it explicitly.
-#copilot -copilot +# GitHub Copilot config (if present) +.copilot/ +.github/copilot/**
17-19
: Tighten PHPUnit globs to avoid over-matching
phpunit.*
and.phpunit.*
will ignore any file starting with that prefix (e.g., phpunit.php). Prefer targeting the XML and cache artifacts only. This also aligns with the earlier “phpunit.xml*” guidance.-# phpunit -.phpunit.* -phpunit.* +# phpunit +.phpunit.result.cache +phpunit.xml*
2-2
: Scope common directories to repo rootUsing root-anchored patterns prevents accidentally ignoring similarly named folders in fixtures/examples.
-code_coverage +/code_coverage -node_modules +/node_modules -vendor +/vendorAlso applies to: 11-11, 21-21
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
.gitignore
(1 hunks)docs/configuration.md
(16 hunks)
✅ Files skipped from review due to trivial changes (1)
- docs/configuration.md
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (8)
- GitHub Check: phpunit-compatibility / PHP 8.3-windows-2022
- GitHub Check: phpunit-compatibility / PHP 8.4-windows-2022
- GitHub Check: phpunit-compatibility / PHP 8.1-ubuntu-latest
- GitHub Check: phpunit / PHP 8.3-windows-2022
- GitHub Check: phpunit / PHP 8.3-ubuntu-latest
- GitHub Check: phpunit / PHP 8.2-ubuntu-latest
- GitHub Check: linter / Super Linter
- GitHub Check: linter / Super Linter
🔇 Additional comments (1)
.gitignore (1)
4-6
: LGTM: composer.lock ignored (library best practice)Libraries typically do not commit composer.lock. This entry is appropriate.
Summary by CodeRabbit
Documentation
Chores
CI/CD
Tests