PHP Classes
elePHPant
Icontem

File: README.md

Recommend this page to a friend!
  Classes of Insolita  >  Unused PHP Composer Packages Scanner  >  README.md  >  Download  
File: README.md
Role: Documentation
Content type: text/markdown
Description: Documentation
Class: Unused PHP Composer Packages Scanner
Detect packages in a composer project that unused
Author: By
Last change:
Date: 9 days ago
Size: 1,374 bytes
 

 

Contents

Class file image Download

Project scanner for detect unused composer dependencies

Build Status

Versions

Use 1.3.x@dev versions for projects with php 5.6, 7.0

Use 2.x versions for projects with php >= 7.1

ChangeLog

see CHANGELOG.md

Installation

composer global require insolita/unused-scanner

Ensure that your ~/.composer/vendor/bin directory declared in $PATH

echo $PATH

if not - you should add it in ~/.bashrc or ~/.profile

Update

composer global update

Usage

prepare configuration file, see scanner_config.example.php

put it in project root (or other place)

run composer dumpautoload in your project directory

run unused_scanner /path/to/configuration/file/scanner_config.php

since 1.1 you can run it without argument, if scanner_config.php existed in current working directory, it will be used by default

For auto-testing:

Add --silent option for skip progress output and return exit code = 16, when unused packages detected

run unused_scanner /path/to/configuration/file/scanner_config.php --silent

Docker:

run `docker run -v pwd:/app tico/unused-scanner /app/path/to/configuration/file/scanner_config.php`

wait for result..

Demo screenshot