> ## Documentation Index
> Fetch the complete documentation index at: https://kawax.biz/llms.txt
> Use this file to discover all available pages before exploring further.

# laravel/symfony-on-cloud — Running Symfony Apps on Laravel Cloud

> A look at the new official Laravel repository. Covers the official Symfony bundle that enables Symfony Messenger's managed queues to run on Laravel Cloud.

<Info>
  This article is an early investigation as of June 2026. `laravel/symfony-on-cloud` is an active repository and new features are expected to be added.
</Info>

## What is laravel/symfony-on-cloud?

[laravel/symfony-on-cloud](https://github.com/laravel/symfony-on-cloud) is an official Symfony bundle that **brings Laravel Cloud capabilities to Symfony applications**. The repository was made public on June 27, 2026.

```mermaid theme={null}
flowchart LR
    A["Symfony App"] --> B["laravel/symfony-on-cloud<br>Bundle"]
    B --> C["Laravel Cloud<br>Managed Queue"]
    C --> D["AWS SQS"]
    C --> E["Cloud Dashboard<br>Metrics"]
```

Laravel Cloud was previously exclusive to Laravel applications. This package opens the door for **Symfony developers to leverage Laravel Cloud infrastructure** — starting with managed queues.

The first feature is **Symfony Messenger with managed queues**. The README notes that "more Laravel Cloud capabilities will follow," meaning queue support is just the beginning.

## Installation

```bash theme={null}
composer require laravel/symfony-on-cloud
```

Next, register the bundle in `config/bundles.php` (Symfony Flex recipes are not yet available, so add it manually):

```php theme={null}
return [
    // ...
    Laravel\Cloud\Symfony\LaravelCloudBundle::class => ['all' => true],
];
```

## Managed Queues

### Basic Configuration

The bundle provides a ready-made transport named `cloud`. In a Laravel Cloud environment, the connection settings are injected automatically — no manual DSN configuration is required.

```yaml theme={null}
# config/packages/messenger.yaml
framework:
    messenger:
        routing:
            '*': cloud
```

<Tip>
  Migrating an existing Symfony Messenger app to Laravel Cloud is straightforward. Cloud automatically injects `MESSENGER_TRANSPORT_DSN=laravel-cloud://managed-queue`, so apps that already use the traditional `async` transport (`dsn: '%env(MESSENGER_TRANSPORT_DSN)%'`) will work without any code changes.
</Tip>

### Multiple Queues

In Laravel Cloud you can create multiple managed queues (e.g. `default` and `critical`), each backed by its own SQS queue and worker. Use `CloudQueueStamp` to dispatch to a specific queue:

```php theme={null}
use Laravel\Cloud\Symfony\Queue\Messenger\CloudQueueStamp;
use Symfony\Component\Messenger\MessageBusInterface;

$bus->dispatch(new ProcessReport($report), [new CloudQueueStamp('critical')]);
```

Dispatching without a stamp sends the message to the default queue.

### FIFO Queues

A managed queue whose name ends in `.fifo` is treated as a [FIFO queue](https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/FIFO-queues.html). Messages are delivered in strict order with deduplication.

```php theme={null}
use Laravel\Cloud\Symfony\Queue\Messenger\CloudQueueStamp;

$bus->dispatch(new ProcessOrder($order), [new CloudQueueStamp('orders.fifo')]);
```

By default, the queue name is used as the group ID and a unique value is used for deduplication. For finer control, add `CloudFifoStamp`:

```php theme={null}
use Laravel\Cloud\Symfony\Queue\Messenger\CloudFifoStamp;
use Laravel\Cloud\Symfony\Queue\Messenger\CloudQueueStamp;

$bus->dispatch(new ProcessOrder($order), [
    new CloudQueueStamp('orders.fifo'),
    new CloudFifoStamp(
        messageGroupId: 'customer-'.$order->customerId,
        messageDeduplicationId: 'order-'.$order->id,
    ),
]);
```

### Fair Queues

[SQS fair queues](https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-fair-queues.html) prevent one tenant from monopolizing throughput. Attaching a message group ID to a standard queue tells SQS to distribute processing capacity fairly across tenants.

```php theme={null}
use Laravel\Cloud\Symfony\Queue\Messenger\CloudMessageGroupStamp;
use Laravel\Cloud\Symfony\Queue\Messenger\CloudQueueStamp;

$bus->dispatch(new ProcessOrder($order), [
    new CloudQueueStamp('orders'),
    new CloudMessageGroupStamp('customer-'.$order->customerId),
]);
```

<Info>
  `CloudMessageGroupStamp` is for **standard queues only** and cannot be used with FIFO queues. Use `CloudFifoStamp` for grouping in FIFO queues.
</Info>

### Delays

Use `DelayStamp` to add a delivery delay to a standard queue. SQS enforces a **maximum of 15 minutes** — exceeding this limit raises an error (the message will not silently cap at 15 minutes).

FIFO queues do not support delays; using `DelayStamp` with a FIFO queue will raise an error.

### Retries

When a handler fails, the bundle returns the message to SQS and relies on the visibility timeout for redelivery. This allows waiting up to the SQS visibility timeout ceiling of **12 hours**, rather than the 15-minute send delay limit.

Retry behavior is configured using Symfony Messenger's standard `retry_strategy`:

```yaml theme={null}
# config/packages/messenger.yaml
framework:
    messenger:
        transports:
            cloud:
                retry_strategy:
                    max_retries: 3     # 3 retries (4 attempts total)
                    delay: 1000        # initial backoff in milliseconds
                    multiplier: 2      # backoff multiplier
                    max_delay: 0       # no cap (SQS 12-hour limit applies)
```

Exceptions that implement `UnrecoverableExceptionInterface` are recorded as failures immediately, with no retries.

## Local Development

The `cloud` transport can be overridden in your application. For local development, use `sync://` to execute jobs synchronously:

```yaml theme={null}
# config/packages/messenger.yaml
when@dev:
    framework:
        messenger:
            transports:
                cloud: 'sync://'
```

To disable the feature entirely, set `laravel_cloud.queue.enabled: false`.

## Summary

`laravel/symfony-on-cloud` is the official bundle that extends Laravel Cloud infrastructure to Symfony applications. The initial release focuses on **managed queues**, with a fully featured Symfony Messenger integration that includes multiple queues, FIFO and fair queues, and configurable retry strategies.

| Stamp                    | Purpose                                             |
| ------------------------ | --------------------------------------------------- |
| `CloudQueueStamp`        | Dispatch to a specific queue                        |
| `CloudFifoStamp`         | Order and deduplication control for FIFO queues     |
| `CloudMessageGroupStamp` | Fair distribution across tenants on standard queues |

The README promises that additional Laravel Cloud features will follow. For teams running Symfony applications on Laravel Cloud, this package is shaping up to be an essential integration point.

## Related Links

<CardGroup cols={2}>
  <Card title="laravel/symfony-on-cloud" icon="github" href="https://github.com/laravel/symfony-on-cloud">
    Official repository and README
  </Card>

  <Card title="Laravel Cloud" icon="cloud" href="https://laravel.com/cloud">
    Laravel Cloud official site
  </Card>

  <Card title="Symfony Messenger" icon="envelope" href="https://symfony.com/doc/current/messenger.html">
    Symfony Messenger documentation
  </Card>

  <Card title="Laravel Cloud Docs" icon="book" href="https://cloud.laravel.com/docs/intro">
    Laravel Cloud detailed documentation
  </Card>
</CardGroup>
