renanbr/phpact

Describes API differences between two distincts versions of the same PHP library.

dev-master 2015-06-17 08:08 UTC

This package is auto-updated.

Last update: 2020-10-05 09:56:22 UTC


README

This is a tool for describing API differences between two distincts versions of the same PHP library.

Usage

phpact <project> <oldversion> <newversion>

Arguments

  • project: the project name;
  • oldversion: the base release version; and
  • newversion: the challenger version to be compared against the base one.

Both version values must be explicit, e.g. 3.2.1. Constraints such as ^1.2 will not work! They may, alternatively, point to some directory instead.

Options

Filters

  • --bc-break-only: filter differences that cause backwards compatibility break, including those that come from protected stuff.
  • --visibility <level>: filter differences according to the visibility level given, which may assume: public; protected; private; or multiple values, e.g. public,protected. It defaults to public,protected,private.

Report

  • --report <format>: echoes differences as text, markdown, html or xml in console output. It defaults to console.
  • --report-<format> <file>: write differences into the given file.

Installing

Add renanbr/phpact dependency using Composer.

composer require renanbr/phpact

Edges, borders, limitations...

Both project versions meant to be analyzed must be compliant with Composer, and either PSR-0 or PSR-4.

Once PHP is weakly typed, there is no magic to do. The better documented the project are, the better results you will get. phpact uses phpDox to get information about the API.