PHPackages                             c0ntax/deployment-tasks - 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. [DevOps &amp; Deployment](/categories/devops)
4. /
5. c0ntax/deployment-tasks

ActiveLibrary[DevOps &amp; Deployment](/categories/devops)

c0ntax/deployment-tasks
=======================

A simple package to handle running scripts both pre and post deployment

010PHPCI failing

Since Jun 4Pushed 7y agoCompare

[ Source](https://github.com/c0ntax/deployment-tasks)[ Packagist](https://packagist.org/packages/c0ntax/deployment-tasks)[ RSS](/packages/c0ntax-deployment-tasks/feed)WikiDiscussions master Synced 3w ago

READMEChangelogDependenciesVersions (1)Used By (0)

c0ntax/deployment-tasks
=======================

[](#c0ntaxdeployment-tasks)

Introduction
------------

[](#introduction)

This is a simple (framework agnostic) library for running tasks once (and only once) at deployment time. Out of the box, it's designed to work with the [Knp Gaufrette](https://github.com/KnpLabs/Gaufrette) library so that you can persist the tasks that have run anywhere you want (ideally, a database if your project has access to it)

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

[](#installation)

```
composer req c0ntax/deployment-tasks
```

Err, that's it

Configuration
-------------

[](#configuration)

Configuration is simple. All you need to do is inject two configured Gaufrette Filesystems into the TaskService. They are:

1. The local project filesystem where your tasks will be stored
2. The location of your task memory that keeps a track of what has been run

```
use C0ntax\DeploymentTasks\Service\TaskService;
use Gaufrette\Filesystem;
use C0ntax\DeploymentTasks\Gaufrette\Adapter\Local;
use Gaufrette\Adapter\DoctrineDbal;

$taskFilesystem = new Filesystem(new Local('/path/to/tasks'));
$memoryFilesystem = new Filesystem(new DoctrineDbal(...));

$taskService = new TaskService($taskFilesystem, $memoryFilesystem);
```

You also need to make sure that you've set up the task directories. For example:

```
/path
  /to
    /tasks
      /Pre
        /task1232198312.sh
        /task3210948323.sh
      /Post
        /tasks0298340932.sh

```

Execution
---------

[](#execution)

Once it's configured, then you just have to pass the TaskService as defined above into the RunnerService

```
use C0ntax\DeploymentTasks\Contracts\TaskServiceInterface;
use C0ntax\DeploymentTasks\Service\RunnerService;

$runnerService = new RunnerService($taskService);
// To run pre deployment tasks (i.e. the codebase has been build and staged, but is not yet live)
$runnerService->run(TaskServiceInterface::TASK_TYPE_PRE);

// To run post deployment tasks (i.e. the codebase is now live and taking requests)
$runnerService->run(TaskServiceInterface::TASK_TYPE_POST);
```

###  Health Score

19

—

LowBetter than 9% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity37

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/1075300?v=4)[Dan Burzynski](/maintainers/c0ntax)[@c0ntax](https://github.com/c0ntax)

---

Top Contributors

[![c0ntax](https://avatars.githubusercontent.com/u/1075300?v=4)](https://github.com/c0ntax "c0ntax (7 commits)")

### Embed Badge

![Health badge](/badges/c0ntax-deployment-tasks/health.svg)

```
[![Health](https://phpackages.com/badges/c0ntax-deployment-tasks/health.svg)](https://phpackages.com/packages/c0ntax-deployment-tasks)
```

###  Alternatives

[in2code/in2publish_core

Content publishing extension to connect stage and production server

40143.4k](/packages/in2code-in2publish-core)[tiamo/phpas2

PHPAS2 is a php-based implementation of the EDIINT AS2 standard

4778.9k](/packages/tiamo-phpas2)[wapmorgan/php-rpm-packager

RPM packager for PHP applications.

106.6k](/packages/wapmorgan-php-rpm-packager)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
