Download the PHP package quietfrog/dependency-graph without Composer
On this page you can find all versions of the php package quietfrog/dependency-graph. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download quietfrog/dependency-graph
More information about quietfrog/dependency-graph
Files in quietfrog/dependency-graph
Package dependency-graph
Short Description Dependency graph for PHP
License MIT
Homepage https://github.com/alanbem/dependency-graph
Informations about the package dependency-graph
Dependency Graph
This library is a fork of https://github.com/MikeRoetgers/dependency-graph with the following changes:
- Renamed
DependencyManager
class toGraph
- Renamed base namespace to
QuietFrog
- Hid some classes (e.g.
Operation
) in order to make library more generic. - Removed tags handling
Documentation
This is a simple implementation of a dependency graph (directed acyclic graph). Define services and dependencies between them. The graph keeps track of all dependencies and gives you an order in which services can be executed. This is especially convenient if you are working with long-running tasks and you want to identify which services may be executed in parallel.
Example
This definition results in the following graph:
Ask the graph which dependencies can be resolved. When service has been executed, mark it as resolved and ask for new available services.
More complex graphs are possible.
Acyclicity
The graph is acyclic, which means something like this is NOT allowed:
Cycles will be detected when the graph is initialized. A CircularDependencyDetectedException will be thrown.