PHPackages                             cpsit/setup-helper - 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. cpsit/setup-helper

ActiveComposer-plugin[Utility &amp; Helpers](/categories/utility)

cpsit/setup-helper
==================

Helps setting up a project bundle. This is a composer plugin. It performs predefined tasks on composer after update or install command.

2.0.0(5y ago)12.3k1[3 issues](https://github.com/CPS-IT/setup-helper/issues)GPL-2.0-or-laterPHPPHP ^7.3 || ^8.0CI failing

Since Feb 15Pushed 3y ago6 watchersCompare

[ Source](https://github.com/CPS-IT/setup-helper)[ Packagist](https://packagist.org/packages/cpsit/setup-helper)[ RSS](/packages/cpsit-setup-helper/feed)WikiDiscussions master Synced 2d ago

READMEChangelogDependencies (8)Versions (18)Used By (0)

[![Build Status](https://camo.githubusercontent.com/31a5db89942ef178119dbacab005db800072a2f1ee93f5f7ebfc4d8e39b38105/68747470733a2f2f7472617669732d63692e6f72672f4350532d49542f73657475702d68656c7065722e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/CPS-IT/setup-helper)[![Quality Gate Status](https://camo.githubusercontent.com/5cb88f0f95895ce96717b9a4e4317ad26a0d6fda5c48a87b186f36e52fca2125/68747470733a2f2f736f6e6172636c6f75642e696f2f6170692f70726f6a6563745f6261646765732f6d6561737572653f70726f6a6563743d4350532d49545f73657475702d68656c706572266d65747269633d616c6572745f737461747573)](https://sonarcloud.io/dashboard?id=CPS-IT_setup-helper)

Setup Helper
============

[](#setup-helper)

Helps setting up project bundles based on configuration and templates.

This is a composer plugin. It performs predefined tasks on composer after `update` or `install` command.

### Usage

[](#usage)

```
composer require cpsit/setup-helper
```

### Configuration

[](#configuration)

Add a key `setup-helper` to to the `extra` section of your `composer.json`. **Note**: Paths must be relative to your composer root directory or absolute.

#### Copy files or folder

[](#copy-files-or-folder)

```
{
  "extra": {
    "setup-helper": [
      {
        "copy": {
          "path/to/file/or/folder": "path/to/target",
          "other/file": "other/target"
        }
      }
    ]
  }
}
```

#### Unlink files or folders

[](#unlink-files-or-folders)

```
{
  "extra": {
    "setup-helper": [
      {
        "unlink": [
          "path/to/file/or/folder",
          "other file"
        ]
      }
    ]
  }
}
```

- there is **no confirmation request**. Any existing file or folder will be removed!

#### Move files or folders

[](#move-files-or-folders)

```
{
  "extra": {
    "setup-helper": [
      {
        "move": {
          "path/to/old/file/or/folder": "path/to/new/folder",
          "other/file": "new/path"
        }
      }
    ]
  }
}
```

**Note**: *Move* does not rename a file or folder. If required combine it with a *Rename* task.

#### Rename files or folders

[](#rename-files-or-folders)

```
{
  "extra": {
    "setup-helper": [
      {
        "rename": {
          "path/to/old/file/or/folder": "newName",
          "other/file": "otherName"
        }
      }
    ]
  }
}
```

The source path is relative to the current working directory. This should always be the composer root directory, if the Installer is called via composer plugin API as expected.

#### Make directory

[](#make-directory)

```
{
  "extra": {
    "setup-helper": [
      {
        "makeDirectory": [
          "path/to/new/folder"
        ]
      }
    ]
  }
}
```

The directory path is relative to the current working directory. This should always be the composer root directory, if the Installer is called via composer plugin API as expected. Any missing directory will be created recursively.

#### Symlink from source to target

[](#symlink-from-source-to-target)

```
{
  "extra": {
    "setup-helper": [
      {
        "symlink": {
          "path/to/source/file": "target",
          "file": "even/deeper/path/to/target"
        }
      }
    ]
  }
}
```

The source path is relative to the current working directory. This should always be the composer root directory, if the Installer is called via composer plugin API as expected. On existing source or target no symlink is created.

#### Replace

[](#replace)

- Replace a string with another string:

```
{
  "extra": {
    "setup-helper": [
      {
        "replace": [
          {
            "path": "path/to/file",
            "search": "string-to-replace",
            "replace": "replacement string"
           }
        ]
      }
    ]
  }
}
```

- Replace a string with a string given as answer to a question (interactively)

```
{
  "extra": {
    "setup-helper": [
      {
        "replace": [
           {
             "path": "path/to/file",
             "search": "string-or-pattern-to-replace",
             "ask": "Question to ask for (Answer replaces pattern)"
           }
        ]
      }
    ]
  }
}
```

The `path` key respects Ant-like globbing.

Syntax:

- `?` matches any character
- `*` matches zero or more characters, except `/`
- `/**/` matches zero or more directory names
- `[abc]` matches a single character `a`, `b` or `c`
- `[a-c]` matches a single character `a`, `b` or `c`
- `[^abc]` matches any character but `a`, `b` or `c`
- `[^a-c]` matches any character but `a`, `b` or `c`
- `{ab,cd}` matches `ab` or `cd`

E.g. `"path": /path/to/dir/*.css` will select all files ending in `.css` in that directory.

See documentation of [glob library](https://github.com/webmozart/glob) for details.

### Caveats

[](#caveats)

Currently we rely on a the fork [cpsit/glob](https://github.com/CPS-IT/glob) of `webmozart/glob` since the original doesn't allow recent PHP versions.

###  Health Score

29

—

LowBetter than 57% of packages

Maintenance0

Infrequent updates — may be unmaintained

Popularity18

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity74

Established project with proven stability

 Bus Factor1

Top contributor holds 94.9% 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 ~65 days

Recently: every ~203 days

Total

14

Last Release

1845d ago

Major Versions

0.7.0 → 1.0.02019-03-22

1.2.0 → 2.0.02021-06-10

PHP version history (3 changes)0.1.0PHP &gt;=7.0.0 &lt;7.3.0

1.2.0PHP &gt;=7.1.0 &lt;=7.3.0

2.0.0PHP ^7.3 || ^8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/d475c20d671c5a196b3982ec3576ef36a8b2b557c88ded4f666a69c6c1a5aa50?d=identicon)[dwenzel](/maintainers/dwenzel)

---

Top Contributors

[![dwenzel](https://avatars.githubusercontent.com/u/712458?v=4)](https://github.com/dwenzel "dwenzel (130 commits)")[![mspfr](https://avatars.githubusercontent.com/u/48488093?v=4)](https://github.com/mspfr "mspfr (7 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/cpsit-setup-helper/health.svg)

```
[![Health](https://phpackages.com/badges/cpsit-setup-helper/health.svg)](https://phpackages.com/packages/cpsit-setup-helper)
```

###  Alternatives

[aws/aws-sdk-php

AWS SDK for PHP - Use Amazon Web Services in your PHP project

6.2k532.1M2.5k](/packages/aws-aws-sdk-php)[symfony/runtime

Enables decoupling PHP applications from global state

74794.9M939](/packages/symfony-runtime)[phpactor/phpactor

PHP refactoring and intellisense tool for text editors

1.9k16.6k1](/packages/phpactor-phpactor)[symfony/asset-mapper

Maps directories of assets &amp; makes them available in a public directory with versioned filenames.

1668.1M217](/packages/symfony-asset-mapper)[pocketmine/pocketmine-mp

A server software for Minecraft: Bedrock Edition written in PHP

3.5k77.4k89](/packages/pocketmine-pocketmine-mp)[friendsoftypo3/content-blocks

TYPO3 CMS Content Blocks - Content Types API | Define reusable components via YAML

101466.4k45](/packages/friendsoftypo3-content-blocks)

PHPackages © 2026

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