PHPackages                             bogdanbeniaminb/simpledep - 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. bogdanbeniaminb/simpledep

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

bogdanbeniaminb/simpledep
=========================

Simple Dependency Solver for PHP

1.0.6(2y ago)050MITPHPPHP &gt;=7.4

Since Feb 19Pushed 1y ago1 watchersCompare

[ Source](https://github.com/bogdanbeniaminb/simpledep)[ Packagist](https://packagist.org/packages/bogdanbeniaminb/simpledep)[ RSS](/packages/bogdanbeniaminb-simpledep/feed)WikiDiscussions main Synced today

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

Simple Dependency Tree Solver
=============================

[](#simple-dependency-tree-solver)

This is a simple solver for install/uninstall requests and their dependencies.

Purpose
-------

[](#purpose)

The purpose of this project is to provide a simple dependency tree solver for package management tools like internal marketplaces. It is not intended to be a full-featured package manager like Composer or NPM.

How to run
----------

[](#how-to-run)

The main class is the `Solver` class. Its constructor method takes a `Pool` of packages, a `RequestsCollection` of requests and an array of installed packages. The `solve` method returns an array of `Operation` objects. Each `Operation` object has a `type` property that can be `install` or `uninstall`, a `name` property with the package name and a `version` property with the package version.

```
