Skip to content

Commit e1cdca0

Browse files
committed
Fix badges, add info about buggregator
1 parent 74253cb commit e1cdca0

File tree

1 file changed

+46
-13
lines changed

1 file changed

+46
-13
lines changed

README.md

Lines changed: 46 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ composer require temporal/sdk
1818

1919
[![PHP](https://img.shields.io/packagist/php-v/temporal/sdk.svg?style=flat-square&logo=php)](https://packagist.org/packages/temporal/sdk)
2020
[![Stable Release](https://poser.pugx.org/temporal/sdk/version?style=flat-square)](https://packagist.org/packages/temporal/sdk)
21-
[![License](https://img.shields.io/packagist/l/temporal/sdk.svg?style=flat-square)](LICENSE.md)
2221
[![Total DLoads](https://img.shields.io/packagist/dt/temporal/sdk.svg?style=flat-square)](https://packagist.org/packages/temporal/sdk/stats)
22+
[![License](https://img.shields.io/packagist/l/temporal/sdk.svg?style=flat-square)](LICENSE.md)
2323

2424
The SDK includes two main components: [Clients](https://docs.temporal.io/develop/php/temporal-clients) and Workers.
2525
The Clients component is used to start, schedule, and manage Workflows;
@@ -65,7 +65,10 @@ If you are using the SDK without integrations, the following sections of the doc
6565
## Testing
6666

6767
The PHP SDK includes a toolkit for testing Workflows.
68-
There is [documentation](https://docs.temporal.io/develop/php/testing-suite) and [dev guide](testing/Readme.md) on how to use it.
68+
There is [documentation](https://docs.temporal.io/develop/php/testing-suite) and [dev guide](testing/Readme.md) on how to test a Workflow using Activity mocking.
69+
70+
To ensure the determinism of a Workflow,
71+
you can also use the [Replay API in tests](https://docs.temporal.io/develop/php/testing-suite#replay).
6972

7073
## Dev environment
7174

@@ -91,25 +94,55 @@ to enable the [Workflow Update feature](https://docs.temporal.io/encyclopedia/wo
9194
- Add flag `--dynamic-config-value frontend.enableExecuteMultiOperation=true` to enable [`updateWithStart()` feature](https://php.temporal.io/classes/Temporal-Client-WorkflowClient.html#method_updateWithStart).
9295
- Add flag `--dynamic-config-value system.enableEagerWorkflowStart=true` to enable the [Eager Workflow Start feature](https://docs.temporal.io/develop/advanced-start-options#eager-start).
9396

97+
### Buggregator
98+
99+
During development, you might need to dump a variable, throw an error trace, or simply look at the call stack.
100+
Since Workflows and Activities run in RoadRunner workers, you cannot use `var_dump`,
101+
`print_r`, `echo`, and other functions that output data to STDOUT.
102+
103+
Instead, use [Buggregator](https://buggregator.dev) along with the `buggregator/trap` package.
104+
In this case, dumps, traces, and logs will be sent via socket to your local Buggregator server,
105+
where you can view them in a convenient web interface.
106+
107+
> [!TIP]
108+
> Trap is a wrapper around `symfony/var-dumper`, providing additional debugging capabilities.
109+
> Moreover, Trap patches var-dumper for outputting protobuf structures, which is very handy when working with Temporal.
110+
111+
To run Buggregator in Docker, execute the command below
112+
and follow the [instructions](https://docs.buggregator.dev/config/var-dumper.html#configuration):
113+
114+
```bash
115+
docker run --rm -p 8000:8000 -p 1025:1025 -p 9912:9912 -p 9913:9913 ghcr.io/buggregator/server:latest
116+
```
117+
118+
If you are not using Docker or running PHP code outside a container, you can use Trap as a compact server:
119+
120+
```bash
121+
./vendor/bin/trap --ui
122+
```
123+
124+
Now use the `trap()`, `tr()`, or `dump()` functions to output data to Buggregator.
125+
94126
## Resources
95127

96-
Documentation
97-
[![Temporal Documentation](https://img.shields.io/static/v1?style=flat-square&label=&message=Dcumentation&logo=Temporal&color=%237744ee)](https://docs.temporal.io/)
98-
[![PHP SDK Documentation](https://img.shields.io/static/v1?style=flat-square&label=PHP+SDK&message=Dev+guide&logo=Temporal&color=%237766ee)](https://docs.temporal.io/develop/php)
99-
[![PHP SDK API](https://img.shields.io/static/v1?style=flat-square&label=PHP+SDK&message=API&logo=PHP&color=%23447723)](https://php.temporal.io/)
128+
Read the docs
129+
[![Temporal Documentation](https://img.shields.io/static/v1?style=flat-square&label=&message=Dcumentation&logo=Temporal&color=7744ee)](https://docs.temporal.io/)
130+
[![PHP SDK Documentation](https://img.shields.io/static/v1?style=flat-square&label=PHP+SDK&message=Dev+guide&logo=Temporal&color=7766ee)](https://docs.temporal.io/develop/php)
131+
[![PHP SDK API](https://img.shields.io/static/v1?style=flat-square&label=PHP+SDK&message=API&logo=PHP&color=447723&logoColor=aa88ff)](https://php.temporal.io/)
100132

101133
Ask a question
102-
[![Slack](https://img.shields.io/static/v1?style=flat-square&label=&message=Slack&logo=Slack&color=%23cc4444)](https://t.mp/slack/)
103-
[![Forum](https://img.shields.io/static/v1?style=flat-square&label=&message=Forum&logo=Discourse&color=%234477ee)](https://community.temporal.io/)
104-
[![Discord](https://img.shields.io/static/v1?style=flat-square&label=&message=Discord&logo=Discord&color=%23333333)](https://discord.gg/FwmDtGQe55)
134+
[![Slack](https://img.shields.io/static/v1?style=flat-square&label=&message=Slack&logo=Slack&color=cc4444)](https://t.mp/slack/)
135+
[![Forum](https://img.shields.io/static/v1?style=flat-square&label=&message=Forum&logo=Discourse&color=4477ee)](https://community.temporal.io/)
136+
[![Discord](https://img.shields.io/static/v1?style=flat-square&label=&message=Discord&logo=Discord&color=333333)](https://discord.gg/FwmDtGQe55)
105137

106-
Additional
107-
[![Awesome Temporal](https://img.shields.io/static/v1?style=flat-square&label=&message=Awesome+Temporal&logo=Awesome-Lists&color=%234b4567)](https://github.com/temporalio/awesome-temporal)
108-
[![Temporal YT Channel](https://img.shields.io/static/v1?style=flat-square&label=&message=Watch+on+Youtube&logo=youtube&color=%23FF2052)](https://www.youtube.com/temporalio)
138+
Additionally
139+
[![Temporal community](https://img.shields.io/static/v1?style=flat-square&label=&message=Community&color=ff6644&logo=data:image/svg%2bxml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI5NyIgaGVpZ2h0PSI3NiI+PHBhdGggZD0iTTQyLjc0MDMgMTYuNTYyMkM0My43MjA0IDE3LjI3NzUgNDcuNjY3MyAyMC40Mjk3IDQ4LjY0NzQgMjEuMTk3OUM0OS42Mjc1IDIwLjM3NjcgNTMuNTc0NCAxNy4yNzc1IDU0LjU1NDUgMTYuNTYyMkM3NC41Mjc0IDEuNjIyMjggOTAuNTAwNSAtMi44MDE0MiA5NC45NTA3IDEuNjQ4NzhDOTkuNDAwOSA2LjA5ODk4IDk1LjAwMzcgMjIuMDQ1NSA4MC4wMzcyIDQyLjA0NUM3OS4zMjIgNDMuMDI1MSA3Ni4xNjk4IDQ2Ljk3MiA3NS40MDE2IDQ3Ljk1MjFDNzEuNjY2NiA1Mi40ODE3IDY3LjQ4MTMgNTcuMTk2OCA2Mi42ODY3IDYxLjk5MTRDNTcuODkyMSA2Ni43ODYgNTMuMjMgNzAuOTcxMyA0OC42NDc0IDc0LjcwNjNDNDQuMTE3NyA3MC45NzEzIDM5LjQwMjYgNjYuNzg2IDM0LjYwOCA2MS45OTE0QzI5LjgxMzUgNTcuMTk2OCAyNS42MjgyIDUyLjUzNDcgMjEuODkzMiA0Ny45NTIxQzIxLjA3MiA0Ni45NzIgMTcuOTcyOCA0My4wMjUxIDE3LjI1NzYgNDIuMDQ1QzIuMzE3NiAyMi4wNzIgLTIuMTA2MTEgNi4wOTg5OSAyLjM0NDA5IDEuNjQ4NzlDNi43OTQyOSAtMi44MDE0MSAyMi43NjczIDEuNjIyMjcgNDIuNzQwMyAxNi41NjIyWiIgZmlsbD0iI2ZmZiIvPjwvc3ZnPg==)](https://temporal.io/community)
140+
[![Awesome Temporal](https://img.shields.io/static/v1?style=flat-square&label=&message=Awesome+Temporal&logo=Awesome-Lists&color=4b4567)](https://github.com/temporalio/awesome-temporal)
109141

142+
[//]: # ([![Temporal YT Channel](https://img.shields.io/static/v1?style=flat-square&label=&message=Watch+on+Youtube&logo=youtube&color=FF2052)](https://www.youtube.com/temporalio))
110143

111144
## License
112145

113-
Temporal PHP SDK is open-sourced software licensed under the [MIT License](https://opensource.org/licenses/MIT).
146+
Temporal PHP SDK is open-sourced software licensed under the [MIT license](https://opensource.org/licenses/MIT).
114147

115148
[![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2Ftemporalio%2Fsdk-php.svg?type=large)](https://app.fossa.com/projects/git%2Bgithub.com%2Ftemporalio%2Fsdk-php?ref=badge_large)

0 commit comments

Comments
 (0)