phpcompatinfo man page

phpcompatinfo — PHP library that parse any data source to find out the minimum version and extensions required for it to run.

Synopsis

phpcompatinfo [options] command [arguments]

Description

The phpcompatinfo(1) command parse any data source, defined in a json configuration file, to find out elements, such as classes, interfaces, functions, constants, namespaces.

Options

-h, --help
Display this help message.
-q, --quiet
Do not output any message.
-v|vv|v, --verbose
Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug.
-V, --version
Display this application version.
--ansi
Force ANSI output.
--no-ansi
Disable ANSI output.
--profile
Display timing and memory usage information.
--progress
Show progress bar.
--output
Write results to file or URL.
--manifest
Show which versions of dependencies are bundled (PHAR version only).

Analyser:List Command

The phpcompatinfo(1) analyser:list command is used to show what analysers are installed (see Conf Files section).

Analyser:Run Command

The phpcompatinfo(1) analyser:run command is used to analyse a data source and display results.

Usage:

phpcompatinfo analyser:run [--alias] [--format[="..."]] [--filter[="..."]] source [analysers1] ... [analysersN]

Where:

--alias

If set, the source refers to its alias

--format

If set, convert result to a specific format. (default: false)

--filter

Resource that provide a closure to filter results. (default: false)

source

Identify a data source; may be declared in a json configuration file (see Conf Files section)

analysers1 ... analysersN

Identify one or more analyser to execute. See analyser:list command to know what analysers are available. (default: ["compatibility"])

Config:Validate Command

The phpcompatinfo(1) config:validate command is used to check syntax of your json configuration file

Usage:

phpcompatinfo config:validate [file]

Where:

file

Path to phpcompatinfo.json file (optional)

Diagnose:Run Command

The phpcompatinfo(1) diagnose:run command is used to identify common errors on a platform.

Usage:

phpcompatinfo diagnose:run [-vv|-vvv]

Diagram:Class Command

The phpcompatinfo(1) diagram:class command is used to generate diagram about a user class present in a data source

Usage:

phpcompatinfo diagram:class [--alias] [--engine[="..."]] argument source

Where:

argument

Name of the class to inspect

source

Identify a data source; may be declared in a json configuration file (see Conf Files section)

--alias

If set, the source refers to its alias

--engine

Graphical syntax. (default: "plantuml")

Diagram:Package Command

The phpcompatinfo(1) diagram:package command is used to generate diagram about namespaces in a data source

Usage:

phpcompatinfo diagram:package [--alias] [--engine[="..."]] source

Where:

source

Identify a data source; may be declared in a json configuration file (see Conf Files section)

--alias

If set, the source refers to its alias

--engine

Graphical syntax. (default: "plantuml")

Plugin:List Command

The phpcompatinfo(1) plugin:list command is used to show what plugins are installed (see Conf Files section).

Reference:List Command

The phpcompatinfo(1) reference:list command is used to list all references supported.

Usage:

phpcompatinfo reference:list

Reference:Show Command

The phpcompatinfo(1) reference:show command is used to introspect a reference.

Usage:

phpcompatinfo reference:show [--filter[="..."]] [--releases] [--ini] [--constants] [--functions] [--interfaces] [--classes] name

Where:

name

Introspection of a reference (case insensitive)

--filter

Resource that provide a closure to filter results (default: false)

--releases

Show releases

--ini

Show ini Entries

--constants

Show constants

--functions

Show functions

--interfaces

Show interfaces

--classes

Show classes

Reflection:Class Command

The phpcompatinfo(1) reflection:class command is used to give information about a user class present in a data source.

Usage:

phpcompatinfo reflection:class [--alias] [--return="..."] argument source

Where:

argument

Name of the class to reflect.

source

Identify a data source; may be declared in a json configuration file (see Conf Files section)

--alias

If set, the source refers to its alias

--format

Format of result to return. False when raw text. (default: false)

Reflection:Function Command

The phpcompatinfo(1) reflection:function command is used to give information about a user function present in a data source.

Usage:

phpcompatinfo reflection:function [--alias] [--return="..."] argument source

Where:

argument

Name of the function to reflect.

source

Identify a data source; may be declared in a json configuration file (see Conf Files section)

--alias

If set, the source refers to its alias

--format

Format of result to return. False when raw text. (default: false)

Exit Status

0

Success

1

Failure (syntax or usage error; configuration error; unexpected error).

Conf Files

A configuration file contains data sources that can be analysed, but also optional plugins and analysers installed. Require configuration file is loaded in the following order:

1. The CONF_FILE specified by the environment variables BARTLETTRC and BARTLETT_SCAN_DIR.

2. phpcompatinfo.json from the current directory.

3. phpcompatinfo.json from the User $HOME/.config directory.

4. phpcompatinfo.json from the /etc directory.

Bugs

Report any issue at https://github.com/llaville/php-compat-…

Authors

PHP_CompatInfo was originally written by Davey Shafik in 2004.

Remi Collet, contributor of many extensions reference and unit tests, joined the project since version 2.0.0RC2

The Command-Line Interface (CLI) version was introduced in version 2.0 and is written by Laurent Laville.

See Also

Main web site: http://php5.laurent-laville.org/compati…

License

Free use of this software is granted under the terms of the BSD 3-clause license.

Info

2015-05-19   4.2.0