Download the PHP package shipmonk/modulint without Composer

On this page you can find all versions of the php package shipmonk/modulint. 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 modulint

Modulint - module dependency enforcer for PHP

Why?

Once a codebase grows, hand-written rules like "the Logging module must not depend on Doctrine" tend to drift. shipmonk/modulint lets you declare those rules as data and enforce them in CI.

A module is a named bag of paths (files and/or directories). For each module you declare which other modules it is allowed to depend on. Modulint walks every PHP file in each module, parses it, resolves used class-like symbols (classes, interfaces, traits, enums) via Composer's autoloader, looks up which module they belong to, and reports:

Installation

Usage

Create modulint.php in your project root:

Then run:

Exit code is 0 when everything is clean and 1 otherwise.

Example output

When something is wrong, modulint groups the violations by type and points at the exact file-to-file edge that broke the rule:

When everything checks out:

Concepts

Module identifier

ModuleIdentifier is an empty marker interface extending UnitEnum. You implement it by writing your own enum. Using an enum gives you autocompletion and refactoring support, and the IDE will tell you immediately if you reference a module that does not exist.

Allowed dependencies

The dependencies constructor argument controls what a module can use:

A dependency on a parent module implicitly allows dependencies on its nested modules: [...] children.

Fully-modulized directories

addFullyModulizedDirectory('src') makes modulint complain about any .php file under src/ that no module claims. This is how you keep the configuration honest as code is added.

Vendor modules

A common pattern is to declare one module per relevant vendor package, pointing at vendor/<package> as its paths, with dependencies: null. That lets you assert which parts of your code may use which vendor library — typically the most useful kind of architectural rule.

Disable colored output

Set NO_COLOR to disable ANSI colors:

Contributing

Supported PHP versions


All versions of modulint with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1
composer-runtime-api Version ^2.0
nikic/php-parser Version ^4.18 || ^5.0
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 shipmonk/modulint contains the following files

Loading the files please wait ...