PHPackages                             atournayre/deploy - 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. atournayre/deploy

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

atournayre/deploy
=================

016PHP

Since Feb 4Pushed 1y ago2 watchersCompare

[ Source](https://github.com/atournayre/deploy)[ Packagist](https://packagist.org/packages/atournayre/deploy)[ RSS](/packages/atournayre-deploy/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

Deploy Symfony application
==========================

[](#deploy-symfony-application)

Use [Castor](https://castor.jolicode.com/) to deploy Symfony application.

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

[](#installation)

1. `composer require atournayre/deploy`
2. `cp vendor/atournayre/deploy/install/.env.dist tools/castor/.env`
3. `cp vendor/atournayre/deploy/install/castor.php castor.php`
4. Run `castor list` to see available commands.

Features
--------

[](#features)

- Hotfix
    - deploy
    - create
    - merge

Hotfix
------

[](#hotfix)

### Deploy

[](#deploy)

Run a specific deployment script.

```
castor hotfix:deploy
```

### How it works?

[](#how-it-works)

1. Ask for confirmation
2. Run pre-deploy hook
3. Update code
4. Run post-update-code hook
5. Clear cache
6. Run post-deploy hook
7. It's done!

#### Events

[](#events)

- hook:pre-deploy
- hook:post-update-code (e.g. Grunt)
- hook:post-deploy

### Create

[](#create)

Generate a hotfix branch and optionally create a sub-branch for a specific issue.

```
castor hotfix:generate
```

#### Prerequisites

[](#prerequisites)

- You must have a `composer.json` file in your working directory.
- Your app must use semantic versioning.

#### How it works?

[](#how-it-works-1)

1. Check if there are uncommitted changes in your working directory, if so, abort.
2. Update main branch
3. Get current version
4. Create hotfix branch
5. Update version
6. Run hotfix-post-update-version hook
7. Commit
8. Push
9. Ask for creation of a sub-branch in the hotfix branch
10. Create the branch
11. Done!

### Merge

[](#merge)

Merge the hotfix branch into main, develop and releases.

```
castor hotfix:merge
```

Update dependencies
-------------------

[](#update-dependencies)

### Usage

[](#usage)

```
castor dependencies:update
```

### How it works?

[](#how-it-works-2)

1. Check if updates are available
2. Ask for confirmation
3. Create the branch
4. Update dependencies
5. Run composer-post-update hook
6. Commit
7. Push
8. It's done!

#### Events

[](#events-1)

- hook:composer-post-update

Hooks
-----

[](#hooks)

To use hooks, you must create listeners in `tools/castor/events`.

```
