Feel free to fork this project. We will happily merge bug fixes or other small improvements. For bigger changes you should probably get in touch with us before you start to avoid not seeing them merged.
make testSystem tests require:
- Valid Transloadit credentials in environment:
export TRANSLOADIT_KEY='your-auth-key'
export TRANSLOADIT_SECRET='your-auth-secret'Then run:
make test-allThe SDK includes assertions that compare Smart CDN URL signatures and regular request signatures with our reference Node.js implementation. To run these tests:
-
Requirements:
- Node.js 20+ with npm
- Ability to execute
npx transloadit smart_sig(the CLI is downloaded on demand) - Ability to execute
npx transloadit sig(the CLI is downloaded on demand)
-
Run the tests:
export TRANSLOADIT_KEY='your-auth-key'
export TRANSLOADIT_SECRET='your-auth-secret'
TEST_NODE_PARITY=1 make test-allIf you want to warm the CLI cache ahead of time you can run:
npx --yes transloadit smart_sig --helpFor regular request signatures, you can also prime the CLI by running:
TRANSLOADIT_KEY=... TRANSLOADIT_SECRET=... \
npx --yes transloadit sig --algorithm sha1 --helpCI opts into TEST_NODE_PARITY=1, and you can optionally do this locally as well.
Use scripts/test-in-docker.sh for a reproducible environment:
./scripts/test-in-docker.shThis 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):
./scripts/test-in-docker.sh vendor/bin/phpunit --filter signedSmartCDNUrlEnvironment variables such as TEST_NODE_PARITY or the credentials in .env are forwarded, so you can combine parity checks and integration tests with Docker:
TEST_NODE_PARITY=1 ./scripts/test-in-docker.shTo release, say 3.3.0 Packagist, follow these steps:
- Make sure
PACKAGIST_TOKENis set in your.envfile - Make sure you are in main:
git checkout main - Make sure
CHANGELOG.mdandcomposer.jsonhave been updated - Commit:
git add CHANGELOG.md composer.json && git commit -m "Release v3.3.0" - Tag:
git tag v3.3.0 - Push:
git push --tags - Notify Packagist (runs via Docker):
VERSION=3.3.0 ./scripts/notify-registry.sh - Publish a GitHub release (include the changelog). This triggers the release workflow. (via the GitHub UI,
gh release creates v3.3.0 --title "v3.3.0" --notes-file <(cat CHANGELOG.md section))
The notify script reuses the same Docker image as ./scripts/test-in-docker.sh, so Docker is the only requirement on your workstation.
This project implements the Semantic Versioning guidelines.