PHPackages                             wyrihaximus/get-in-packages-composer.jason - 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. wyrihaximus/get-in-packages-composer.jason

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

wyrihaximus/get-in-packages-composer.jason
==========================================

Functions around joshdifabio/composed and igorw/get-in to gather configuration from composer.json

2.3.0(8mo ago)1136.1k↑2570.8%1[1 issues](https://github.com/WyriHaximus/php-get-in-packages-composer.json/issues)[1 PRs](https://github.com/WyriHaximus/php-get-in-packages-composer.json/pulls)1MITMakefilePHP ^8.4CI failing

Since Jun 19Pushed 1w ago1 watchersCompare

[ Source](https://github.com/WyriHaximus/php-get-in-packages-composer.json)[ Packagist](https://packagist.org/packages/wyrihaximus/get-in-packages-composer.jason)[ GitHub Sponsors](https://github.com/WyriHaximus)[ RSS](/packages/wyrihaximus-get-in-packages-composerjason/feed)WikiDiscussions master Synced 3d ago

READMEChangelog (8)Dependencies (4)Versions (18)Used By (1)

Get In Packages' composer.json
==============================

[](#get-in-packages-composerjson)

[![Build Status](https://camo.githubusercontent.com/94c3d531e4045b1b9a094632c01407e25bf46dad608238a1cb1833df5ef731d6/68747470733a2f2f7472617669732d63692e6f72672f57797269486178696d75732f7068702d6765742d696e2d7061636b616765732d636f6d706f7365722e6a61736f6e2e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/WyriHaximus/php-get-in-packages-composer.jason)[![Latest Stable Version](https://camo.githubusercontent.com/ff5070767dc4f909aff6c9040004aeb9d32a60b523f9dc56ed09b337de4d4287/68747470733a2f2f706f7365722e707567782e6f72672f77797269686178696d75732f6765742d696e2d7061636b616765732d636f6d706f7365722e6a61736f6e2f762f737461626c652e706e67)](https://packagist.org/packages/wyrihaximus/get-in-packages-composer.jason)[![Total Downloads](https://camo.githubusercontent.com/72e059b518888aedb1285bdec707e1c0cefab5b700653de51d7c2274ca2a31a0/68747470733a2f2f706f7365722e707567782e6f72672f77797269686178696d75732f6765742d696e2d7061636b616765732d636f6d706f7365722e6a61736f6e2f646f776e6c6f6164732e706e67)](https://packagist.org/packages/wyrihaximus/get-in-packages-composer.jason/stats)[![Code Coverage](https://camo.githubusercontent.com/6ede4647b914cc407f04e59b1d049919c4f57325b3acf39463ebe8cae4f88bab/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f57797269486178696d75732f7068702d6765742d696e2d7061636b616765732d636f6d706f7365722e6a61736f6e2f6261646765732f636f7665726167652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/WyriHaximus/php-get-in-packages-composer.jason/?branch=master)[![License](https://camo.githubusercontent.com/f13c422a12c0bd399361274a36a1662eb77b6e42aa88d7f78ca318b33bf8deb2/68747470733a2f2f706f7365722e707567782e6f72672f77797269686178696d75732f6765742d696e2d7061636b616765732d636f6d706f7365722e6a61736f6e2f6c6963656e73652e706e67)](https://packagist.org/packages/wyrihaximus/get-in-packages-composer.jason)[![PHP 7 ready](https://camo.githubusercontent.com/08c46d269002473528ea501834233c36a8b002c228e326ba0147ad9cfa73998c/687474703a2f2f7068703772656164792e74696d6573706c696e7465722e63682f57797269486178696d75732f7068702d6765742d696e2d7061636b616765732d636f6d706f7365722e6a61736f6e2f62616467652e737667)](https://appveyor-ci.org/WyriHaximus/php-get-in-packages-composer.jason)

Installation
============

[](#installation)

To install via [Composer](http://getcomposer.org/), use the command below, it will automatically detect the latest version and bind it with `^`.

```
composer require wyrihaximus/get-in-packages-composer.jason

```

Functions
=========

[](#functions)

The following examples are made with the following `composer.json` in mind:

```
{
    "extra": {
        "react-inspector": {
            "metrics": [
                "ticks.future.current",
                "ticks.future.total",
                "ticks.future.ticks",
                "signals.current",
                "signals.total",
                "signals.ticks"
            ],
            "reset": {
                "ticks": [
                    "ticks.future.ticks",
                    "signals.ticks"
                ]
            }
        },
        "reactive-apps": {
            "command": {
                "ReactiveApps\\Command\\HttpServer\\Command": "src/Command"
            },
            "config": [
                "etc/config/app.php",
                "etc/config/http-server.php",
                "etc/config/supervisor.php"
            ]
        }
    }
}
```

GetInPackages::composer
-----------------------

[](#getinpackagescomposer)

Get the config for the given key for all packages that have it. Passed the Package instance as key and config from `composer.json` as value:

```
/**
 * @var Composed\Package $package
 * @var mixed            $config
 */
foreach (GetInPackages::composer('extra') as $package => $config) {
    $packagesConfig->add($package, $config);
}
```

GetInPackages::fromComposer
---------------------------

[](#getinpackagesfromcomposer)

Same as `GetInPackages::composer` but `yield from`'s the items in each package:

```
foreach (GetInPackages::fromComposer('extra.react-inspector.metrics') as $item) {
    // $item: [
    // ticks.future.current,
    // ticks.future.total,
    // ticks.future.ticks,
    // signals.current,
    // signals.total,
    // signals.ticks,
    // ]
}
```

GetInPackages::composerPath
---------------------------

[](#getinpackagescomposerpath)

Building on `GetInPackages::composer`, `GetInPackages::composer_path` iterates over all the config items per package coming back from `GetInPackages::composer` and gets the full path for the given items value. This is handy for example configuration autodiscovery:

```
foreach (GetInPackages::composerPath('extra.reactive-apps.config') as $path) {
    $config->loadFromFile($path);
}
```

GetInPackages::composerWithPath
-------------------------------

[](#getinpackagescomposerwithpath)

Works the same as `GetInPackages::composer_path` but instead of down a full path per item it uses that full path for the item as key and the items key and value. Handy for scanning a file directory and having the namespace for the root present:

```
foreach (GetInPackages::composerWithPath('extra.reactive-apps.command') as $path => $namespacePrefix) {
    $commands->scan($path, $namespacePrefix);
}
```

License
=======

[](#license)

The MIT License (MIT)

Copyright (c) 2025 Cees-Jan Kiewiet

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

###  Health Score

55

—

FairBetter than 97% of packages

Maintenance61

Regular maintenance activity

Popularity36

Limited adoption so far

Community16

Small or concentrated contributor base

Maturity89

Battle-tested with a long release history

 Bus Factor1

Top contributor holds 63.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 ~382 days

Recently: every ~340 days

Total

8

Last Release

264d ago

Major Versions

1.1.0 → 2.0.02022-01-22

PHP version history (5 changes)1.0.0PHP ^7.2

1.1.0PHP ^8 || ^7.4

2.0.0PHP ^8

2.1.0PHP ^8.3

2.3.0PHP ^8.4

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/147145?v=4)[Cees-Jan Kiewiet](/maintainers/WyriHaximus)[@WyriHaximus](https://github.com/WyriHaximus)

---

Top Contributors

[![WyriHaximus](https://avatars.githubusercontent.com/u/147145?v=4)](https://github.com/WyriHaximus "WyriHaximus (62 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (13 commits)")[![dependabot-support](https://avatars.githubusercontent.com/u/112581971?v=4)](https://github.com/dependabot-support "dependabot-support (13 commits)")[![renovate-runner[bot]](https://avatars.githubusercontent.com/u/147145?v=4)](https://github.com/renovate-runner[bot] "renovate-runner[bot] (9 commits)")[![renovate[bot]](https://avatars.githubusercontent.com/in/2740?v=4)](https://github.com/renovate[bot] "renovate[bot] (1 commits)")

---

Tags

hacktoberfest

### Embed Badge

![Health badge](/badges/wyrihaximus-get-in-packages-composerjason/health.svg)

```
[![Health](https://phpackages.com/badges/wyrihaximus-get-in-packages-composerjason/health.svg)](https://phpackages.com/packages/wyrihaximus-get-in-packages-composerjason)
```

###  Alternatives

[roave/backward-compatibility-check

Tool to compare two revisions of a public API to check for BC breaks

6003.7M103](/packages/roave-backward-compatibility-check)[brianhenryie/strauss

Prefixes dependencies namespaces so they are unique to your plugin

190438.1k37](/packages/brianhenryie-strauss)[october/rain

October Rain Library

1601.7M83](/packages/october-rain)[shopware/core

Shopware platform is the core for all Shopware ecommerce products.

585.6M576](/packages/shopware-core)[dominikb/composer-license-checker

Utility to check for licenses of dependencies and block/allow them.

574.6M14](/packages/dominikb-composer-license-checker)[jolicode/castor

A lightweight and modern task runner. Automate everything. In PHP.

54743.1k4](/packages/jolicode-castor)

PHPackages © 2026

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