Skip to content

Add PHP state management quickstart (http + sdk) #1345

Open

Description

@hexmode

Describe the feature

Follow-up to #1341: 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.

  • sdk: DaprClient::saveState() / getState() / deleteState()
  • http: raw POST/GET/DELETE /v1.0/state/statestore via curl

Dependency

Building this surfaced an upstream SDK bug: DaprClient::deleteState() fatals with a TypeError in the published dev-main (null etag passed to a non-nullable parameter) — dapr/php-sdk#153, fixed by dapr/php-sdk#154. Until that merges, the sdk variant cannot be validated by CI and no composer.lock is committed for it. The http variant has no third-party dependencies and validates as-is.

Both variants pass make validate locally today (sdk validated against dapr/php-sdk@fix-delete-state-etag).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions