Skip to content

Commit a681e11

Browse files
authored
Merge branch 'master' into timeout-exc
2 parents b1aef0a + 694558c commit a681e11

214 files changed

Lines changed: 8698 additions & 997 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitattributes

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@
55
/resources/scripts/ export-ignore
66
/runtime/ export-ignore
77
/tests/ export-ignore
8+
/patches/ export-ignore
89

910
/*.xml export-ignore
1011
/*.xml.dist export-ignore
1112
Makefile export-ignore
13+
patches.lock.json export-ignore

.github/CODEOWNERS

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1 @@
1-
* @temporalio/sdk
2-
* @roxblnfk
3-
* @wolfy-j
1+
* @temporalio/sdk @roxblnfk @wolfy-j

.github/workflows/docs.yml

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,23 @@ on:
55
branches:
66
- "master"
77

8+
permissions:
9+
contents: read
10+
actions: write
11+
812
jobs:
913
docs:
14+
permissions:
15+
contents: read
16+
actions: write
1017
name: Generating API documentation
1118
runs-on: ubuntu-latest
1219
steps:
13-
- uses: actions/checkout@v4
20+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
1421
with:
1522
submodules: recursive
1623

17-
- uses: actions/setup-node@v1
24+
- uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6
1825
with:
1926
node-version: 20
2027

@@ -23,7 +30,7 @@ jobs:
2330

2431
- name: Cache phpDocumentor build files
2532
id: phpdocumentor-cache
26-
uses: actions/cache@v3
33+
uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5
2734
with:
2835
path: .phpdoc/cache
2936
key: ${{ runner.os }}-phpdocumentor-${{ github.sha }}

.github/workflows/run-test-suite.yml

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,13 @@ on:
3838
- 'psalm-baseline.xml'
3939
- '.editorconfig'
4040

41+
permissions:
42+
contents: read
43+
4144
jobs:
4245
test:
46+
permissions:
47+
contents: read
4348
name: PHP${{ matrix.php }}${{ matrix.extensions-suffix }}, ${{ matrix.os }}, ${{ matrix.dependencies }} deps
4449
runs-on: ${{ matrix.os }}
4550
timeout-minutes: ${{ inputs.test-timeout }}
@@ -48,7 +53,12 @@ jobs:
4853
strategy:
4954
fail-fast: ${{ inputs.fail-fast }}
5055
matrix:
51-
php: [ 8.1, 8.2, 8.3, 8.4 ]
56+
php:
57+
- 8.1
58+
- 8.2
59+
- 8.3
60+
- 8.4
61+
- 8.5
5262
os: [ ubuntu-latest ]
5363
extensions-suffix: [ '', ', protobuf' ]
5464
dependencies: [ lowest , highest ]
@@ -65,10 +75,10 @@ jobs:
6575
git config --global core.eol lf
6676
6777
- name: Check Out Code
68-
uses: actions/checkout@v4
78+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
6979

7080
- name: Setup PHP ${{ matrix.php }}
71-
uses: shivammathur/setup-php@v2
81+
uses: shivammathur/setup-php@accd6127cb78bee3e8082180cb391013d204ef9f # v2
7282
with:
7383
php-version: ${{ matrix.php }}
7484
extensions: dom, sockets, grpc, curl ${{ matrix.extensions-suffix }}
@@ -77,7 +87,7 @@ jobs:
7787
run: composer validate --strict
7888

7989
- name: Install dependencies with composer
80-
uses: ramsey/composer-install@v3
90+
uses: ramsey/composer-install@5c2bcf28d7b060ef3c601d7b476d5430a7b46c27 # v4
8191
with:
8292
dependency-versions: ${{ matrix.dependencies }}
8393

@@ -95,6 +105,8 @@ jobs:
95105

96106
- name: Run tests
97107
run: ${{ inputs.test-command }}
108+
env:
109+
XDEBUG_MODE: off
98110

99111
- name: Check for failures
100112
if: steps.validate.outcome == 'failure'

.github/workflows/security-check.yml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,17 @@ name: Security
22

33
on: [push, pull_request]
44

5+
permissions:
6+
contents: read
7+
58
concurrency:
69
cancel-in-progress: ${{ !contains(github.ref, 'release/')}}
710
group: tests-${{ github.workflow }}-${{ github.ref }}
811

912
jobs:
1013
security:
14+
permissions:
15+
contents: read
1116
name: Security Checks (PHP ${{ matrix.php }}, OS ${{ matrix.os }})
1217
runs-on: ${{ matrix.os }}
1318
strategy:
@@ -18,16 +23,16 @@ jobs:
1823
os: [ ubuntu-latest ]
1924
steps:
2025
- name: Set up PHP ${{ matrix.php }}
21-
uses: shivammathur/setup-php@v2
26+
uses: shivammathur/setup-php@accd6127cb78bee3e8082180cb391013d204ef9f # v2
2227
with:
2328
php-version: ${{ matrix.php }}
2429
extensions: dom, sockets, grpc, curl
2530

2631
- name: Check Out Code
27-
uses: actions/checkout@v4
32+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
2833

2934
- name: Install dependencies with composer
30-
uses: ramsey/composer-install@v3
35+
uses: ramsey/composer-install@5c2bcf28d7b060ef3c601d7b476d5430a7b46c27 # v4
3136
with:
3237
dependency-versions: ${{ matrix.dependencies }}
3338

.github/workflows/static-analysis.yml

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,17 @@ name: Static Analysis
22

33
on: [push, pull_request]
44

5+
permissions:
6+
contents: read
7+
58
concurrency:
69
cancel-in-progress: ${{ !contains(github.ref, 'release/')}}
710
group: tests-${{ github.workflow }}-${{ github.ref }}
811

912
jobs:
1013
psalm:
14+
permissions:
15+
contents: read
1116
name: Psalm Validation (PHP ${{ matrix.php }}, OS ${{ matrix.os }})
1217
runs-on: ${{ matrix.os }}
1318
continue-on-error: true
@@ -18,23 +23,25 @@ jobs:
1823
os: [ubuntu-latest]
1924
steps:
2025
- name: Set up PHP ${{ matrix.php }}
21-
uses: shivammathur/setup-php@v2
26+
uses: shivammathur/setup-php@accd6127cb78bee3e8082180cb391013d204ef9f # v2
2227
with:
2328
php-version: ${{ matrix.php }}
2429
extensions: dom
2530

2631
- name: Check Out Code
27-
uses: actions/checkout@v4
32+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
2833

2934
- name: Install dependencies with composer
30-
uses: ramsey/composer-install@v3
35+
uses: ramsey/composer-install@5c2bcf28d7b060ef3c601d7b476d5430a7b46c27 # v4
3136
with:
3237
dependency-versions: ${{ matrix.dependencies }}
3338

3439
- name: 🔍 Run Tests
3540
run: vendor/bin/psalm
3641

3742
arch:
43+
permissions:
44+
contents: read
3845
name: Architecture tests
3946
runs-on: ${{ matrix.os }}
4047
continue-on-error: true
@@ -45,18 +52,18 @@ jobs:
4552
os: [ubuntu-latest]
4653
steps:
4754
- name: Set up PHP ${{ matrix.php }}
48-
uses: shivammathur/setup-php@v2
55+
uses: shivammathur/setup-php@accd6127cb78bee3e8082180cb391013d204ef9f # v2
4956
with:
5057
php-version: ${{ matrix.php }}
5158
extensions: dom
5259

5360
- name: Check Out Code
54-
uses: actions/checkout@v4
61+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
5562
with:
5663
fetch-depth: 1
5764

5865
- name: Install dependencies with composer
59-
uses: ramsey/composer-install@v3
66+
uses: ramsey/composer-install@5c2bcf28d7b060ef3c601d7b476d5430a7b46c27 # v4
6067
with:
6168
dependency-versions: ${{ matrix.dependencies }}
6269

.github/workflows/testing.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,26 @@ name: Testing
22

33
on: [push, pull_request]
44

5+
permissions:
6+
contents: read
7+
58
concurrency:
69
cancel-in-progress: ${{ !contains(github.ref, 'release/')}}
710
group: tests-${{ github.workflow }}-${{ github.ref }}
811

912
jobs:
1013
unit:
14+
permissions:
15+
contents: read
1116
name: Unit Testing
1217
uses: ./.github/workflows/run-test-suite.yml
1318
with:
1419
fail-fast: false
1520
test-command: composer test:unit
1621

1722
functional:
23+
permissions:
24+
contents: read
1825
name: Functional Testing
1926
uses: ./.github/workflows/run-test-suite.yml
2027
with:
@@ -23,6 +30,8 @@ jobs:
2330
download-binaries: true
2431

2532
acceptance-slow:
33+
permissions:
34+
contents: read
2635
name: Acceptance Testing (Slow)
2736
uses: ./.github/workflows/run-test-suite.yml
2837
with:
@@ -31,6 +40,8 @@ jobs:
3140
download-binaries: true
3241

3342
acceptance-fast:
43+
permissions:
44+
contents: read
3445
name: Acceptance Testing (Fast)
3546
uses: ./.github/workflows/run-test-suite.yml
3647
with:

CONTRIBUTING.md

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# Contributing
2+
3+
This doc is intended for contributors to `sdk-php` (hopefully that's you!)
4+
5+
All contributors must complete the Temporal Contributor License Agreement (CLA) before changes can be merged. A link to the CLA will be posted in the PR.
6+
7+
## Development environment
8+
9+
- [PHP 8.1+](https://www.php.net/downloads.php)
10+
- [Composer](https://getcomposer.org/download/)
11+
12+
## Build
13+
14+
```bash
15+
composer install # Downloads regular dependencies
16+
composer run get:binaries # Downloads dependencies for local development
17+
pecl install grpc # Required by the Temporal client
18+
pecl install protobuf # Improves performance of protobuf serialization
19+
```
20+
21+
## Test
22+
23+
```bash
24+
composer run test:unit # Unit tests
25+
composer run test:func # Functional tests
26+
composer run test:arch # Architecture tests
27+
composer run test:accept # All acceptance tests
28+
composer run test:accept-fast # All acceptance tests except the slow ones
29+
composer run test:accept-slow # Only the slow acceptance tests
30+
```
31+
32+
## Quality control
33+
34+
```bash
35+
composer run cs:diff # Show code style violations (dry run)
36+
composer run cs:fix # Auto-fix code style violations
37+
composer run psalm # Run static analysis
38+
composer run psalm:baseline # Update the Psalm baseline file
39+
```

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
![Temporal PHP SDK](https://raw.githubusercontent.com/temporalio/assets/main/files/w/php.png)
2+
13
# Temporal PHP SDK
24

35
Temporal is a distributed, scalable, durable, and highly available orchestration
@@ -140,6 +142,10 @@ Web UI will be available at `http://localhost:8000`.
140142
For advanced autocomplete while coding in PHPStorm, use [Meta Storm plugin](https://github.com/xepozz/meta-storm-idea-plugin).
141143
The plugin provides better autocomplete and links Workflow and Activity when writing and debugging code.
142144

145+
## Contibuting
146+
147+
We'd love your help improving the Temporal PHP SDK. Please review our [contribution guidelines](./CONTRIBUTING.md).
148+
143149
## Resources
144150

145151
Read the docs

composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
"ext-curl": "*",
2626
"ext-json": "*",
2727
"google/common-protos": "^4.9",
28-
"google/protobuf": "^4.31.1",
28+
"google/protobuf": "^4.33.6 || ^5.34.0",
2929
"grpc/grpc": "^1.57",
3030
"internal/destroy": "^1.0",
3131
"internal/promise": "^3.4",
@@ -62,7 +62,7 @@
6262
"cweagans/composer-patches": "^2.0",
6363
"dereuromark/composer-prefer-lowest": "^0.1.10",
6464
"doctrine/annotations": "^1.14.4 || ^2.0.2",
65-
"internal/dload": "^1.2.0",
65+
"internal/dload": "^1.10.0",
6666
"internal/toml": "^1.0.3",
6767
"jetbrains/phpstorm-attributes": "dev-master",
6868
"laminas/laminas-code": "^4.16",

0 commit comments

Comments
 (0)