{"id":28506552,"url":"https://github.com/temporalio/subscription-workflow-project-template-php","last_synced_at":"2025-07-05T04:32:34.065Z","repository":{"id":50963927,"uuid":"369561343","full_name":"temporalio/subscription-workflow-project-template-php","owner":"temporalio","description":"Subscription Workflow Project Template for PHP","archived":false,"fork":false,"pushed_at":"2025-06-06T17:16:41.000Z","size":16549,"stargazers_count":13,"open_issues_count":0,"forks_count":2,"subscribers_count":10,"default_branch":"main","last_synced_at":"2025-06-06T17:38:07.129Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/temporalio.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-05-21T14:27:58.000Z","updated_at":"2025-06-06T17:16:41.000Z","dependencies_parsed_at":"2022-09-10T00:50:20.966Z","dependency_job_id":null,"html_url":"https://github.com/temporalio/subscription-workflow-project-template-php","commit_stats":null,"previous_names":[],"tags_count":0,"template":true,"template_full_name":null,"purl":"pkg:github/temporalio/subscription-workflow-project-template-php","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/temporalio%2Fsubscription-workflow-project-template-php","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/temporalio%2Fsubscription-workflow-project-template-php/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/temporalio%2Fsubscription-workflow-project-template-php/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/temporalio%2Fsubscription-workflow-project-template-php/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/temporalio","download_url":"https://codeload.github.com/temporalio/subscription-workflow-project-template-php/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/temporalio%2Fsubscription-workflow-project-template-php/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263683975,"owners_count":23495590,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-06-08T20:05:56.068Z","updated_at":"2025-07-05T04:32:34.059Z","avatar_url":"https://github.com/temporalio.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Subscription Workflow Project Template in PHP\n\u003c!-- @@@SNIPSTART subscription-php-readme --\u003e\nThis project template illustrates the design pattern for subscription style business logic.\n\n**Setup**\n\nRun the Temporal Server:\n\n```bash\ngit clone https://github.com/temporalio/docker-compose.git\ncd docker-compose\ndocker-compose up\n```\n\nStart the RoadRunner Server:\n\n```bash\ncomposer install\n./rr serve\n```\n\n**Start**\n\nStart the Workflow Execution for a single customer with the Id of \"Id-0\".\n\n```bash\nphp app.php subscription\n```\n\n**Get billing info**\n\nYou can Query the Workflow Execution for the customer's billing information.\nThe current billing period and the charge amount will be returned.\n\n```bash\nphp app.php querybillinginfo  \n```\n\nRun this multiple times to see the billing period number and charge amount change over the course of the Workflow Execution.\n\n**Update billing**\n\nYou can also send a Signal to the Workflow Execution to update the billing cycle cost to 300.\n\n```bash\nphp app.php updatecharge\n```\n\n**Cancel subscription**\n\nYou can send a Signal to the Workflow Execution to cancel the subscription.\nThe Workflow Execution will complete after the current billing period.\n\n```bash\nphp app.php cancelsubscription\n```\n\nAfter running this, check out the [Temporal Web UI](http://localhost:8088/) to see that the Workflow Execution has a \"Completed\" status.\n\u003c!-- @@@SNIPEND --\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftemporalio%2Fsubscription-workflow-project-template-php","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftemporalio%2Fsubscription-workflow-project-template-php","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftemporalio%2Fsubscription-workflow-project-template-php/lists"}