Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
59440d9
Add PHP SDK coverage for Apache Iggy
countradooku May 11, 2026
0311699
Make foreign SDK test servers reachable in Compose
countradooku May 12, 2026
aec2983
Update .gitignore
countradooku May 12, 2026
f162f52
Reduce PHP SDK PR to reviewable blocking client
countradooku May 12, 2026
6aabe53
Keep PHP SDK PR scoped to PHP
countradooku May 12, 2026
64d3315
Avoid leaking PHP extension path into Iggy config
countradooku May 12, 2026
ef1f121
Merge branch 'master' into add-php-sdk
countradooku May 12, 2026
0c1b05b
Merge branch 'master' into add-php-sdk
countradooku May 13, 2026
9cb8224
Merge branch 'master' into add-php-sdk
countradooku May 13, 2026
e2e91ed
Address PHP adapter review feedback
countradooku May 16, 2026
687e483
Merge branch 'master' into add-php-sdk
countradooku May 16, 2026
a64bd8c
Merge branch 'master' into add-php-sdk
countradooku May 18, 2026
78b7171
Merge branch 'master' into add-php-sdk
countradooku May 19, 2026
4363343
Harden PHP SDK review follow-ups
countradooku May 19, 2026
ccbc79b
Keep PHP SDK branch mergeable with current master
countradooku May 20, 2026
2cc80e6
Install PHP test dependencies in CI
countradooku May 20, 2026
db04154
Harden the PHP SDK before exposing its public API
countradooku May 21, 2026
e585a68
Keep generated PHP stubs license-compliant
countradooku May 21, 2026
d79ce21
Merge branch 'master' into add-php-sdk
countradooku May 21, 2026
3f6d2d4
fix(php): preserve generated stub header format
countradooku May 21, 2026
07df956
Merge branch 'master' into add-php-sdk
countradooku May 21, 2026
76e3436
Clarify PHP SDK support boundaries
countradooku May 22, 2026
106c075
Merge branch 'master' into add-php-sdk
countradooku May 22, 2026
6405b3c
Merge branch 'master' into add-php-sdk
hubcio May 25, 2026
302ea97
Honor PHP caller intent for identifiers
countradooku May 25, 2026
6168bb1
Merge branch 'master' into add-php-sdk
countradooku May 25, 2026
22263c4
Merge branch 'master' into add-php-sdk
hubcio May 26, 2026
b8e1e3b
Merge branch 'master' into add-php-sdk
hubcio May 26, 2026
67acc72
Merge branch 'master' into add-php-sdk
spetz May 26, 2026
bb7c5c3
Merge branch 'master' into add-php-sdk
hubcio May 27, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
153 changes: 153 additions & 0 deletions .github/actions/php/pre-merge/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,153 @@
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.

name: php-pre-merge
description: PHP pre-merge testing github iggy actions

inputs:
task:
description: "Task to run (lint, test, build)"
required: true

runs:
using: "composite"
steps:
- name: Install PHP build dependencies
shell: bash
run: |
sudo apt-get update
sudo apt-get install -y --no-install-recommends \
clang \
composer \
libclang-dev \
libhwloc-dev \
libssl-dev \
php-cli \
Comment thread
countradooku marked this conversation as resolved.
php-dev \
php-mbstring \
php-xml \
pkg-config \
unzip

echo "PHP=$(command -v php)" >> "$GITHUB_ENV"
echo "PHP_CONFIG=$(command -v php-config)" >> "$GITHUB_ENV"
php --version
php-config --version
composer --version

- name: Setup Rust with cache
uses: ./.github/actions/utils/setup-rust-with-cache
with:
shared-key: dev
save-cache: "false"

- name: Use shared Cargo target directory
shell: bash
run: echo "CARGO_TARGET_DIR=${GITHUB_WORKSPACE}/target" >> "$GITHUB_ENV"

- name: Validate task
shell: bash
run: |
case "${{ inputs.task }}" in
lint|test|build) ;;
*)
echo "Unknown PHP SDK task: ${{ inputs.task }}"
exit 1
;;
esac

