Download the PHP package hasel/aphpsurd-bundle without Composer

On this page you can find all versions of the php package hasel/aphpsurd-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package aphpsurd-bundle

hasel/aphpsurd-bundle

Symfony bundle wrapping ruudk/absurd-php-sdk, the PHP client for Absurd, a Postgres-native durable execution engine built by earendil-works.

Installation

Symfony Flex registers the bundle automatically. Without Flex, add it manually:

Configuration

The bundle picks up the default Doctrine DBAL connection automatically. Everything else is opt-in.

Per-queue settings are applied as defaults when spawning tasks on that queue. Per-call SpawnOptions always take precedence.

Tasks

Tasks are invokable classes tagged with #[AsAbsurdTask], auto-discovered via Symfony's autoconfiguration.

Typed payload deserialization requires symfony/serializer.

Spawning tasks

Inject AbsurdClientInterface wherever you need to produce work — controllers, services, event listeners. It resolves task class names to their configured task name and queue automatically, applies per-queue defaults from config, and in debug mode integrates with the Symfony profiler.

When a handler's __invoke has a typed payload parameter, you can pass the payload object directly and the bundle resolves the task from its type:

Each payload type may only be used in a single handler's __invoke — the bundle throws a LogicException at container compile time otherwise.

Alternatively, pass the handler class name explicitly:

Override defaults per call:

Workers

Run one worker process per queue. Graceful shutdown on SIGTERM/SIGINT requires ext-pcntl.

Rate limiting

Per-queue rate limiting is supported via symfony/rate-limiter. Install it first:

Configure a rate limiter in Symfony (e.g. using the framework bundle), then reference it by service ID in the queue config:

After each batch of tasks the worker consumes one token per task processed. If the limit is exhausted it waits until the window resets before continuing. For multi-host deployments use a shared storage backend (e.g. Redis) for the limiter.

Service reset between tasks

The bundle ships a ResetServicesListener that calls Symfony's services_resetter after every completed or failed task. This resets Doctrine entity managers, Monolog buffers, and anything else tagged kernel.reset.

Treat the worker like any long-running process: don't cache EntityManagerInterface results in properties, fetch them per-task.

Migration

The bundle vendors the Absurd SQL schema. The recommended approach is to keep the Absurd schema in your Doctrine migration history alongside the rest of your database.

To prevent Doctrine from picking up the absurd schema in its own migrations, add a schema filter to your DBAL config:

It is known, that Doctrine might still create a CREATE SCHEMA absurd statement inside the down-step in an otherwise empty migration.

When you run make:migration, the bundle checks whether your installed Absurd schema is behind the version the bundle requires. If doctrine/doctrine-migrations-bundle is installed, it automatically generates a dedicated migration file with the pending SQL. Otherwise it prints the pending filenames for you to apply manually.

For non-Doctrine setups, apply the schema directly:

Commands

Command Description
absurd:migrate Apply Absurd schema migrations
absurd:migrate --dry-run List pending migration files without applying them
absurd:setup-queues Create configured queues in the database
absurd:setup-queues --prune Also remove queues not in config
absurd:consume Start a worker
absurd:cleanup Delete old completed tasks and events
absurd:list-tasks List all registered task handlers

Profiler

In debug mode the bundle registers a Web Debug Toolbar panel showing all spawned tasks (payload, options, errors) and emitted events per request.

AI

In the spirit of the original absurd code base, this bundle was written with support from Claude Code.


All versions of aphpsurd-bundle with dependencies

PHP Build Version
Package Version
Requires php Version >=8.4
ext-pdo Version *
ruudk/absurd-php-sdk Version ^0.2.0
symfony/config Version ^7.4|^8.0
symfony/console Version ^7.4|^8.0
symfony/dependency-injection Version ^7.4|^8.0
symfony/framework-bundle Version ^7.4|^8.0
symfony/http-kernel Version ^7.4|^8.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package hasel/aphpsurd-bundle contains the following files

Loading the files please wait ...