Skip to content

Conversation

@amotl
Copy link
Member

@amotl amotl commented Oct 16, 2025

About

  • What the title says.
  • Add information about AMPHP and PDO_PGSQL.
  • Reorganize section. Each client gets a dedicated page.

Preview

https://cratedb-guide--404.org.readthedocs.build/connect/php/

/cc @matriv, @seut

@amotl amotl added the cross linking Linking to different locations of the documentation. label Oct 16, 2025
@coderabbitai
Copy link

coderabbitai bot commented Oct 16, 2025

Walkthrough

Removes the previous single PHP docs page and replaces it with a PHP sub-index plus four new PHP driver pages; updates driver index link targets from #php to #connect-php and adjusts drivers listing to point to the new PHP subpage.

Changes

Cohort / File(s) Summary of Changes
Removed — legacy PHP guide
docs/connect/php.md
Deleted the original PHP page that contained PDO and DBAL examples and introductory text.
Updated — drivers/index links
docs/connect/drivers.md, docs/connect/index.md
Changed PHP link/anchor targets: updated driver listing to point to the new PHP subpage and adjusted example badge anchors from #php to #connect-php.
Added — PHP sub-index & driver pages
docs/connect/php/index.md, docs/connect/php/amphp.md, docs/connect/php/pdo-pgsql.md, docs/connect/php/crate-pdo.md, docs/connect/php/crate-dbal.md
Added a new PHP index and four driver-specific pages (AMPHP PostgreSQL, PDO_PGSQL, CrateDB PDO wrapper, CrateDB DBAL) including badges, synopses, code examples, and cross-links.

Sequence Diagram(s)

sequenceDiagram
  autonumber
  participant App as PHP App
  participant AMPHP as Amp\Postgres
  participant PDOpg as PDO_PGSQL
  participant PDOC as Crate\PDO\PDOCrateDB
  participant DB as CrateDB

  rect rgb(250,250,255)
    note right of App: Documentation surfaces three driver flows
  end

  alt AMPHP (async)
    App->>AMPHP: create connection pool / prepare & execute
    AMPHP->>DB: async query
    DB-->>AMPHP: rows / error
    AMPHP-->>App: await results
  else PDO_PGSQL (sync)
    App->>PDOpg: new PDO(dsn,...)
    PDOpg->>DB: query
    DB-->>PDOpg: rows / error
    PDOpg-->>App: fetch results
  else Crate PDO wrapper (sync)
    App->>PDOC: new PDOCrateDB(dsn,...)
    PDOC->>DB: query
    DB-->>PDOC: rows / error
    PDOC-->>App: fetch results
  end
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Suggested labels

new content

Suggested reviewers

  • kneth
  • surister

Poem

A rabbit hops through docs at night,
Old pages cleared, new guides take flight.
PDO and AMP leap into view,
CrateDB talks PHP anew.
Hooray — docs polished, bright and light. 🐇✨

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Title Check ✅ Passed The title "Driver: Improve section about PHP" is directly related to the changeset. The pull request reorganizes and improves the PHP driver documentation by removing old content, adding new pages for AMPHP and PDO_PGSQL drivers, and restructuring the documentation so each client library gets a dedicated page. The title appropriately summarizes this restructuring work at a high level, though it doesn't enumerate the specific drivers added. The title is concise, clear, and specific enough for a teammate to understand the primary change involves PHP documentation improvements.
Description Check ✅ Passed The pull request description is clearly related to the changeset. It explicitly describes adding information about AMPHP and PDO_PGSQL drivers, reorganizing the section so each client gets a dedicated page, and reorganizes content. These descriptions directly align with the actual changes—new documentation pages were added for these drivers and the PHP documentation was restructured into separate subpages. The description provides meaningful information about the changes and includes a preview link for reviewers to verify the results.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch php

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 48e9f50 and 5e3ba99.

📒 Files selected for processing (8)
  • docs/connect/drivers.md (2 hunks)
  • docs/connect/index.md (1 hunks)
  • docs/connect/php.md (0 hunks)
  • docs/connect/php/amphp.md (1 hunks)
  • docs/connect/php/crate-dbal.md (1 hunks)
  • docs/connect/php/crate-pdo.md (1 hunks)
  • docs/connect/php/index.md (1 hunks)
  • docs/connect/php/pdo-pgsql.md (1 hunks)
💤 Files with no reviewable changes (1)
  • docs/connect/php.md
✅ Files skipped from review due to trivial changes (2)
  • docs/connect/php/pdo-pgsql.md
  • docs/connect/php/crate-dbal.md
🧰 Additional context used
🪛 LanguageTool
docs/connect/php/crate-pdo.md

[grammar] ~1-~1: Ensure spelling is correct
Context: (crate-pdo)= # CrateDB PDO :::{div} .float-r...

(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)

🔇 Additional comments (5)
docs/connect/index.md (1)

175-186: Navigation update to new PHP subpage structure looks good.

The toctree entry at line 181 correctly references php/index instead of php, aligning with the new modular PHP driver documentation structure.

docs/connect/drivers.md (1)

282-282: Anchor references updated correctly to match new PHP index structure.

Both PHP driver entries (CrateDB PDO and DBAL at lines 282 and 297) now correctly reference #connect-php, which corresponds to the anchor defined in the new docs/connect/php/index.md.

Also applies to: 297-297

docs/connect/php/index.md (1)

1-15: New PHP driver hub structure is well-organized.

The index page provides a clean landing point for PHP driver documentation with the correct anchor reference for navigation. The toctree properly lists the four PHP driver topics.

Please verify that all four driver pages referenced in the toctree (lines 11–14) exist and are properly formatted: pdo-pgsql.md and crate-dbal.md are not shown in this review.

docs/connect/php/crate-pdo.md (1)

1-34: PHP PDO documentation page is well-structured with clear code example.

The page correctly introduces the PDO standard and explains how crate-pdo implements it. The code example at lines 18–33 follows standard PDO patterns and should be immediately useful to PHP developers.

Confirm that the external cross-reference {ref}\crate-pdo:index`` (line 13) resolves correctly to the crate-pdo project documentation. This depends on the crate-pdo docs build environment being properly configured.

docs/connect/php/amphp.md (1)

1-42: AMPHP documentation page provides clear async PostgreSQL integration guide.

The code example at lines 16–35 effectively demonstrates AMPHP's async/await patterns for connecting to CrateDB. Links to external examples and the official AMPHP PostgreSQL driver are appropriately placed and should help developers find additional resources.


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.

coderabbitai[bot]

This comment was marked as resolved.

@amotl amotl force-pushed the php branch 2 times, most recently from 9cff1f8 to 48e9f50 Compare October 16, 2025 10:40
@amotl amotl requested review from kneth and surister October 16, 2025 11:06
@amotl amotl changed the title Driver/PHP: Add information about AMPHP and PDO_PGSQL Driver: Improve section about PHP Oct 21, 2025
@amotl amotl added reorganize Moving content around, inside and between other systems. guidance Matters of layout, shape, and structure. refurbish A more significant refurbishment. labels Oct 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cross linking Linking to different locations of the documentation. guidance Matters of layout, shape, and structure. refurbish A more significant refurbishment. reorganize Moving content around, inside and between other systems.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant