PHPackages                             consolidation/site-process - 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. consolidation/site-process

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

consolidation/site-process
==========================

A thin wrapper around the Symfony Process Component that allows applications to use the Site Alias library to specify the target for a remote call.

6.0.0(6mo ago)5345.3M—3.6%21[6 issues](https://github.com/consolidation/site-process/issues)[2 PRs](https://github.com/consolidation/site-process/pulls)7MITPHPPHP &gt;=8.2CI passing

Since Oct 24Pushed 1mo ago3 watchersCompare

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

READMEChangelog (10)Dependencies (6)Versions (93)Used By (7)

Site Process
============

[](#site-process)

A thin wrapper around the Symfony Process Component that allows applications to use the Site Alias library to specify the target for a remote call.

[![ci](https://github.com/consolidation/site-process/workflows/CI/badge.svg)](https://travis-ci.org/consolidation/site-process)[![scrutinizer](https://camo.githubusercontent.com/f2a5a4a3c62367cc4f146e773eb8e516ffb5779831412b412db042a0b0aa5351/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f636f6e736f6c69646174696f6e2f736974652d70726f636573732f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/consolidation/site-process/?branch=master)[![codecov](https://camo.githubusercontent.com/fde2d91ab80c29e4e225b011fd08dbabcad98e9283a18600daed4c09207b58a6/68747470733a2f2f636f6465636f762e696f2f67682f636f6e736f6c69646174696f6e2f736974652d70726f636573732f6272616e63682f6d61696e2f67726170682f62616467652e7376673f746f6b656e3d43416142376f66687878)](https://codecov.io/gh/consolidation/site-process)[![License](https://camo.githubusercontent.com/48ec640df7aa98ffef21cc458ad62f485e8c6afaab5ab4da8d13d84e1cd7779e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d3430383637372e737667)](LICENSE)

Overview
--------

[](#overview)

Site Process is a thin wrapper around the [Symfony Process Component](https://symfony.com/doc/3.4/components/process) that allows applications to use the [Site Alias library](https://github.com/consolidation/site-alias) to specify the target for a remote call.

For comparison purposes, the `Process` object may be created to run an application on the local system using the standard Symfony Process Component API like so:

```
$process = new Process(['ls', '-lsa']);

```

Similarly, a remote call can be done using the general-purpose `SiteProcess` API, which is accessible via the ProcessManager object:

```
$processManager = ProcessManager::createDefault();
$process = $processManager->siteProcess($site_alias, ['ls', '-lsa', '{root}']);

```

In this example, if `$site_alias` represents a site on the same system, then the `ls -lsa` command will run locally. If, on the other hand, it represents a remote site, then the `ls -lsa` command will be wrapped in an ssh call to the remote system. In either case, the `{root}` reference will be replaced with the value of the attribute of the site alias named `root`. An exception will be thrown if the named attribute does not exist.

Options may also be specified as an associative array provided as a third parameter:

```
$process = $processManager->siteProcess($site_alias, ['git', 'status'], ['untracked-files' => 'no']);

```

This is equivalent to:

```
$process = $processManager->siteProcess($site_alias, ['git', '--untracked-files=no', 'status']);

```

### Transports

[](#transports)

#### SSH

[](#ssh)

Wraps a command so that it runs on a remote system via the ssh cli.

Example:

```
local:
  host: localhost
  uri: http://localhost
  ssh:
    options: -o PasswordAuthentication=no -i $HOME/.ssh/id_rsa
```

### Vagrant

[](#vagrant)

Wraps commands so they run with `vagrant ssh -c`.

Example:

```
local:
  uri: http://localhost
  vagrant:
```

#### Docker Compose

[](#docker-compose)

Wraps a command so that it runs on a remote system via docker-compose.

Example:

```
local:
  host: localhost
  uri: http://localhost
  docker:
    service: drupal
    compose:
      version: 1
      options: --project dockerComposeProjectName --file docker-compose.yml --project-directory dockerComposeWorkDir
    exec:
      options: --user www-data
```

The above would execute commands prefixed with:

```
docker-compose --project dockerComposeProjectName --file docker-compose.yml --project-directory dockerComposeWorkDir exec --user www-data -T drupal

```

`docker.project` and `compose.options --project` do the same thing, docker.project existed before options.

`docker.service` is the exact name of the service as it appears in docker-compose.yml

`docker.compose.version` defaults to `1`. Set to `2` to use the new syntax:

```
docker compose --project dockerComposeProjectName --file docker-compose.yml --project-directory dockerComposeWorkDir exec --user www-data -T drupal

```

The default behaviour is to use `docker-compose exec` to invoke a command on a running container. You can change this to use `docker-compose run` for containers which by default are not running, with the property `compose.command`.

Check the [docker-compose](https://docs.docker.com/compose/reference/overview/) manual for all available options.

#### Local

[](#local)

Runs the command on the local system.

Running the tests
-----------------

[](#running-the-tests)

The test suite may be run locally by way of some simple composer scripts:

TestCommandRun all tests`composer test`PHPUnit tests`composer unit`PHP linter`composer lint`Code style`composer cs`Fix style errors`composer cbf`Deployment
----------

[](#deployment)

- Run `composer release`

Contributing
------------

[](#contributing)

Please read [CONTRIBUTING.md](CONTRIBUTING.md) for details on the process for submitting pull requests to us.

Versioning
----------

[](#versioning)

We use [SemVer](http://semver.org/) for versioning. For the versions available, see the [releases](https://github.com/consolidation/site-process/releases) page.

BranchSymfony VersionsPHP Versionsmain (5.x)^5^64.x^47.1+2.x^2^3Note that all 3.x releases of consolidation/site-process were skipped simply to align the 4.x versions with Symfony 4.x support.

Note that the API of consolidation/site-process itself is compatible between the 2.x and 4.x versions, so most clients that work with both Symfony 3 and Symfony 4 should be able to require `"consolidation/site-process": "^2 | ^4"` without problems.

Authors
-------

[](#authors)

- [Greg Anderson](https://github.com/greg-1-anderson)
- [Moshe Weitzman](http://weitzman.github.com)

See also the list of [contributors](https://github.com/consolidation/site-process/contributors) who participated in this project.

License
-------

[](#license)

This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details

Acknowledgments
---------------

[](#acknowledgments)

- Thanks to PurpleBooth for the [example README template](https://gist.github.com/PurpleBooth/109311bb0361f32d87a2)

###  Health Score

71

—

ExcellentBetter than 100% of packages

Maintenance78

Regular maintenance activity

Popularity64

Solid adoption and visibility

Community32

Small or concentrated contributor base

Maturity90

Battle-tested with a long release history

 Bus Factor1

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

Every ~46 days

Recently: every ~173 days

Total

57

Last Release

185d ago

Major Versions

2.x-dev → 4.0.0-alpha12019-09-13

4.2.0 → 5.0.02022-02-19

4.2.1 → 5.2.02022-12-06

4.x-dev → 5.3.02024-04-01

5.4.2 → 6.0.02025-11-14

PHP version history (4 changes)0.1.0PHP &gt;=5.6.0

4.0.0-alpha1PHP &gt;=7.1.3

5.0.0PHP &gt;=8.0.14

6.0.0PHP &gt;=8.2

### Community

Maintainers

![](https://www.gravatar.com/avatar/b34cc6bd882277b6c6dda19bf6631ae5c3a909fd667c826a15121642cdc051b2?d=identicon)[greg.1.anderson](/maintainers/greg.1.anderson)

---

Top Contributors

[![greg-1-anderson](https://avatars.githubusercontent.com/u/612191?v=4)](https://github.com/greg-1-anderson "greg-1-anderson (153 commits)")[![weitzman](https://avatars.githubusercontent.com/u/7740?v=4)](https://github.com/weitzman "weitzman (48 commits)")[![ceesgeene](https://avatars.githubusercontent.com/u/10079586?v=4)](https://github.com/ceesgeene "ceesgeene (3 commits)")[![andypost](https://avatars.githubusercontent.com/u/73713?v=4)](https://github.com/andypost "andypost (2 commits)")[![danepowell](https://avatars.githubusercontent.com/u/1984514?v=4)](https://github.com/danepowell "danepowell (2 commits)")[![alexxed](https://avatars.githubusercontent.com/u/2104927?v=4)](https://github.com/alexxed "alexxed (2 commits)")[![ms-slasher13](https://avatars.githubusercontent.com/u/530418?v=4)](https://github.com/ms-slasher13 "ms-slasher13 (2 commits)")[![fuzzbomb](https://avatars.githubusercontent.com/u/1243005?v=4)](https://github.com/fuzzbomb "fuzzbomb (1 commits)")[![geek-merlin](https://avatars.githubusercontent.com/u/15613398?v=4)](https://github.com/geek-merlin "geek-merlin (1 commits)")[![hkorik](https://avatars.githubusercontent.com/u/4753855?v=4)](https://github.com/hkorik "hkorik (1 commits)")[![manarth](https://avatars.githubusercontent.com/u/271171?v=4)](https://github.com/manarth "manarth (1 commits)")[![rudolfbyker](https://avatars.githubusercontent.com/u/10025342?v=4)](https://github.com/rudolfbyker "rudolfbyker (1 commits)")[![emersonreisdev](https://avatars.githubusercontent.com/u/10074819?v=4)](https://github.com/emersonreisdev "emersonreisdev (1 commits)")[![andeersg](https://avatars.githubusercontent.com/u/2273311?v=4)](https://github.com/andeersg "andeersg (1 commits)")[![Chi-teck](https://avatars.githubusercontent.com/u/673139?v=4)](https://github.com/Chi-teck "Chi-teck (1 commits)")[![DieterHolvoet](https://avatars.githubusercontent.com/u/3606531?v=4)](https://github.com/DieterHolvoet "DieterHolvoet (1 commits)")[![edwinknl](https://avatars.githubusercontent.com/u/43782913?v=4)](https://github.com/edwinknl "edwinknl (1 commits)")[![alexpott](https://avatars.githubusercontent.com/u/769634?v=4)](https://github.com/alexpott "alexpott (1 commits)")[![fubarhouse](https://avatars.githubusercontent.com/u/3070264?v=4)](https://github.com/fubarhouse "fubarhouse (1 commits)")

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/consolidation-site-process/health.svg)

```
[![Health](https://phpackages.com/badges/consolidation-site-process/health.svg)](https://phpackages.com/packages/consolidation-site-process)
```

###  Alternatives

[symfony/maker-bundle

Symfony Maker helps you create empty commands, controllers, form classes, tests and more so you can forget about writing boilerplate code.

3.4k111.1M568](/packages/symfony-maker-bundle)[consolidation/robo

Modern task runner

2.7k62.9M410](/packages/consolidation-robo)[symplify/monorepo-builder

Not only Composer tools to build a Monorepo.

5205.3M82](/packages/symplify-monorepo-builder)[shlinkio/shlink

A self-hosted and PHP-based URL shortener application with CLI and REST interfaces

4.8k4.3k](/packages/shlinkio-shlink)[shivas/versioning-bundle

Symfony application versioning, simple console command to manage version (with providers e.g. git tag) of your application using Semantic Versioning 2.0.0 recommendations

1121.2M1](/packages/shivas-versioning-bundle)[overtrue/php-opencc

中文简繁转换，支持词汇级别的转换、异体字转换和地区习惯用词转换（中国大陆、台湾、香港、日本新字体）。基于 \[BYVoid/OpenCC\](https://github.com/BYVoid/OpenCC) 数据实现。

12130.7k](/packages/overtrue-php-opencc)

PHPackages © 2026

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