PHPackages                             oat-sa/tao-dependency-resolver - 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. oat-sa/tao-dependency-resolver

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

oat-sa/tao-dependency-resolver
==============================

Resolves TAO extensions dependencies

0.1.0(7y ago)23[2 PRs](https://github.com/oat-sa/tao-dependency-resolver/pulls)proprietaryPHPPHP ^7.1.3

Since Apr 12Pushed 2y ago42 watchersCompare

[ Source](https://github.com/oat-sa/tao-dependency-resolver)[ Packagist](https://packagist.org/packages/oat-sa/tao-dependency-resolver)[ RSS](/packages/oat-sa-tao-dependency-resolver/feed)WikiDiscussions master Synced 2d ago

READMEChangelog (3)Dependencies (17)Versions (6)Used By (0)

Tao dependency resolver
=======================

[](#tao-dependency-resolver)

Resolves the dependency requirement tree from manifest.php in each extension needed.

Default result is to displays a corresponding composer.json `require` array. If you need to write this to a file, just redirect the standard output.

Now works with both **extension** names and **repository** names.

A more extensive explanation of the problematics and solutions is exposed in the [documentation](doc/dependency-resolver.md).

Installation
------------

[](#installation)

Clone this repository.

Install dependencies :

```
$ composer install

```

Minimal PHP version required: 7.1

PHP extensions required: php7.1-xml, php7.1-mbstring

Authentication
--------------

[](#authentication)

Create a `.env` file in the root directory with your github token and organization name (you can copy and populate the existing .env.dist template file). You need to provide a valid [GitHub token](https://github.com/settings/tokens) with "repo" access rights.

The tools
---------

[](#the-tools)

There are two tools in this repository:

### Dependency resolver

[](#dependency-resolver)

Read more about this tool [here](doc/dependency-resolver.md).

```
$ php bin/console oat:dependencies:resolve [--repository-name  | --extension-name ] [--main-branch ] [--dependency-branches ] [--repositories] [--file ]

```

- `main repository name`: repository name, e.g. "oat-sa/extension-tao-testqti" of the repository to resolve.
- `main extension name`: "manifest name", e.g. "taoQtiTest" of the extension to resolve.
- `main repository branch`: the branch of the extension to be resolved.
- `dependency branches`: desired branches to download include for each dependency. In the form of "extensionName1:branchName1,extensionName2:branchName2,...", e.g. "tao:develop,taoQtiItem:fix/tao-1234,generis:10.12.14". Branches for all non given extensions will default to "develop".
- `repositories`: flag to indicate that composer repositories information must be included. In case of private repositories, ssh authentication must be set up to use the generated composer.json file.
- `file`: when given, the command will generate the composer.json into this file along the stdout. The target need to be writeable, and can be either a relative or absolute path. For instance, `--file output/composer.json` will generate the composer.json in the `output` directory (within the current working directory).

Only one of the two options `repository-name` and `extension-name` must be provided.

#### Usage examples

[](#usage-examples)

Resolve dependencies for repository `oat-sa/extension-tao-items` with no branch specified (defaults to `develop`) and write the result to `/dest/dir/composer.json` with verbose output:

```
php bin/console oat:dependencies:resolve --repository-name oat-sa/extension-tao-items > /dest/dir/composer.json -vv

```

Will display the following in the console:

```
app.INFO: Resolving dependencies for repository "oat-sa/extension-tao-item".
app.INFO: Retrieving oat-sa/extension-tao-item/develop/manifest.php
app.INFO: Resolving dependencies for repository "oat-sa/extension-tao-backoffice".
app.INFO: Retrieving oat-sa/extension-tao-backoffice/develop/manifest.php
app.INFO: Resolving dependencies for repository "oat-sa/tao-core".
app.INFO: Retrieving oat-sa/tao-core/develop/manifest.php
app.INFO: Resolving dependencies for repository "oat-sa/generis".
app.INFO: Retrieving oat-sa/generis/develop/manifest.php

```

And write the following to `/dest/dir/composer.json`:

```
{
    "require": {
        "oat-sa/extension-tao-item": "dev-develop",
        "oat-sa/extension-tao-backoffice": "dev-develop",
        "oat-sa/tao-core": "dev-develop",
        "oat-sa/generis": "dev-develop"
    }
}

```

Resolve dependencies for extension `taoQtiTest` with main branch feature/tao-1234, branch feature/tao-1234 for tao, branch master for generis and display the result to console:

```
php bin/console oat:dependencies:resolve --extension-name taoQtiTest --main-branch feature/tao-1234 --dependency-branches tao:feature/tao-1234,generis:master

```

Will display the following in the console:

```
{
    "require": {
        "oat-sa/extension-tao-testqti": "dev-feature/TAO-7304-CSRF-timed-token-pool",
        "oat-sa/extension-tao-itemqti": "dev-develop",
        "oat-sa/extension-tao-item": "dev-develop",
        "oat-sa/extension-tao-backoffice": "dev-develop",
        "oat-sa/tao-core": "dev-feature/TAO-7304-CSRF-timed-token-pool",
        "oat-sa/generis": "dev-master",
        "oat-sa/extension-tao-test": "dev-develop",
        "oat-sa/extension-tao-delivery": "dev-develop",
        "oat-sa/extension-tao-outcome": "dev-develop"
    }
}

```

Requiring a non-existing branch will result in a exception both for main repository and dependencies:

```
php bin/console oat:dependencies:resolve --repository-name oat-sa/tao-core --main-branch foo

  Unable to retrieve reference to "oat-sa/tao-core/foo".

```

```
php bin/console oat:dependencies:resolve --repository-name oat-sa/tao-core --dependency-branches generis:bar

  Unable to retrieve reference to "oat-sa/generis/bar".

```

Trying to resolve dependencies for unknown repository will result in a exception:

```
php bin/console oat:dependencies:resolve --repository-name oat-sa/tao-foo

  Unknown repository "oat-sa/tao-foo".

```

Trying to resolve dependencies for unknown *extension* will also result in a exception:

```
php bin/console oat:dependencies:resolve --extension-name extension-tao-bar

  Extension "extension-tao-bar" not found in map.

```

But if it is a newly added extension, it may just not be in the extension map. If this is the case, you can update the extension map with the second tool:

```
php bin/console oat:repositories:update --reload-list

```

### Repository lister

[](#repository-lister)

Read more about this tool [here](doc/repository-updater.md).

This tool reads every oat-sa repositories in Github and maintains the map of **extension name** to **repository name**.

**/!\\ This is not needed each time, there is an up-to-date map currently provided in `/repositoryMap.json` and it is quite time consuming...**

#### Update repositories

[](#update-repositories)

Reads and analyzes repositories from Github.

```
$ php bin/console oat:repositories:update [--reload-list] [--limit limit]

```

- `--reload-list` : reloads the list of oat-sa repositories in addition to analyzing every repository
- `limit` : number of repositories to analyze at a time

#### Dump repository list

[](#dump-repository-list)

Dumps the repository map to a CSV file for human reading and analysis.

```
$ php bin/console repositories:dump [-f filename]

```

- `filename` : CSV filename. Defaults to `/repositories.csv`

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community23

Small or concentrated contributor base

Maturity48

Maturing project, gaining track record

 Bus Factor2

2 contributors hold 50%+ of commits

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

Unknown

Total

1

Last Release

2589d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/98ddc6f1b615b1fac2d59f1e72d5dc6056cf6650414271da90cb3f0e203516fe?d=identicon)[bugalood](/maintainers/bugalood)

![](https://www.gravatar.com/avatar/c0ec704e0a8abaf0c27b227ad05d7aca23bc8f83d195229d94d4508cddc0fd24?d=identicon)[oat-lionel](/maintainers/oat-lionel)

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

![](https://www.gravatar.com/avatar/348b2cf6408227372fbb22c6e8b0832e1c8c98c5d6b0c88bb220dbdfbcd21a39?d=identicon)[krampstudio](/maintainers/krampstudio)

---

Top Contributors

[![julien-sebire](https://avatars.githubusercontent.com/u/47318116?v=4)](https://github.com/julien-sebire "julien-sebire (52 commits)")[![ekkinox](https://avatars.githubusercontent.com/u/6922385?v=4)](https://github.com/ekkinox "ekkinox (18 commits)")[![bugalot](https://avatars.githubusercontent.com/u/4217431?v=4)](https://github.com/bugalot "bugalot (18 commits)")[![Babacooll](https://avatars.githubusercontent.com/u/6329406?v=4)](https://github.com/Babacooll "Babacooll (9 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (3 commits)")[![krampstudio](https://avatars.githubusercontent.com/u/468620?v=4)](https://github.com/krampstudio "krampstudio (3 commits)")[![edwin-focaloid](https://avatars.githubusercontent.com/u/126317720?v=4)](https://github.com/edwin-focaloid "edwin-focaloid (2 commits)")[![gitromba](https://avatars.githubusercontent.com/u/50639569?v=4)](https://github.com/gitromba "gitromba (1 commits)")[![mike-ionut-mihai-sandu-tao](https://avatars.githubusercontent.com/u/50211080?v=4)](https://github.com/mike-ionut-mihai-sandu-tao "mike-ionut-mihai-sandu-tao (1 commits)")

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/oat-sa-tao-dependency-resolver/health.svg)

```
[![Health](https://phpackages.com/badges/oat-sa-tao-dependency-resolver/health.svg)](https://phpackages.com/packages/oat-sa-tao-dependency-resolver)
```

###  Alternatives

[prestashop/prestashop

PrestaShop is an Open Source e-commerce platform, committed to providing the best shopping cart experience for both merchants and customers.

9.0k15.4k](/packages/prestashop-prestashop)[shopware/platform

The Shopware e-commerce core

3.3k1.5M3](/packages/shopware-platform)[kimai/kimai

Kimai - Time Tracking

4.6k7.4k1](/packages/kimai-kimai)[ec-cube/ec-cube

EC-CUBE EC open platform.

78527.0k1](/packages/ec-cube-ec-cube)[contao/core-bundle

Contao Open Source CMS

1231.6M2.4k](/packages/contao-core-bundle)[shopware/core

Shopware platform is the core for all Shopware ecommerce products.

595.2M386](/packages/shopware-core)

PHPackages © 2026

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