Skip to content

Promote the Feature Reference into a full Manual#99

Closed
koriym wants to merge 1 commit into
1.xfrom
docs-promote-reference-to-manual
Closed

Promote the Feature Reference into a full Manual#99
koriym wants to merge 1 commit into
1.xfrom
docs-promote-reference-to-manual

Conversation

@koriym

@koriym koriym commented Jun 5, 2026

Copy link
Copy Markdown
Member

Summary

The docs had a strong feature reference but no manual. docs/reference.md started at "Features" with no installation, module wiring, or SQL-file conventions, so a reader who landed on /reference/ could learn how to write a query but not how to bootstrap the library. The only setup-bearing doc (docs/ja/MediaQuery.md) is thin and unlinked from the README / docs home.

This PR adds the missing front sections to docs/reference.md and repositions it as the Manual. Docs only — no code or behavior changes.

Changes

  • docs/reference.md — retitled to "Ray.MediaQuery Manual" (permalink /reference/ kept for link stability) and prepended:
    • Installationcomposer require, requirements (PHP 8.2+, PDO driver, Ray.Di / Ray.AuraSqlModule).
    • Setup — both module entry points: MediaQuerySqlModule (directory auto-discovery, recommended) and MediaQueryModule (explicit Queries list), plus AuraSqlModule for the connection and resolving the interface from the injector.
    • SQL Files — location, {queryId}.sql naming, named placeholders bound by argument name, multi-statement behavior.
    • Configuration — DSN/connection, module choice, advanced hooks.
    • A short "This manual covers" table of contents.
  • README.md / docs/index.html — relabeled the "Feature Reference" link/card to "Manual".

Verification

  • Setup examples verified against tests/MediaQuerySqlModuleTest.php (new MediaQuerySqlModule(interfaceDir, sqlDir) + new AuraSqlModule('sqlite::memory:')) and the module/Queries/DbQueryConfig constructor signatures in src/.
  • Headings unique, code fences balanced (58), single ## Features.

The docs had a strong feature reference but no manual: it started at "Features"
with no installation, module wiring, or SQL-file conventions, so a reader who
landed on /reference/ could not learn how to bootstrap the library. The only
setup-bearing doc (docs/ja/MediaQuery.md) is thin and unlinked.

Add the missing front sections to docs/reference.md and reposition it as the
Manual:
- Installation (composer require, requirements).
- Setup — both module entry points (MediaQuerySqlModule auto-discovery, the
  recommended path; MediaQueryModule explicit list) plus AuraSqlModule for the
  connection, and resolving the interface from the injector. Verified against
  tests/MediaQuerySqlModuleTest.php.
- SQL Files — location, {queryId}.sql naming, named placeholders, multi-statement.
- Configuration — DSN/connection, module choice, advanced hooks.
- A short "This manual covers" table of contents.

Retitle to "Ray.MediaQuery Manual" (permalink /reference/ kept for link stability)
and update the README link and docs Home card from "Feature Reference" to "Manual".
@coderabbitai

coderabbitai Bot commented Jun 5, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

@koriym, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 57 minutes and 39 seconds. Learn how PR review limits work.

Your organization has run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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 include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: b00ff346-46aa-4dca-8fde-f85ece72ee26

📥 Commits

Reviewing files that changed from the base of the PR and between a7f5369 and b7cec4b.

📒 Files selected for processing (3)
  • README.md
  • docs/index.html
  • docs/reference.md
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch docs-promote-reference-to-manual

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

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

@koriym

koriym commented Jun 5, 2026

Copy link
Copy Markdown
Member Author

@coderabbitai review

この PR は docs/reference.md を「Feature Reference」から完全な「Manual」に昇格させるものです(doc のみ)。先頭に Installation / Setup(2つのモジュール入口)/ SQL Files / Configuration を追加し、README・Docs Home のラベルも更新しています。特に Setup のコード例(MediaQuerySqlModule / MediaQueryModule の配線)が src/ の署名および tests/MediaQuerySqlModuleTest.php と整合しているか、目次アンカーが正しいかを見てください。

@coderabbitai

coderabbitai Bot commented Jun 5, 2026

Copy link
Copy Markdown
Contributor
🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Read the updated docs/reference.md
echo "=== docs/reference.md ==="
cat docs/reference.md

echo ""
echo "=== tests/MediaQuerySqlModuleTest.php ==="
cat tests/MediaQuerySqlModuleTest.php

echo ""
echo "=== src/ directory structure ==="
tree src/

echo ""
echo "=== MediaQuerySqlModule.php ==="
fd "MediaQuerySqlModule.php" --exec cat {}

echo ""
echo "=== MediaQueryModule.php ==="
fd "MediaQueryModule.php" --exec cat {}

echo ""
echo "=== DbQueryConfig.php ==="
fd "DbQueryConfig.php" --exec cat {}

echo ""
echo "=== Queries.php (or similar) ==="
fd "Queries.php" --exec cat {}

echo ""
echo "=== README.md ==="
cat README.md

echo ""
echo "=== docs/index.html ==="
cat docs/index.html 2>/dev/null || echo "NOT FOUND"

Length of output: 37638



@koriym: PR #99 のレビューを行いました。コンストラクタ署名・TOC アンカーともに全般的に正確です。2点だけ指摘します。


✅ 検証済み(問題なし)

項目 確認結果
MediaQuerySqlModule(interfaceDir, sqlDir) src/MediaQuerySqlModule.php の署名・テストと一致 ✅
MediaQueryModule($queries, [new DbQueryConfig(...)]) src/MediaQueryModule.php の署名と一致 ✅
Queries::fromClasses([...]) / Queries::fromDir($dir) src/Queries.php に両メソッド存在 ✅
new DbQueryConfig(__DIR__ . '/sql') src/DbQueryConfig.php のコンストラクタと一致 ✅
TOC アンカー (#installation, #setup, #sql-files, #configuration, #features) すべての見出しと対応 ✅
README・docs/index.html のラベル更新 "Manual" に変更済み ✅

⚠️ 指摘事項

1. MediaQueryModule の例で use 文が不足

MediaQueryModule のコードブロックで AuraSqlModule を使用しているにもかかわらず、対応する use 宣言がありません。

use Ray\MediaQuery\DbQueryConfig;
use Ray\MediaQuery\MediaQueryModule;
use Ray\MediaQuery\Queries;
// ↑ この行を追加
use Ray\AuraSqlModule\AuraSqlModule;

2. MediaQueryModule@internal / 非推奨ステータスについて

src/MediaQueryModule.php のクラスコメントには @internal This is a low-level API. とあり、テストファイル (MediaQuerySqlModuleTest.php) でも // Old verbose API (deprecated) とコメントされています。

マニュアルではこれを対等な選択肢として紹介していますが、利用者が混乱しないよう、軽く注記しておくと親切かもしれません(例:「高度な用途向け / 内部 API」など)。必須ではありませんが、検討してみてください。


全体として、ドキュメントの内容は src/ のコードおよびテストと整合が取れており、Manual としての昇格に問題はありません。

✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@koriym

koriym commented Jun 5, 2026

Copy link
Copy Markdown
Member Author

Closing because the manual promotion content has been incorporated into #100, which is now the consolidated documentation update PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant