PHPackages                             atantares/temporal-bundle - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. atantares/temporal-bundle

ActiveLibrary

atantares/temporal-bundle
=========================

Workflow Runtime in Symfony for Temporal

2.1.1(11mo ago)35.4kMITPHPPHP &gt;=8.2

Since Mar 6Pushed 11mo ago1 watchersCompare

[ Source](https://github.com/Atantares/temporal-bundle)[ Packagist](https://packagist.org/packages/atantares/temporal-bundle)[ RSS](/packages/atantares-temporal-bundle/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (20)Versions (8)Used By (0)

Symfony Temporal Bundle
=======================

[](#symfony-temporal-bundle)

This is a package for the [official PHP SDK](https://github.com/temporalio/sdk-php) with Workflow And Activity Registry and full-configurable worker and workflow client. Used repositories: [roadrunner-bundle](https://github.com/Baldinof/roadrunner-bundle), [temporal-bundle](https://github.com/highcoreorg/temporal-bundle), [temporal-bundle-vanta](https://github.com/VantaFinance/temporal-bundle)

Requirements:
-------------

[](#requirements)

- php &gt;= 8.1
- symfony &gt;= 6.0

Installation
------------

[](#installation)

Use this command to install `composer require atantares/temporal-bundle`

Usage
-----

[](#usage)

Example configuration:

```
# config/packages/temporal.yaml
temporal:
  defaultClient: default
  pool:
    dataConverter: temporal.data_converter
    roadrunnerRPC: '%env(RR_RPC)%'

  workers:
    default:
      taskQueue: default
      exceptionInterceptor: temporal.exception_interceptor
      finalizers:
        - temporal.doctrine_ping_connection_default.finalizer
        - temporal.doctrine_clear_entity_manager.finalizer
      interceptors:
        - temporal.doctrine_ping_connection_default_activity_inbound.interceptor

  clients:
    default:
      namespace: default
      address: '%env(TEMPORAL_ADDRESS)%'
      dataConverter: temporal.data_converter
    cloud:
      namespace: default
      address: '%env(TEMPORAL_ADDRESS)%'
      dataConverter: temporal.data_converter
      clientKey: '%env(TEMPORAL_CLIENT_KEY_PATH)%'
      clientPem: '%env(TEMPORAL_CLIENT_CERT_PATH)%'
```

Doctrine integrations

If [`DoctrineBundle`](https://github.com/doctrine/DoctrineBundle) is use, the following finalizer is available to you:

- `temporal.doctrine_ping_connection_.finalizer`
- `temporal.doctrine_clear_entity_manager.finalizer`

And interceptors:

- `temporal.doctrine_ping_connection__activity_inbound.interceptor`

Create rr.yaml:

```
version: "3"

server:
  command: "php public/index.php"
  env:
    - APP_RUNTIME: Atantares\TemporalBundle\Runtime\TemporalRuntime

temporal:
  address: "temporal:7233"
  namespace: 'default' # Configure a temporal namespace (you must create a namespace manually or use the default namespace named "default")
  activities:
    num_workers: 4 # Set up your worker count

# Set up your values
logs:
  mode: production
  output: stdout
  err_output: stderr
  encoding: json
  level: error

rpc:
  listen: tcp://0.0.0.0:6001
```

**Workflow example:**

```
