PHPackages                             terminal42/mage-tools - 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. terminal42/mage-tools

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

terminal42/mage-tools
=====================

Magephp tools for easier deployment of Contao and Symfony systems.

1.0.0(7y ago)722.2kMITPHPPHP &gt;=5.5

Since Mar 27Pushed 7y ago5 watchersCompare

[ Source](https://github.com/terminal42/mage-tools)[ Packagist](https://packagist.org/packages/terminal42/mage-tools)[ RSS](/packages/terminal42-mage-tools/feed)WikiDiscussions master Synced 4w ago

READMEChangelogDependencies (3)Versions (4)Used By (0)

Mage Tools for deployment
=========================

[](#mage-tools-for-deployment)

A set of predefined tasks and helpful libraries for the [Magallanes](http://magephp.com/) PHP Deployment Tool.

Most of the tasks were created to ease the deployment of [Symfony](http://symfony.com/)and [Contao](https://contao.org/) applications. Check the list below for a full list of available tasks and their configurations.

Usage
-----

[](#usage)

To use the tasks simply added them to your `.mage.yml` file. The recommended setup is:

```
pre-deploy:
    - 'Terminal42\MageTools\Task\IntegrityCheck\ContaoTask'
on-deploy:
    # ... symlinks, composer install ...
    - 'Terminal42\MageTools\Task\Symfony\PlatformReleaseTask'
    # ... symfony cache warmup, symfony assets install ...
    - 'Terminal42\MageTools\Task\Maintenance\LockTask'
on-release:
    - 'Terminal42\MageTools\Task\Symfony\AcceleratorCacheClearTask'
post-release:
    - 'Terminal42\MageTools\Task\Backup\DatabaseBackupTask'
    - 'Terminal42\MageTools\Task\Doctrine\MigrateTask'
    - 'Terminal42\MageTools\Task\Doctrine\CacheClearTask'
    # ... symfony cache clear ...
    - 'Terminal42\MageTools\Task\Maintenance\UnlockTask'
```

Available tasks
---------------

[](#available-tasks)

##### Terminal42\\MageTools\\Task\\Symfony\\AcceleratorCacheClearTask

[](#terminal42magetoolstasksymfonyacceleratorcachecleartask)

Clears the accelerator cache. The [AcceleratorCacheBundle](https://github.com/Smart-Core/AcceleratorCacheBundle)is required for this to work.

```
on-release:
    - 'Terminal42\MageTools\Task\Symfony\AcceleratorCacheClearTask': { flags: "--opcode" }
```

##### Terminal42\\MageTools\\Task\\Symfony\\PlatformReleaseTask

[](#terminal42magetoolstasksymfonyplatformreleasetask)

Updates the platform version in the parameters.yml file. Uses `git describe` to fetch the version internally and adds the output as `platform_version` to your `parameters.yml`.

```
on-deploy:
    - 'Terminal42\MageTools\Task\Symfony\PlatformReleaseTask'
```

### Backup

[](#backup)

##### Terminal42\\MageTools\\Task\\Backup\\DatabaseBackupTask

[](#terminal42magetoolstaskbackupdatabasebackuptask)

Runs the database backup task using [backup-manager/symfony bundle](https://github.com/backup-manager/symfony). This task should be run before ane database changes are made. The parameters are reflecting the bundle configuration under `bm_backup_manager`.

```
post-release:
    - 'Terminal42\MageTools\Task\Backup\DatabaseBackupTask': { database: 'production', storage: 'local' }

    # Optional parameters:
    # - filename (defaults to: Y-m-d-H:i:s.sql)
    # - compression (defaults to: none)
    # - flags (defaults to: none)
```

### Contao

[](#contao)

##### Terminal42\\MageTools\\Task\\Contao\\AutomatorTask

[](#terminal42magetoolstaskcontaoautomatortask)

Runs the Contao automator task. You must provide the task name. Execute the Run "vendor/bin/contao-console contao:automator" command to see available tasks.

```
post-release:
    - 'Terminal42\MageTools\Task\Contao\AutomatorTask': { task: 'purgeSearchCache', env: 'prod' }
```

### Doctrine

[](#doctrine)

##### Terminal42\\MageTools\\Task\\Doctrine\\CacheClearTask

[](#terminal42magetoolstaskdoctrinecachecleartask)

Clear the Doctrine metadata, query and result cache.

```
post-release:
    - 'Terminal42\MageTools\Task\Doctrine\CacheClearTask': { env: 'prod' }
```

##### Terminal42\\MageTools\\Task\\Doctrine\\MigrateTask

[](#terminal42magetoolstaskdoctrinemigratetask)

Run the Doctrine migrations.

```
post-release:
    - 'Terminal42\MageTools\Task\Doctrine\MigrateTask': { env: 'prod' }
```

### Integrity check

[](#integrity-check)

##### Terminal42\\MageTools\\Task\\IntegrityCheck\\ContaoTask

[](#terminal42magetoolstaskintegritycheckcontaotask)

Checks Contao by executing `contao:version` command in Symfony's console.

```
pre-deploy:
    - 'Terminal42\MageTools\Task\IntegrityCheck\ContaoTask'
```

### Maintenance

[](#maintenance)

##### Terminal42\\MageTools\\Task\\Maintenance\\LockTask

[](#terminal42magetoolstaskmaintenancelocktask)

Enable the maintenance mode.

```
on-deploy:
    - 'Terminal42\MageTools\Task\Maintenance\LockTask': { env: 'prod' }
```

##### Terminal42\\MageTools\\Task\\Maintenance\\UnlockTask

[](#terminal42magetoolstaskmaintenanceunlocktask)

Disable the maintenance mode.

```
post-release:
    - 'Terminal42\MageTools\Task\Maintenance\UnlockTask': { env: 'prod' }
```

Custom commands
---------------

[](#custom-commands)

### Deploy all

[](#deploy-all)

Deploys system to all configured environments.

```
vendor/bin/mage-terminal42 deploy-all

```

### Connect via SSH

[](#connect-via-ssh)

Allows to open the SSH connection based on configured environments.

Basic usage (will take the first host defined for the environment):

```
vendor/bin/mage-terminal42 ssh production

```

For multiple hosts given you have config:

```
hosts:
    - webserver1
    - webserver2
    - webserver3
```

You can connect to them using:

```
vendor/bin/mage-terminal42 ssh --host=webserver3 production
vendor/bin/mage-terminal42 ssh --host=2 production

```

###  Health Score

33

—

LowBetter than 72% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity27

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity60

Established project with proven stability

 Bus Factor1

Top contributor holds 76.3% 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.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

2828d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/1073273?v=4)[Andreas Schempp](/maintainers/aschempp)[@aschempp](https://github.com/aschempp)

![](https://avatars.githubusercontent.com/u/481937?v=4)[Yanick Witschi](/maintainers/Toflar)[@Toflar](https://github.com/Toflar)

---

Top Contributors

[![qzminski](https://avatars.githubusercontent.com/u/193483?v=4)](https://github.com/qzminski "qzminski (29 commits)")[![Toflar](https://avatars.githubusercontent.com/u/481937?v=4)](https://github.com/Toflar "Toflar (7 commits)")[![aschempp](https://avatars.githubusercontent.com/u/1073273?v=4)](https://github.com/aschempp "aschempp (2 commits)")

---

Tags

symfonycontaodeploymentmagemagephp

### Embed Badge

![Health badge](/badges/terminal42-mage-tools/health.svg)

```
[![Health](https://phpackages.com/badges/terminal42-mage-tools/health.svg)](https://phpackages.com/packages/terminal42-mage-tools)
```

###  Alternatives

[rcsofttech/audit-trail-bundle

Enterprise-grade, high-performance Symfony audit trail bundle. Automatically track Doctrine entity changes with split-phase architecture, multiple transports (HTTP, Queue, Doctrine), and sensitive data masking.

1175.2k](/packages/rcsofttech-audit-trail-bundle)[in2code/in2publish_core

Content publishing extension to connect stage and production server

40140.7k](/packages/in2code-in2publish-core)[shopware/deployment-helper

Shopware deployment tools

19365.5k5](/packages/shopware-deployment-helper)[2lenet/crudit-bundle

The easy like Crud'it Bundle.

1615.6k12](/packages/2lenet-crudit-bundle)[aeliot/todo-registrar

Register TODOs from source code in issue tracker

153.0k](/packages/aeliot-todo-registrar)

PHPackages © 2026

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