PHPackages                             mopa/remote-update-bundle - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. mopa/remote-update-bundle

ActiveSymfony-bundle[Utility &amp; Helpers](/categories/utility)

mopa/remote-update-bundle
=========================

3713PHP

Since Jul 24Pushed 13y ago2 watchersCompare

[ Source](https://github.com/phiamo/MopaRemoteUpdateBundle)[ Packagist](https://packagist.org/packages/mopa/remote-update-bundle)[ RSS](/packages/mopa-remote-update-bundle/feed)WikiDiscussions master Synced 3w ago

READMEChangelogDependenciesVersions (1)Used By (0)

MopaRemoteUpdateBundle
======================

[](#moparemoteupdatebundle)

This Bundle provides commands to update remote installations directly from your command line.

```
app/console mopa:update:remote yourremote
```

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

[](#installation)

Installation is quite easy

### Step 1: Installation using your composer.json:

[](#step-1-installation-using-your-composerjson)

```
{
    "require": {
        "mopa/remote-update-bundle": "dev-master",
    }
}
```

### Step 2: Include the following bundles in your AppKernel.php:

[](#step-2-include-the-following-bundles-in-your-appkernelphp)

Make sure you do not include bundles twice if you already use them.

```
// application/ApplicationKernel
public function registerBundles()
{
    return array(
        // ...
        new Mopa\Bundle\RemoteUpdateBundle\MopaRemoteUpdateBundle(),
        new Mopa\Bundle\WSSEAuthenticationBundle\MopaWSSEAuthenticationBundle(),
        new Sensio\Bundle\BuzzBundle\SensioBuzzBundle(),
        new FOS\RestBundle\FOSRestBundle(),
        new JMS\SerializerBundle\JMSSerializerBundle($this)
        // ...
    );
}
```

### Step 2: Add the necessary routing information to your routing.yml

[](#step-2-add-the-necessary-routing-information-to-your-routingyml)

```
mopa_remote_update_bundle:
    type:     rest
    resource: "@MopaRemoteUpdateBundle/Resources/config/routing.yml"
```

### Step 3: Add the necessary firewall configurations to your security.yml

[](#step-3-add-the-necessary-firewall-configurations-to-your-securityyml)

To protect the api from public we need a firewall and a user provider:

```
security:
    firewalls:
        wsse_secured:
            pattern:   ^/mopa/update/api/.*
            wsse:
                nonce_dir: null
                lifetime: 300
                provider: in_memory # the user provider providing you user with the role ROLE_REMOTE_UPDATER
```

if you do not have any user providers or no chance to add the ROLE\_REMOTE\_UPDATER to your user add this too:

```
security:
    providers:
        in_memory:
            memory:
                users:
                    '%mopa_remote_update_user%':  { password: '%mopa_remote_update_password%', roles: 'ROLE_REMOTE_UPDATER' }
```

And in your parameters.yml:

```
parameters:
    mopa_remote_update_url: http://yourhost
    mopa_remote_update_user: changethis
    mopa_remote_update_password: changethat
```

### Step 4: Add the necessary configuration to your config.yml

[](#step-4-add-the-necessary-configuration-to-your-configyml)

Import the necessary configuration in your config.yml:

```
imports:
    - { resource: @MopaRemoteUpdateBundle/Resources/config/config.yml }
```

If you do not have a dbal connection in your project also include the sqlite config:

```
imports:
    - { resource: @MopaRemoteUpdateBundle/Resources/config/config.yml }
    - { resource: @MopaRemoteUpdateBundle/Resources/config/database.yml }
```

If you do not want to have this feature in your productive environment, just include all this in your config\_dev.yml just make sure dependencies are set correct, same for AppKernel and Bundles.

Setup your remotes in your config.yml:

```
mopa_remote_update:
    remotes:
        my_remote: # the alias to use on console, you can define as many remotes as you like
            url: %mopa_remote_update_url% # the url to your side might also be https
            username: %mopa_remote_update_user% # your username
            password: %mopa_remote_update_password% # your password
            preUpdate: git pull # optional: a command to run before composer updates the vendors, e.g. update your main application
            postUpdate: bin/post-composer.sh -w # optional: a command to run after composer updates
            updater: live # either live or cron see further down howto deal with cron
    composer: /usr/sbin/composer.phar # optional: sets the path to the composer binary if it cant be found
```

there is a usefule postUpdate packaged which has several features:

```
bin/post-composer.sh -h

```

To get a description

The bin/envvars.default has to be copied to bin/envvars and editied, to make app/cache and app/logs wirtable for webserver.

### Step 5: update/create the schema:

[](#step-5-updatecreate-the-schema)

```
app/console doctrine:schema:update  --force
```

### Step 6(Optional): configure cron updater:

[](#step-6optional-configure-cron-updater)

If you can not use the live updater, e.g. because your webserver does not have permissions to update the vendors, you can create a cronjob on the remote machine to execute the updates:

```
*/5   *   *   *  *    /path/to/your/app/console mopa:update:check # checks every 5 minutes if there is a new update job in queue

```

To log the output e.g. for debugging you could use:

```
*/5   *   *   *  *    /path/to/your/app/console mopa:update:check -v >> /path/to/your/app/logs/mopa_remote_update.log

```

### Step 7: commit your changes to your favorite vcs and setup your remote.

[](#step-7-commit-your-changes-to-your-favorite-vcs-and-setup-your-remote)

Now its time to push the same to your server and make sure everything is working as expected. You should also check the postUpdate command an composer are found.

To test the update you can use

```
app/console mopa:update:local my_remote
```

### Step 8(Optional): ignore MopaRemoteUpdateBundle bin files

[](#step-8optional-ignore-moparemoteupdatebundle-bin-files)

Optionally add this to your vcs ignore file (e.g. .gitignore):

```
# ignore MopaRemoteUpdateBundle bin files
bin/post-composer.sh
bin/envvars.default
app/Resources/remote_update.sqlite

```

###  Health Score

24

—

LowBetter than 31% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity17

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 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/3a1fd1e7045090ca677014a06fee68bb9cfd75d4286bb8d9da181b7d1d0db032?d=identicon)[phiamo](/maintainers/phiamo)

---

Top Contributors

[![phiamo](https://avatars.githubusercontent.com/u/207291?v=4)](https://github.com/phiamo "phiamo (45 commits)")

### Embed Badge

![Health badge](/badges/mopa-remote-update-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/mopa-remote-update-bundle/health.svg)](https://phpackages.com/packages/mopa-remote-update-bundle)
```

###  Alternatives

[spomky-labs/cbor-php

CBOR Encoder/Decoder for PHP

588.9M42](/packages/spomky-labs-cbor-php)

PHPackages © 2026

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