Skip to content

Conversation

amotl
Copy link
Member

@amotl amotl commented Oct 16, 2025

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

coderabbitai bot commented Oct 16, 2025

Walkthrough

Adds multiple PHP driver surfaces (AMPHP PostgreSQL and PDO_PGSQL), replaces the CrateDB PDO alias with Crate\PDO\PDOCrateDB, updates example imports/instantiation/queries, and surfaces Crate\PDO\PDOCrateDB as the public PDO wrapper in docs and samples.

Changes

Cohort / File(s) Summary of Changes
Docs — PHP connection guide
docs/connect/php.md
Added AMPHP PostgreSQL and PDO_PGSQL examples; replaced use Crate\PDO\PDO as PDO; usage with use Crate\PDO\PDOCrateDB;; updated CrateDB PDO examples to instantiate PDOCrateDB, show DSN-based workflow, and adjusted query/fetch samples; updated DBAL section heading and sample to reflect new PDO wrapper.

Sequence Diagram(s)

sequenceDiagram
  autonumber
  participant App as PHP App
  participant AMPHP as AMPHP Pg Driver
  participant PDOpg as PDO_PGSQL
  participant PDOC as PDOCrateDB
  participant DB as CrateDB

  rect rgb(245,248,255)
    note over App,DB: Alternative driver flows for connect & query
  end

  alt AMPHP (async)
    App->>AMPHP: Pool::create(config)
    AMPHP->>DB: async query(sql)
    DB-->>AMPHP: rows / error
    AMPHP-->>App: Promise result
  else PDO_PGSQL (sync)
    App->>PDOpg: new PDO(dsn, user, pass)
    PDOpg->>DB: query(sql)
    DB-->>PDOpg: rows / error
    PDOpg-->>App: fetch()
  else PDOCrateDB (updated PDO wrapper)
    App->>PDOC: new PDOCrateDB(dsn, user, pass)
    PDOC->>DB: query(sql)
    DB-->>PDOC: rows / error
    PDOC-->>App: fetch()
  end
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Suggested labels

new content

Suggested reviewers

  • karynzv
  • hammerhead
  • surister

Poem

A rabbit taps keys in a doc-lit glade,
New drivers hop in, bright paths newly laid.
PDOCrateDB leads with a jaunty cheer,
Queries scurry, responses appear.
Hoppity-hop—docs updated, and smiles appear. 🐇✨

Pre-merge checks and finishing touches

❌ Failed checks (1 inconclusive)
Check name Status Explanation Resolution
Description Check ❓ Inconclusive The pull request description is directly related to the changeset but is extremely terse, stating only “What the title says” without summarizing any specific modifications or motivations. While it is not off-topic, it provides no substantive detail beyond referring back to the title. This level of vagueness makes it difficult for reviewers to quickly grasp the scope or intent of the updates without reviewing the diffs. Please expand the description to briefly summarize the key additions (such as the new AMPHP PostgreSQL driver section and PDOCrateDB class) and the rationale for these changes to help reviewers understand the purpose and content of the update at a glance.
✅ Passed checks (2 passed)
Check name Status Explanation
Title Check ✅ Passed The title clearly summarizes the main change by stating that PHP driver documentation is extended to include AMPHP and PDO_PGSQL information, which aligns with the pull request’s modifications adding those sections to the docs.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch php

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.

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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant