Download the PHP package koriit/phpdeps without Composer

On this page you can find all versions of the php package koriit/phpdeps. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package phpdeps

= PHPDeps :toc:

image:https://travis-ci.org/Koriit/PHPDeps.svg?branch=master[Build Status, link="https://travis-ci.org/Koriit/PHPDeps"]

image:https://coveralls.io/repos/github/Koriit/PHPDeps/badge.svg?branch=master[Coverage Status, link="https://coveralls.io/github/Koriit/PHPDeps?branch=master"] image:https://scrutinizer-ci.com/g/Koriit/PHPDeps/badges/quality-score.png?b=master[Scrutinizer Code Quality, link="https://scrutinizer-ci.com/g/Koriit/PHPDeps/?branch=master"] image:https://styleci.io/repos/105358876/shield?branch=master[StyleCI, link="https://styleci.io/repos/105358876"] image:https://insight.sensiolabs.com/projects/d0be02a7-7d54-4d44-9b45-cda5abdf44fe/mini.png[SensioLabsInsight, link="https://insight.sensiolabs.com/projects/d0be02a7-7d54-4d44-9b45-cda5abdf44fe"]

image:https://poser.pugx.org/koriit/phpdeps/v/stable[Latest Stable Version, link="https://packagist.org/packages/koriit/phpdeps"] image:https://poser.pugx.org/koriit/phpdeps/license[License, link="https://packagist.org/packages/koriit/phpdeps"]

== About

PHPDeps is a simple tool to detect circular dependencies in your modules, whatever you consider as a module or package.

Module is an organized unit of code, which is supposed to be treated as single entity. By grouping classes and functions into modules we can reason about the design at a higher level of abstraction.

== Install

PHPDeps is available via composer:

[source,shell]

composer require --dev koriit/phpdeps

Please, note that PHPDeps is used during the development. It's not a part of your application, hence --dev.

== Why care?

This is a general programming problem. If this subject is new to you, or you just need a refresher here are some quick references:

. http://lattix.com/blog/2017/07/26/why-cyclic-dependencies-are-bad[Why Cyclic Dependencies are Bad] . http://lorifpeterson.com/?p=24[What is circular dependency and why is it bad?] . https://en.wikipedia.org/wiki/Circular_dependency[Circular dependency] . https://en.wikipedia.org/wiki/Acyclic_dependencies_principle[Acyclic dependencies principle] . http://butunclebob.com/ArticleS.UncleBob.PrinciplesOfOod[The Principles of OOD] (The Acyclic Dependencies Principle part; in the end, most of the writers refer to this piece of literature)

== Approach

[NOTE,caption=TL;DR]

If you are using https://www.php-fig.org/psr/psr-4[PSR-4] and importing all classes and function via use then you are fine.

PHPDeps detects module usage by reading use section of your PHP files. This means that PHPDeps requires namespaces to be present.

PHPDeps assumes that all classes and functions belonging to a single module have the same namespace prefix in their fully qualified name.

For example, if we tell PHPDeps that SomeModule has namespace of ACME\Lib\Modules\SomeModule and PHPDeps analyzes a following file which belongs to OtherModule: [source,php]

<PHPDeps xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="vendor/koriit/phpdeps/phpdeps.xsd">

<Modules> <!--1-->
    <Module>
        <Name>PHPDepsApplication</Name> <!--2-->
        <Namespace>Koriit\PHPDeps\PHPDepsApplication</Namespace> <!--3-->
        <Path>./src/PHPDeps/PHPDepsApplication.php</Path> <!--4-->
    </Module>
</Modules>

<Detectors> <!--5-->
    <ModuleDetector>
        <Namespace>Koriit\PHPDeps</Namespace> <!--6-->
        <Path>./src/PHPDeps</Path> <!--7-->
    </ModuleDetector>
</Detectors>

<1> *First option* is to directly define your modules. <2> Each module needs a name, but currently this is only used for displaying purposes. <3> Each module also needs a namespace prefix, this is used to check whether any other module depends on it. If module is a file then this needs to be fully qualified name of that module. <4> Module path allows PHPDeps to find and analyze your module, this can be either filepath or dirpath. <5> *Second option* is to define a module detector, right now PHPDeps supports detection of only dir based modules. <6> Namespace prefix, directory name of found modules are appended to this to create actual module namespaces. <7> Directory where modules are to be searched for. Once you have a configuration ready, you can execute: [source,shell] ---- vendor/bin/phpdeps ---- If everything is all right you get nice OK message: ---- [OK] There are no circular dependencies in your modules! ---- If something is amiss, you get: ---- [WARNING] There are circular dependencies in your modules! In total there are 4 dependency cycles in your modules. 1. Commands -> Modules -> Commands ---------------------------------- 2. Commands -> Config -> Modules -> Commands -------------------------------------------- 3. Commands -> Helpers -> Modules -> Commands --------------------------------------------- 4. Commands -> Helpers -> Config -> Modules -> Commands ------------------------------------------------------- ---- Please, note that this example was generated by adding just one dependency to *Commands* module in *Modules* module. At the moment PHPDeps does not provide any additional help in resolving the circular dependencies problem. == Exit codes [options="header",cols="^,30%,60%"] |=================================================================================================================== | Code | Name | Description | 0 | OK | Application finished successfully and no issues detected | 1 | UNEXPECTED_ERROR | Application was aborted because of an error | *3* | *CIRCULAR_DEPENDENCIES_EXIST* | Application finished successfully but dependency cycle has been detected | 255 | STATUS_OUT_OF_RANGE | Returned status code was out of range |=================================================================================================================== == Config Configuration is a simple XML file. Provided XSD allows for code completion and easy validation. Currently, configuration uses simple format consisting of only XML tags and no attributes * ** - Configuration root element. ** ** - Grouping tag for all kinds of module definitions. *** ** - Defines and describes a single module. **** ** - Module name, used for display purposes. **** ** - Namespace prefix, to check whether any other module depends on it. If module is a file then this needs to be fully qualified name of that module. **** ** - Module path allows PHPDeps to find and analyze your module, this can be either filepath or dirpath. ** ** - Grouping tag for all kinds of detector definitions. *** ** - Defines and describes a single basic module detector. **** ** - Namespace prefix, directory name of found modules are appended to this to create actual module namespaces. **** ** - Directory where modules are to be searched for. == Config example [source,xml,title="phpdeps.xml"] ---- PHPDepsApplication Koriit\PHPDeps\PHPDepsApplication ./src/PHPDeps/PHPDepsApplication.php Koriit\PHPDeps ./src/PHPDeps ---- == Commands and options Please, refer to built-in `help` command.

All versions of phpdeps with dependencies

PHP Build Version
Package Version
Requires php Version ^5.6 || ^7.0 <7.3
php-di/php-di Version ^5.4
symfony/console Version ^3.3
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package koriit/phpdeps contains the following files

Loading the files please wait ....