You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The SDK includes assertions that compare Smart CDN URL signatures and regular request signatures with our reference Node.js implementation. To run these tests:
35
+
36
+
1. Requirements:
37
+
38
+
- Node.js 20+ with npm
39
+
- Ability to execute `npx transloadit smart_sig` (the CLI is downloaded on demand)
40
+
- Ability to execute `npx transloadit sig` (the CLI is downloaded on demand)
41
+
42
+
2. Run the tests:
43
+
44
+
```bash
45
+
export TRANSLOADIT_KEY='your-auth-key'
46
+
export TRANSLOADIT_SECRET='your-auth-secret'
47
+
TEST_NODE_PARITY=1 make test-all
48
+
```
49
+
50
+
If you want to warm the CLI cache ahead of time you can run:
51
+
52
+
```bash
53
+
npx --yes transloadit smart_sig --help
54
+
```
55
+
56
+
For regular request signatures, you can also prime the CLI by running:
57
+
58
+
```bash
59
+
TRANSLOADIT_KEY=... TRANSLOADIT_SECRET=... \
60
+
npx --yes transloadit sig --algorithm sha1 --help
61
+
```
62
+
63
+
CI opts into `TEST_NODE_PARITY=1`, and you can optionally do this locally as well.
64
+
65
+
### Run Tests in Docker
66
+
67
+
Use `scripts/test-in-docker.sh` for a reproducible environment:
68
+
69
+
```bash
70
+
./scripts/test-in-docker.sh
71
+
```
72
+
73
+
This builds the local image, runs `composer install`, and executes `make test-all` (unit + integration tests). Pass a custom command to run something else (composer install still runs first):
Environment variables such as `TEST_NODE_PARITY` or the credentials in `.env` are forwarded, so you can combine parity checks and integration tests with Docker:
80
+
81
+
```bash
82
+
TEST_NODE_PARITY=1 ./scripts/test-in-docker.sh
83
+
```
84
+
85
+
## Releasing a new version
86
+
87
+
To release, say `3.2.0`[Packagist](https://packagist.org/packages/transloadit/php-sdk), follow these steps:
88
+
89
+
1. Make sure `PACKAGIST_TOKEN` is set in your `.env` file
Copy file name to clipboardExpand all lines: README.md
+17-68Lines changed: 17 additions & 68 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -276,6 +276,23 @@ echo '</pre>';
276
276
277
277
<dfn>Signature Authentication</dfn> is done by the PHP SDK by default internally so you do not need to worry about this :)
278
278
279
+
If you script the same request payload multiple times in quick succession (for example inside a health check or tight integration test loop), add a random nonce to keep each signature unique:
0 commit comments