laminas/laminas-servicemanager-inspector

ServiceManager configuration analysis tool

0.1.1 2021-06-16 16:12 UTC

This package is auto-updated.

Last update: 2021-12-02 16:44:25 UTC


README

Build Status Psalm coverage

The purpose of this package is to make autowiring reliable (no AoT is involved). At the moment it makes sure that ReflectionBasedAbstractFactory won't cause any runtime problems.

The tool can be added to your favorite CI so to make sure there are no defects.

TSC Proposal

Defects analyzed

  • Circular dependency
  • Cyclic alias
  • Missing factory
  • Factory autoload failure
  • Unresolvable service
  • Unresolvable scalar
  • Scalar type/name mismatch (WIP)
  • Other scenarios of misconfiguration

Laminas/DI/AutowireFactory support will be coming soon.

Installation

Run the following to install this library:

$ composer require --dev laminas/laminas-servicemanager-inspector

Configuration

No configuration is needed. All you need to do is to include ConfigProvider (or Module) to your application.

Usage

./vendor/bin/laminas servicemanager:inspect

Future plans

  • Analyze AutowireFactory (from laminas-di)
  • Check if each and every app's root entrypoint (e.g. a class implementing RequestHandlerInterface) has a proper factory

Support