- name: Lint
if: inputs.task == 'lint'
shell: bash
run: |
php -r 'json_decode(file_get_contents("foreign/php/composer.json"), true, 512, JSON_THROW_ON_ERROR);'
cargo fmt --manifest-path foreign/php/Cargo.toml -- --check
cargo install cargo-php --locked
cargo build --manifest-path foreign/php/Cargo.toml
extension="$(find "${CARGO_TARGET_DIR}/debug" -maxdepth 1 -name 'libiggy_php.so' -print -quit)"
if [ -z "$extension" ]; then
echo "PHP extension was not produced"
exit 1
fi
raw_stubs="$(mktemp)"
cargo php stubs "$extension" -o "$raw_stubs"
{
printf '<?php\n'
awk 'NF { print "// " $0; next } { print "//" }' ASF_LICENSE.txt
printf '\n'
tail -n +2 "$raw_stubs"
} > foreign/php/iggy-php.stubs.php
rm -f "$raw_stubs"
git diff --exit-code -- foreign/php/iggy-php.stubs.php
find foreign/php \
-path foreign/php/vendor -prune -o \
-name '*.php' -print0 \
| xargs -0 -n1 php -l

- name: Build PHP extension
if: inputs.task == 'build'
shell: bash
run: |
cargo build --release --manifest-path foreign/php/Cargo.toml
extension="$(find "${CARGO_TARGET_DIR}/release" -maxdepth 1 -name 'libiggy_php.so' -print -quit)"
if [ -z "$extension" ]; then
echo "PHP extension was not produced"
exit 1
fi
ls -lh "$extension"

- name: Build PHP extension for tests
if: inputs.task == 'test'
shell: bash
run: |
cargo build --manifest-path foreign/php/Cargo.toml
Comment thread
countradooku marked this conversation as resolved.
extension="$(find "${CARGO_TARGET_DIR}/debug" -maxdepth 1 -name 'libiggy_php.so' -print -quit)"
if [ -z "$extension" ]; then
echo "PHP extension was not produced"
exit 1
fi
echo "PHP_IGGY_EXTENSION=$(realpath "$extension")" >> "$GITHUB_ENV"
ls -lh "$extension"

- name: Install PHP test dependencies
if: inputs.task == 'test'
shell: bash
working-directory: foreign/php
run: composer install --no-interaction --prefer-dist --no-progress

Comment thread
countradooku marked this conversation as resolved.
- name: Start Iggy server
if: inputs.task == 'test'
id: iggy
uses: ./.github/actions/utils/server-start

- name: Run PHP SDK tests
Comment thread
countradooku marked this conversation as resolved.
if: inputs.task == 'test'
shell: bash
working-directory: foreign/php
env:
IGGY_HOST: 127.0.0.1
IGGY_PORT: 8090
IGGY_USERNAME: iggy
IGGY_PASSWORD: iggy
run: ./scripts/test.sh

- name: Stop Iggy server
if: always() && inputs.task == 'test'
uses: ./.github/actions/utils/server-stop
with:
pid-file: ${{ steps.iggy.outputs.pid_file }}
log-file: ${{ steps.iggy.outputs.log_file }}
Comment thread
countradooku marked this conversation as resolved.
9 changes: 9 additions & 0 deletions .github/config/components.yml
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,15 @@ components:
- "foreign/python/**"
tasks: ["lint", "test", "build"]

sdk-php:
depends_on:
- "rust-sdk" # PHP SDK wraps the Rust SDK
- "rust-server" # For integration tests
- "ci-infrastructure" # CI changes trigger full regression
paths:
Comment thread
countradooku marked this conversation as resolved.
- "foreign/php/**"
tasks: ["lint", "test", "build"]

sdk-node:
depends_on:
- "rust-sdk" # Node SDK depends on core SDK
Expand Down
11 changes: 10 additions & 1 deletion .github/workflows/_detect.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ on:
python_matrix:
description: "Matrix for Python SDK"
value: ${{ jobs.detect.outputs.python_matrix }}
php_matrix:
description: "Matrix for PHP SDK"
value: ${{ jobs.detect.outputs.php_matrix }}
node_matrix:
description: "Matrix for Node SDK"
value: ${{ jobs.detect.outputs.node_matrix }}
Expand Down Expand Up @@ -60,6 +63,7 @@ jobs:
outputs:
rust_matrix: ${{ steps.mk.outputs.rust_matrix }}
python_matrix: ${{ steps.mk.outputs.python_matrix }}
php_matrix: ${{ steps.mk.outputs.php_matrix }}
node_matrix: ${{ steps.mk.outputs.node_matrix }}
go_matrix: ${{ steps.mk.outputs.go_matrix }}
java_matrix: ${{ steps.mk.outputs.java_matrix }}
Expand Down Expand Up @@ -230,7 +234,7 @@ jobs:
console.log(`Total files changed: ${files.length}`);
}

