PHPackages                             symplify/package-scoper - 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. symplify/package-scoper

Abandoned → [humbug/php-scoper](/?search=humbug%2Fphp-scoper)ArchivedLibrary[Utility &amp; Helpers](/categories/utility)

symplify/package-scoper
=======================

Scope package in unique namespace to prevent composer install conflicts - with 1 click

v9.3.1(5y ago)1529MITPHPPHP &gt;=7.3

Since Nov 14Pushed 5y ago1 watchersCompare

[ Source](https://github.com/deprecated-packages/package-scoper)[ Packagist](https://packagist.org/packages/symplify/package-scoper)[ Fund](https://www.paypal.me/rectorphp)[ GitHub Sponsors](https://github.com/tomasvotruba)[ RSS](/packages/symplify-package-scoper/feed)WikiDiscussions main Synced 4d ago

READMEChangelogDependencies (6)Versions (99)Used By (0)

Package Scoper
==============

[](#package-scoper)

[![Downloads total](https://camo.githubusercontent.com/18f55a3aaaaa48bd1ddcd82f02159d92b0dd59a65e38c72b238f92ec02c5bf59/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f73796d706c6966792f7061636b6167652d73636f7065722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/symplify/package-scoper/stats)

- Does your package require Symfony 5, but developers want to use it on Symfony 3?
- Do you want to scope your package dependencies with unique namespace, but don't know how?
- Do you want to skip learning of PhpScoper, PHAR packing, Box and GitHub Actions automated deploy?

You're in the right place!

Install
-------

[](#install)

```
composer require symplify/package-scoper symplify/monorepo-builder --dev
```

We also need `symplify/monorepo-builder`, so we can work with relative paths of local packages.

Usage
-----

[](#usage)

### 1. Generate php-scoper Config

[](#1-generate-php-scoper-config)

[php-scoper](https://github.com/humbug/php-scoper) is a package that prefixes classes and functions, so they're unique and don't conflict with same-named class in a different version. You can read [the documentation](https://github.com/humbug/php-scoper), or you can generate the config with sane defaults:

```
vendor/bin/package-scoper generate-php-scoper
```

It will create `scoper.inc.php` right in the root of the package. That's the best location, because php-scoper works with path relative to its location.

### 2. Scope Composer Json

[](#2-scope-composer-json)

Scoping PHP code with [php-scoper](https://github.com/humbug/php-scoper/) is just the first step. The second is making a `composer.json` with a different name than the original package. We got you covered! The following command will:

- update package name to `-prefixed`
- keep PHP version in `require` section, license and bin files
- drop the rest

It must be run on the scoped package `composer.json`, not the original one:

```
vendor/bin/package-scoper scope-composer-json

vendor/bin/package-scoper scope-composer-json packages-scoped/some-package/composer.json
```

### 3. Generate GitHub Action Workflow

[](#3-generate-github-action-workflow)

The process without automatization would not be much helpful. That's why we have GitHub Action to automate it.

```
vendor/bin/package-scoper generate-workflow
```

Go to your `.github/workflows` folder, update packages names manually and you're ready to go.

### Convention over Configuration in GitHub Action

[](#convention-over-configuration-in-github-action)

In the GitHub Workflow you only define package names. To make the whole process work, the `` must be used in:

1. directory name

```
/package/
```

2. binary file name:

```
/package//bin/
```

As the file is defined in the `composer.json`:

```
{
    "bin": [
        "bin/"
    ]
}
```

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity65

Established project with proven stability

 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.

###  Release Activity

Cadence

Every ~1 days

Total

98

Last Release

1837d ago

Major Versions

8.3.48 → 9.0.0-BETA12020-11-14

PHP version history (2 changes)9.0.0-BETA2PHP &gt;=7.2

9.0.0-rc1PHP &gt;=7.3

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/924196?v=4)[Tomas Votruba](/maintainers/TomasVotruba)[@TomasVotruba](https://github.com/TomasVotruba)

---

Top Contributors

[![TomasVotruba](https://avatars.githubusercontent.com/u/924196?v=4)](https://github.com/TomasVotruba "TomasVotruba (5 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/symplify-package-scoper/health.svg)

```
[![Health](https://phpackages.com/badges/symplify-package-scoper/health.svg)](https://phpackages.com/packages/symplify-package-scoper)
```

###  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)[symplify/monorepo-builder

Not only Composer tools to build a Monorepo.

5205.3M82](/packages/symplify-monorepo-builder)[netgen/layouts-core

Netgen Layouts enables you to build and manage complex web pages in a simpler way and with less coding. This is the core of Netgen Layouts, its heart and soul.

3689.4k10](/packages/netgen-layouts-core)[netgen/content-browser

Netgen Content Browser is a Symfony bundle that provides an interface which selects items from any kind of backend and returns the IDs of selected items back to the calling code.

14112.1k8](/packages/netgen-content-browser)

PHPackages © 2026

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