Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Library that find out the minimum version and the extensions required for a piece of code to run

README.asciidoc

PHP CompatInfo

PHP CompatInfo is a library that find out the minimum version and the extensions required for a piece of code to run.

It was distributed as source code (install via composer) and a PHAR version that bundles all dependencies in a single file.

Follow development on the official Blog.

Have a look on tag 2.26.0 for previous stable API 2.0

Install

You can either :

  • download the phar version 3.7.3

  • install via packagist the current source dev-master or the stable version 3.7.3

Note
This is the last version of branch 3. New major version 4.0 is currently under developement. See Roadmap.

Documentation

The documentation for PHP CompatInfo 3.7 is available in English to read it online or download to read it later (multiple formats).

AsciiDoc source code are available on docs folder of the repository.

Contribute

Contributions to source code and its documentation are always welcome.

As developper, I’m always happy when I have the more informations as possible to check and find out issues. This is the reason why I’ve created a PHPUnit TestSuite Listener for compatible PSR-3 Loggers.

If you want to use it, then :

  • install the component via Composer

$ php composer.phar require bartlett/phpunit-loggertestlistener=~1.1
  • create a phpunit.xml file with at least following contents :

<?xml version="1.0" encoding="UTF-8"?>
<phpunit
    backupGlobals="true"
    backupStaticAttributes="false"
    bootstrap="tests/bootstrap.dev.php"
    colors="false"
    stopOnError="false"
    stopOnFailure="false"
    stopOnIncomplete="false"
    stopOnRisky="false"
    stopOnSkipped="false"
    strict="true"
    verbose="false"
>
    <filter>
        <whitelist>
        <directory suffix=".php">src/</directory>
        </whitelist>
    </filter>
    <listeners>
        <listener class="Bartlett\LoggerTestListener">
            <arguments>
                <object class="Psr3Logger" />
            </arguments>
        </listener>
    </listeners>
    <testsuites>
        <testsuite name="CompatInfo Test Suite">
            <directory suffix="Test.php">tests/</directory>
        </testsuite>
    </testsuites>
</phpunit>
  • configure your PSR-3 logger in the tests\bootstrap.dev.php file

Note
Default will log all tests in local file /var/logs/phpcompatinfo.log and send a Growl notification of Test Suites summary when ended (if growl server running).
Something went wrong with that request. Please try again.