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 6y 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 4d 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 10% 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://www.gravatar.com/avatar/ba87ed8350747900018388ddee04fdf35cec7345986cdb7eb3b20abe0db9c1bb?d=identicon)[c0ntax](/maintainers/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

[deployer/deployer

Deployment Tool

11.0k25.4M207](/packages/deployer-deployer)[appwrite/server-ce

End to end backend server for frontend and mobile apps.

55.3k84.2k](/packages/appwrite-server-ce)[pragmarx/health

Laravel Server &amp; App Health Monitor and Notifier

2.0k1.0M2](/packages/pragmarx-health)[felixfbecker/language-server-protocol

PHP classes for the Language Server Protocol

22476.7M6](/packages/felixfbecker-language-server-protocol)[heroku/heroku-buildpack-php

Toolkit for starting a PHP application locally, with or without foreman, using the same config for PHP and Apache2/Nginx as on Heroku

8161.3M10](/packages/heroku-heroku-buildpack-php)[tiamo/phpas2

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

4674.7k](/packages/tiamo-phpas2)

PHPackages © 2026

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