Repository navigation
Conversation
Add a PHP variant of the pub/sub quickstart alongside the existing languages, with both an http (raw Dapr HTTP API) and an sdk (dapr/php-sdk) flavor. Apps run as PHP CLI scripts; the subscriber serves Dapr's HTTP callbacks via an embedded ReactPHP server. Wire PHP into CI, the root makefile, and docs: - .github/workflows/validate_php_quickstarts.yaml - makefile: test_php_quickstarts target + test_all_quickstarts - README.md: list test_php_quickstarts under validating - .github/env/global.env: PHPVER - .gitignore: vendor/, composer.phar dapr/php-sdk is pinned to dev-main since the latest Packagist release (v1.2.0) does not resolve on PHP 8.4; composer.lock pins the commit. Both variants pass make validate locally. Signed-off-by: Mark A. Hershberger <mah@nichework.com>
Add state_management/php/{sdk,http} mirroring the python quickstart: a
single order-processor CLI app that loops saving, getting, and deleting
order state in the shared redis statestore.
The sdk variant uses DaprClient saveState/getState/deleteState. The http
variant calls the raw /v1.0/state endpoints with curl.
Note: no composer.lock is committed for the sdk variant yet - published
dev-main of dapr/php-sdk has a deleteState TypeError bug, fixed in
php-sdk#154. Once that merges, generate and commit the lock. The http
variant has no third-party dependencies and is fully validated as-is.
Both variants pass make validate locally (sdk validated against
dapr/php-sdk@fix-delete-state-etag via a temporary path repository).
Signed-off-by: Mark A. Hershberger <mah@nichework.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Adds
state_management/php/sdkandstate_management/php/http, mirroring the Python quickstart. A singleorder-processorPHP CLI app loops over orders, saving / getting / deleting each in the shared Redisstatestore.DaprClient::saveState(),getState(),deleteState()POST/GET/DELETE /v1.0/state/statestorevia curl (no SDK)Both reuse the existing
state_management/resources/components, ship the standarddapr.yamlmulti-app template, boilerplatemakefile, and mechanical-markdown STEP blocks with deterministic output (Saving Order: {"orderId":"1"}, etc.). Apps are PHP CLI scripts (#!/usr/bin/env php), consistent with the pub/sub PHP quickstarts.Dependencies / merge order
Stacked on #1342 (PHP CI wiring + pub_sub). Depends on the SDK fix dapr/php-sdk#154 (
deleteState()currently fatals in publisheddev-main— see dapr/php-sdk#153).Because published
dev-mainstill has that bug, nocomposer.lockis committed for the sdk variant yet and its CI validation will fail until php-sdk#154 merges. Follow-up once it lands:The http variant has no third-party dependencies; its lock is committed and it validates as-is.
Issue reference
Fixes #1345
Checklist
state_management/python/sdk)Validation evidence: both variants pass
make validatelocally (Dapr 1.18.4 +state.redis). The sdk variant was validated againstdapr/php-sdk@fix-delete-state-etagvia a temporary composer path repository; MAKE_EXIT=0, all expected stdout lines matched, external links 200.