const groups = { rust:[], python:[], node:[], go:[], java:[], csharp:[], cpp:[], bdd:[], examples:[], other:[] };
const groups = { rust:[], python:[], php:[], node:[], go:[], java:[], csharp:[], cpp:[], bdd:[], examples:[], other:[] };

// Process affected components and generate tasks
console.log('');
Expand All @@ -253,6 +257,7 @@ jobs:

if (name === 'rust') groups.rust.push(...entries);
else if (name === 'sdk-python') groups.python.push(...entries);
else if (name === 'sdk-php') groups.php.push(...entries);
else if (name === 'sdk-node') groups.node.push(...entries);
else if (name === 'sdk-go') groups.go.push(...entries);
else if (name === 'sdk-java') groups.java.push(...entries);
Expand Down Expand Up @@ -299,6 +304,7 @@ jobs:
// Clear existing groups to avoid duplicates - we'll run everything anyway
groups.rust = [];
groups.python = [];
groups.php = [];
groups.node = [];
groups.go = [];
groups.java = [];
Expand All @@ -313,6 +319,7 @@ jobs:
const entries = cfg.tasks.map(task => ({ component: name, task }));
if (name === 'rust') groups.rust.push(...entries);
else if (name === 'sdk-python') groups.python.push(...entries);
else if (name === 'sdk-php') groups.php.push(...entries);
else if (name === 'sdk-node') groups.node.push(...entries);
else if (name === 'sdk-go') groups.go.push(...entries);
else if (name === 'sdk-java') groups.java.push(...entries);
Expand Down Expand Up @@ -349,6 +356,7 @@ jobs:
const jobSummary = [
{ name: 'Rust', tasks: groups.rust },
{ name: 'Python SDK', tasks: groups.python },
{ name: 'PHP SDK', tasks: groups.php },
{ name: 'Node SDK', tasks: groups.node },
{ name: 'Go SDK', tasks: groups.go },
{ name: 'Java SDK', tasks: groups.java },
Expand Down Expand Up @@ -381,6 +389,7 @@ jobs:

setOutput('rust_matrix', JSON.stringify(matrix(groups.rust)));
setOutput('python_matrix', JSON.stringify(matrix(groups.python)));
setOutput('php_matrix', JSON.stringify(matrix(groups.php)));
setOutput('node_matrix', JSON.stringify(matrix(groups.node)));
setOutput('go_matrix', JSON.stringify(matrix(groups.go)));
setOutput('java_matrix', JSON.stringify(matrix(groups.java)));
Expand Down
7 changes: 7 additions & 0 deletions .github/workflows/_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,13 @@ jobs:
verbose: true
override_pr: ${{ github.event.pull_request.number }}

# PHP SDK
- name: Run PHP SDK task
if: inputs.component == 'sdk-php'
uses: ./.github/actions/php/pre-merge
with:
task: ${{ inputs.task }}

# Node SDK
- name: Run Node SDK task
if: inputs.component == 'sdk-node'
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/pr-title.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ jobs:
mcp
node
partitions
php
proc
pr_template
python
Expand Down
21 changes: 20 additions & 1 deletion .github/workflows/pre-merge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,19 @@ jobs:
secrets:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

# PHP SDK
test-php:
name: PHP • ${{ matrix.task }}
needs: detect
if: ${{ fromJson(needs.detect.outputs.php_matrix).include[0].component != 'noop' }}
strategy:
fail-fast: false
matrix: ${{ fromJson(needs.detect.outputs.php_matrix) }}
uses: ./.github/workflows/_test.yml
with:
component: ${{ matrix.component }}
task: ${{ matrix.task }}

Comment thread
countradooku marked this conversation as resolved.
# Node SDK
test-node:
name: Node • ${{ matrix.task }}
Expand Down Expand Up @@ -193,7 +206,7 @@ jobs:
# Final status check
finalize_pr:
runs-on: ubuntu-latest
needs: [common, detect, test-rust, test-python, test-node, test-go, test-java, test-csharp, test-cpp, test-bdd, test-examples, test-other]
needs: [common, detect, test-rust, test-python, test-php, test-node, test-go, test-java, test-csharp, test-cpp, test-bdd, test-examples, test-other]
if: ${{ !cancelled() }}
steps:
- name: Get job execution times
Expand Down Expand Up @@ -271,6 +284,7 @@ jobs:
// Set outputs for each component
const rust = findJobInfo('Rust •');
const python = findJobInfo('Python •');
const php = findJobInfo('PHP •');
const node = findJobInfo('Node •');
const go = findJobInfo('Go •');
const java = findJobInfo('Java •');
Expand All @@ -291,6 +305,7 @@ jobs:
// Output formatted durations
core.setOutput('rust_time', formatJobDuration(rust));
core.setOutput('python_time', formatJobDuration(python));
core.setOutput('php_time', formatJobDuration(php));
core.setOutput('node_time', formatJobDuration(node));
core.setOutput('go_time', formatJobDuration(go));
core.setOutput('java_time', formatJobDuration(java));
Expand Down Expand Up @@ -381,6 +396,7 @@ jobs:
# Language/component tests
rust_status=$(format_status "${{ needs.test-rust.result }}" "${{ steps.times.outputs.rust_time }}")
python_status=$(format_status "${{ needs.test-python.result }}" "${{ steps.times.outputs.python_time }}")
php_status=$(format_status "${{ needs.test-php.result }}" "${{ steps.times.outputs.php_time }}")
node_status=$(format_status "${{ needs.test-node.result }}" "${{ steps.times.outputs.node_time }}")
go_status=$(format_status "${{ needs.test-go.result }}" "${{ steps.times.outputs.go_time }}")
java_status=$(format_status "${{ needs.test-java.result }}" "${{ steps.times.outputs.java_time }}")
Expand All @@ -392,6 +408,7 @@ jobs:

echo "| 🦀 Rust | $rust_status | ${{ steps.times.outputs.rust_time }} |" >> $GITHUB_STEP_SUMMARY
echo "| 🐍 Python | $python_status | ${{ steps.times.outputs.python_time }} |" >> $GITHUB_STEP_SUMMARY
echo "| 🐘 PHP | $php_status | ${{ steps.times.outputs.php_time }} |" >> $GITHUB_STEP_SUMMARY
echo "| 🟢 Node | $node_status | ${{ steps.times.outputs.node_time }} |" >> $GITHUB_STEP_SUMMARY
echo "| 🐹 Go | $go_status | ${{ steps.times.outputs.go_time }} |" >> $GITHUB_STEP_SUMMARY
echo "| ☕ Java | $java_status | ${{ steps.times.outputs.java_time }} |" >> $GITHUB_STEP_SUMMARY
Expand All @@ -408,6 +425,7 @@ jobs:
[[ "${{ needs.detect.result }}" == "failure" ]] || \
[[ "${{ needs.test-rust.result }}" == "failure" ]] || \
[[ "${{ needs.test-python.result }}" == "failure" ]] || \
[[ "${{ needs.test-php.result }}" == "failure" ]] || \
[[ "${{ needs.test-node.result }}" == "failure" ]] || \
[[ "${{ needs.test-go.result }}" == "failure" ]] || \
[[ "${{ needs.test-java.result }}" == "failure" ]] || \
Expand All @@ -423,6 +441,7 @@ jobs:
[[ "${{ needs.detect.result }}" == "cancelled" ]] || \
[[ "${{ needs.test-rust.result }}" == "cancelled" ]] || \
[[ "${{ needs.test-python.result }}" == "cancelled" ]] || \
[[ "${{ needs.test-php.result }}" == "cancelled" ]] || \
[[ "${{ needs.test-node.result }}" == "cancelled" ]] || \
[[ "${{ needs.test-go.result }}" == "cancelled" ]] || \
[[ "${{ needs.test-java.result }}" == "cancelled" ]] || \
Expand Down
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ members = [
"core/tools",
"examples/rust",
]
exclude = ["foreign/cpp", "foreign/python"]
exclude = ["foreign/cpp", "foreign/php", "foreign/python"]
resolver = "2"

[workspace.dependencies]
Expand Down
22 changes: 22 additions & 0 deletions foreign/php/.cargo/config.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.

[target.aarch64-apple-darwin]
rustflags = ["-C", "link-arg=-Wl,-undefined,dynamic_lookup"]

[target.x86_64-apple-darwin]
rustflags = ["-C", "link-arg=-Wl,-undefined,dynamic_lookup"]
4 changes: 4 additions & 0 deletions foreign/php/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
/target
/vendor
Cargo.lock
composer.lock
Loading
Loading