PHPackages                             samsonphp/composer - 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. samsonphp/composer

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

samsonphp/composer
==================

Create packages list

1.2.1(10y ago)47.3k[6 issues](https://github.com/SamsonPHP/composer/issues)1Open Software License (OSL) v 3.0PHP

Since Nov 29Pushed 9y ago2 watchersCompare

[ Source](https://github.com/SamsonPHP/composer)[ Packagist](https://packagist.org/packages/samsonphp/composer)[ Docs](http://samsonos.com/)[ RSS](/packages/samsonphp-composer/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (6)Dependencies (3)Versions (10)Used By (1)

\#[SamsonPHP](http://samsonphp.com/) - composer packages list generator

[![Latest Stable Version](https://camo.githubusercontent.com/4fe32b61dc76f5e7d457df5e3ef178df3921a6671d235fb154587d729cdbf0ba/68747470733a2f2f706f7365722e707567782e6f72672f73616d736f6e7068702f636f6d706f7365722f762f737461626c652e737667)](https://packagist.org/packages/samsonphp/composer)[![Build Status](https://camo.githubusercontent.com/de7e43337a75a759006acba48afd0cd45fdc5e4b7a821c1b377c09ec6c8471b4/68747470733a2f2f7472617669732d63692e6f72672f53616d736f6e5048502f636f6d706f7365722e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/SamsonPHP/composer)[![Code Coverage](https://camo.githubusercontent.com/7bbf92de81dca7a490cfcd2ea92fd100aaa06ea3da3bbcd5b6ce4cb2cab2dc08/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f73616d736f6e7068702f636f6d706f7365722f6261646765732f636f7665726167652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/samsonphp/composer/?branch=master)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/ec2dbd77162b4392176e50a38152ef220988db490029806bae5daa3a86d0d337/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f73616d736f6e7068702f636f6d706f7365722f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/samsonphp/composer/?branch=master)[![Stories in Ready](https://camo.githubusercontent.com/d6da83cbe3574ab80a37abee38d68c0960dcea449d3ed9e65a21bfc507c3476b/68747470733a2f2f62616467652e776166666c652e696f2f73616d736f6e7068702f636f6d706f7365722e706e673f6c6162656c3d7265616479267469746c653d5265616479)](https://waffle.io/samsonphp/composer)[![Total Downloads](https://camo.githubusercontent.com/41440ea70fd35f87d6af951e3b6f8a517fec204787c9f913e3716f8a6147cbfb/68747470733a2f2f706f7365722e707567782e6f72672f73616d736f6e7068702f636f6d706f7365722f646f776e6c6f6164732e737667)](https://packagist.org/packages/samsonphp/composer)

Module creates an ordered list of projects composer packages sorted by priority. Priority is automatically determined by the dependencies between packages, this dependecies usually located at `composer.json` in project root folder. If a package `package_A` requires package `package_B`, then package `package_B` priority is higher then package `package_A` priority.

This approach gives ability to build dependency tree from all composer loaded packages and represent it as a list. This is usefull when you tring to customly build package loading logic based on composer.

Usage
-----

[](#usage)

To work with this module you should get composer instance:

```
$composer = new \samsonos\composer\Composer();
```

Use following methods to configure module:

- `addVendor($vendor)` - Add available vendor (`$vendor` is the available vendor)
- `setIgnoreKey($ignoreKey)` - Set name of composer extra parameter to ignore package (`$ignoreKey` is name). Composer usage example:`"extra": { "samson_module_ignore": "1" }` (`$composer->setIgnoreKey('samson_module_ignore')`)
- `setIncludeKey($includeKey)` - Set name of composer extra parameter to include package (`$includeKey` is name). Composer usage example:`"extra": { "samson_module_include": "1" }` (`$composer->setIncludeKey('samson_module_include')`)
- `addIgnorePackage($package)` - Add ignored package (`$package` is the ignored package)

To create sorted list of project composer packages you can use method

```
$composer->create($systemPath, $lockFileName)
```

- `$systemPath` - Path to current web-application
- `$lockFileName` - Composer lock file name (by default is set to `'composer.lock'`)

Example usage:

```
$composer = new \samsonos\composer\Composer($systemPath);
$composerModules = $composer
    ->addVendor('samsonos')
    ->setIgnoreKey('samson_module_ignore')
    ->addIgnorePackage('samsonos/php_core')
    ->addIgnorePackage('samsonos/php_event')
    ->create();
```

Developed by [SamsonOS](http://samsonos.com/)

###  Health Score

29

—

LowBetter than 59% of packages

Maintenance0

Infrequent updates — may be unmaintained

Popularity22

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity69

Established project with proven stability

 Bus Factor1

Top contributor holds 85.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 ~60 days

Recently: every ~87 days

Total

9

Last Release

3707d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/0be8756efdc8f599b8fe9261bed31570d0f140a3b921f0f891877a9133ad654c?d=identicon)[samsonos](/maintainers/samsonos)

---

Top Contributors

[![nik-os](https://avatars.githubusercontent.com/u/7326967?v=4)](https://github.com/nik-os "nik-os (58 commits)")[![vitalyiegorov](https://avatars.githubusercontent.com/u/586558?v=4)](https://github.com/vitalyiegorov "vitalyiegorov (8 commits)")[![scrutinizer-auto-fixer](https://avatars.githubusercontent.com/u/6253494?v=4)](https://github.com/scrutinizer-auto-fixer "scrutinizer-auto-fixer (2 commits)")

---

Tags

composer

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/samsonphp-composer/health.svg)

```
[![Health](https://phpackages.com/badges/samsonphp-composer/health.svg)](https://phpackages.com/packages/samsonphp-composer)
```

###  Alternatives

[jean85/pretty-package-versions

A library to get pretty versions strings of installed dependencies

1.3k289.5M63](/packages/jean85-pretty-package-versions)[ergebnis/composer-normalize

Provides a composer plugin for normalizing composer.json.

1.1k37.3M2.1k](/packages/ergebnis-composer-normalize)[icanhazstring/composer-unused

Show unused packages by scanning your code

1.7k7.0M188](/packages/icanhazstring-composer-unused)[bamarni/composer-bin-plugin

No conflicts for your bin dependencies

52722.0M859](/packages/bamarni-composer-bin-plugin)[composer/metadata-minifier

Small utility library that handles metadata minification and expansion.

181115.0M13](/packages/composer-metadata-minifier)[shipmonk/composer-dependency-analyser

Fast detection of composer dependency issues (dead dependencies, shadow dependencies, misplaced dependencies)

6076.7M435](/packages/shipmonk-composer-dependency-analyser)

PHPackages © 2026

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