Skip to content

feat: add PHP binding (ext-php-rs) with native extension support#278

Merged
mosuka merged 4 commits intomainfrom
php
Mar 29, 2026
Merged

feat: add PHP binding (ext-php-rs) with native extension support#278
mosuka merged 4 commits intomainfrom
php

Conversation

@mosuka
Copy link
Copy Markdown
Owner

@mosuka mosuka commented Mar 28, 2026

Add laurus-php crate providing PHP 8.1+ bindings via ext-php-rs.
Includes full API coverage (Index, Schema, 10 query types, analysis
pipeline), PHPUnit tests (29 tests), examples with Unified Query DSL
search app, and CI/CD for test + build on Linux/macOS.

  • laurus-php excluded from workspace (clang-sys links conflict with magnus)
  • Standalone Cargo.toml with path dependency on laurus
  • Classes require explicit ModuleBuilder::class::() registration
  • CI: add test-php and build-php jobs to release.yml
  • CI: unify --all-features to --features embeddings-all across all workflows
  • Docs: add PHP pages to docs/src and docs/ja/src

mosuka and others added 4 commits March 29, 2026 00:36
Move laurus-php from workspace exclude to full workspace member by
patching ext-php-rs-clang-sys to remove its `links = "clang"` declaration,
which conflicted with clang-sys from laurus-ruby (magnus).

- Add patches/ext-php-rs-clang-sys/ with links declaration removed
- Add [patch.crates-io] to workspace Cargo.toml
- Convert laurus-php/Cargo.toml to use workspace dependencies
- Remove standalone laurus-php/Cargo.lock
- Update CI to use `cargo build -p laurus-php` instead of `cd laurus-php`
- Unify --all-features to --features embeddings-all across all workflows
- Add test-php to regression.yml and periodic.yml
- Document patch rationale and update procedure in development docs

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@mosuka mosuka merged commit 71f5945 into main Mar 29, 2026
22 checks passed
@mosuka mosuka deleted the php branch March 29, 2026 03:41
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