-
-
Notifications
You must be signed in to change notification settings - Fork 0
docs: Update README and testing documentation to include new features and testing instructions.
#58
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
…es and testing instructions.
|
Warning Rate limit exceeded@terabytesoftw has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 17 minutes and 58 seconds before requesting another review. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. 📒 Files selected for processing (3)
WalkthroughThe changes expand and restructure the documentation, primarily enhancing the README.md with comprehensive usage instructions, schema examples, and code samples. Additional documentation improvements include new sections in docs/testing.md for code quality tools. PHPDoc annotations in several test model files were updated from Changes
Sequence Diagram(s)No sequence diagram generated as the changes are documentation and annotation updates only. Possibly related PRs
Poem
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #58 +/- ##
===========================================
Coverage 100.00% 100.00%
Complexity 134 134
===========================================
Files 4 4
Lines 525 525
===========================================
Hits 525 525 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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 (5)
docs/testing.md (1)
13-20: Capitalize product name & add config pointer“Easy coding standard” should be “Easy Coding Standard”. Additionally, consider mentioning the location of the ECS config file (
ecs.php) to help newcomers.-## Easy coding standard +## Easy Coding Standard ... -composer run ecs +composer run ecs # Uses the configuration in ecs.phpREADME.md (4)
22-24: Stryker badge reliabilityThe badge is fetched from the public Stryker endpoint. That service is occasionally rate-limited and may return 5xx/404, leaving a broken image on the README.
Mirror it throughhttps://img.shields.ioor commit a static SVG to avoid flaky badges.
70-76: Redundant / fragile PHPStan property declarations
@phpstan-propertytags for$id,$lft,$rgt,$depthduplicate what thephpstan-yiiextension already infers from the table schema.
Maintaining them manually invites drift. Either drop them or mark them@property-readif you want to document read-only access explicitly.
109-128: Index recommendations for the example schemaAll nested-sets queries rely on range conditions over
lft/rgt(andtreein multi-tree mode). Without proper composite indexes the sample schema will perform full-table scans.Add something like:
ALTER TABLE category ADD INDEX idx_lft_rgt (lft, rgt), ADD INDEX idx_tree_lft_rgt (tree, lft, rgt); -- multi-tree
240-244: Future Yii 2.1 compatibility forbehaviors()in ActiveQueryYii 2.1 plans a dedicated
behaviorConfig()inActiveQuery. Overridingbehaviors()here could become incompatible.
Consider adding a note that this targets 2.0.x, or wrap the override with a version check once 2.1 lands.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (6)
README.md(1 hunks)docs/testing.md(1 hunks)tests/support/model/ExtendableMultipleTree.php(1 hunks)tests/support/model/MultipleTree.php(1 hunks)tests/support/model/Tree.php(1 hunks)tests/support/model/TreeWithStrictValidation.php(1 hunks)
🧰 Additional context used
🧠 Learnings (1)
📓 Common learnings
Learnt from: terabytesoftw
PR: yii2-extensions/nested-sets-behavior#13
File: src/NestedSetsBehavior.php:145-145
Timestamp: 2025-06-29T11:22:41.889Z
Learning: The user terabytesoftw prefers to keep PRs focused and small, implementing enhancements in separate dedicated PRs rather than bundling multiple changes together.
⏰ Context from checks skipped due to timeout of 90000ms (1)
- GitHub Check: mutation / PHP 8.4-ubuntu-latest
🔇 Additional comments (7)
tests/support/model/Tree.php (1)
10-15: Consistent switch to@phpstan-propertylooks goodNo functional impact; metadata now aligns with PHPStan expectations.
tests/support/model/TreeWithStrictValidation.php (1)
8-12: Static-analysis annotation update is correctMatches the same pattern applied to the other models.
tests/support/model/MultipleTree.php (1)
11-16: 👍 Annotation upgrade acceptedThe added
treeproperty is preserved, and types remain accurate.tests/support/model/ExtendableMultipleTree.php (1)
11-16: Good alignment with PHPStan conventionsNothing else needed here.
docs/testing.md (2)
22-29: Nice addition of mutation-testing docsDocs clearly state the tool and command. No change requested.
35-35: Ensure the composer script name is up to dateYou renamed the command to
static; verifycomposer.jsonactually defines"static": "...phpstan...".README.md (1)
48-49: Double-check the package name before publishing the docs
composer require yii2-extensions/nested-setsdiffers from the repository namenested-sets-behavior. If the shorter alias is not yet registered on Packagist, installation will fail.Confirm the correct package ID or create the alias prior to merge.
…n, configuration, and testing sections.
…lation documentation
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 (2)
docs/examples.md (1)
678-679: Consider singular noun for smoother wording“…examples guide…” sounds slightly awkward. Replace with “This comprehensive example guide” or “These comprehensive examples” to improve flow.
README.md (1)
248-254: Return type annotation mismatch
find()returns aCategoryQuery, notCategory.
Update the phpstan annotation to avoid misleading static analysis.- * @phpstan-return Category<static> + * @phpstan-return CategoryQuery<static>
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (5)
README.md(2 hunks)docs/configuration.md(1 hunks)docs/examples.md(1 hunks)docs/installation.md(1 hunks)docs/testing.md(1 hunks)
✅ Files skipped from review due to trivial changes (1)
- docs/configuration.md
🚧 Files skipped from review as they are similar to previous changes (2)
- docs/testing.md
- docs/installation.md
🧰 Additional context used
🧠 Learnings (1)
📓 Common learnings
Learnt from: terabytesoftw
PR: yii2-extensions/nested-sets-behavior#13
File: src/NestedSetsBehavior.php:145-145
Timestamp: 2025-06-29T11:22:41.889Z
Learning: The user terabytesoftw prefers to keep PRs focused and small, implementing enhancements in separate dedicated PRs rather than bundling multiple changes together.
🪛 LanguageTool
docs/examples.md
[uncategorized] ~678-~678: The grammatical number of this noun doesn’t look right. Consider replacing it.
Context: ...errors; } } ``` This comprehensive examples guide demonstrates practical usage patt...
(AI_EN_LECTOR_REPLACEMENT_NOUN_NUMBER)
⏰ Context from checks skipped due to timeout of 90000ms (2)
- GitHub Check: phpunit-compatibility / PHP 8.1-windows-latest
- GitHub Check: mutation / PHP 8.4-ubuntu-latest
🔇 Additional comments (2)
README.md (2)
16-18: Broken badge link –22.0branch does not exist in Yii2The badge points to
https://github.com/yiisoft/yii2/tree/22.0, which returns 404.
If you intended to reference a future 2.2-series tag, update the URL and badge label accordingly or drop the duplicate badge.
49-50: Verify correct package name for Composer installThe composer command uses
yii2-extensions/nested-sets, while the repo (and Packagist) appears to beyii2-extensions/nested-sets-behavior.
Running the wrong package name will fail to resolve. Confirm the package identifier on Packagist and adjust if necessary.-composer require yii2-extensions/nested-sets +composer require yii2-extensions/nested-sets-behavior
…ii2-extensions/nested-sets-behavior`.
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.
Pull Request Overview
This PR updates PHPDoc annotations in test models for stricter static analysis and significantly expands the project documentation to include installation, configuration, usage examples, and testing instructions.
- Replaced
@propertytags with@phpstan-propertyin test support models for improved static analysis. - Added new documentation files (
installation.md,examples.md,configuration.md) and enhancedREADME.mdwith quick start, features, and badges. - Expanded
docs/testing.mdwith sections for coding standards and mutation testing, and standardized command instructions.
Reviewed Changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/support/model/TreeWithStrictValidation.php | Replaced @property tags with @phpstan-property annotations |
| tests/support/model/Tree.php | Replaced @property tags with @phpstan-property annotations |
| tests/support/model/MultipleTree.php | Replaced @property tags with @phpstan-property annotations |
| tests/support/model/ExtendableMultipleTree.php | Replaced @property tags with @phpstan-property annotations |
| docs/testing.md | Added Easy Coding Standard and Mutation testing sections; standardized punctuation for commands |
| docs/installation.md | Introduced installation guide with system requirements and methods |
| docs/examples.md | New comprehensive usage examples for nested sets behavior |
| docs/configuration.md | New detailed configuration reference |
| README.md | Updated quick start, features list, badges, and sample code |
Summary by CodeRabbit