Repository navigation
Fix incorrect return type and PHP version in docs - #102
Conversation
📝 WalkthroughWalkthroughThe PR updates the Japanese tutorial wording for installation, autoload, PHP version, and expected-output labels, and clarifies the reference example’s ChangesDocumentation updates
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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 |
afce3bb to
ec8c123
Compare
|
Rebased onto current 1.x as a single clean commit. @koriym The previous branch carried the #99
The web-query pages from #107 are preserved. Ready for review. |
|
@coderabbitai review |
✅ Action performedReview finished.
|
ec8c123 to
1d3c5f2
Compare
- reference.md: a type:'row' query returns null when no row matches (SqlQuery::getRow), so the example return type must be ?array, not array - tutorial Ch.6: readonly classes are available since PHP 8.2, not 8.4
1d3c5f2 to
29fc93f
Compare
Summary
Two factual corrections to the documentation:
docs/reference.md— atype: 'row'query returnsnullwhen no row matches (SqlQuery::getRow()returnsnullon an empty result set), so the example return type must be?array, notarray. This also aligns it with the other single-row examples in the same file (item(): User|null,find(): User|null).docs/tutorial/README.ja.md(Ch.6) —readonlyclasses have been available since PHP 8.2, not 8.4.Why
The reference example declared a non-nullable
arrayreturn for a single-row query, which would raise aTypeErrorat runtime whenever the query matches no row. The tutorial cited the wrong PHP version forreadonlyclasses.Validation
?arraybehavior verified againstsrc/SqlQuery.php(getRow()returnsnullwhen the result set is empty).readonlyclass availability confirmed as PHP 8.2.Notes
Earlier revisions of this PR also changed the
--no-devinstall flow,autoloadregistration, extension prerequisites, and run.php output labels. Those were dropped as out-of-scope churn (the original install/autoload wording was already consistent, and the framework's required extensions are enforced bycomposer install), leaving only the two correctness fixes above.