Giter Site home page Giter Site logo

bjork / php-compat-info Goto Github PK

View Code? Open in Web Editor NEW

This project forked from llaville/php-compatinfo

0.0 2.0 0.0 8.47 MB

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

Home Page: http://php5.laurent-laville.org/compatinfo/

License: Other

PHP 97.75% Groff 2.25%

php-compat-info's Introduction

PHP CompatInfo

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

It is 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 branch 3.7 for previous stable API 3.x

Install

You can either :

  • download the phar version 4.4.0

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

Documentation

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

AsciiDoc source code is 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.

Recently, on attempt to enhance GenericTest for unit tests, I’ve wrote a new PHPUnit ResultPrinter class, that is based on PSR-3 logger concept. You can learn more on this post in the CompatInfo’s blog.

If you want to use it, then :

  • install all the components via Composer

$ php composer.phar require --dev bartlett/php-compatinfo
  • 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"
    verbose="false"
>
    <filter>
        <whitelist>
        <directory suffix=".php">src/</directory>
        </whitelist>
    </filter>
    <testsuites>
        <testsuite name="CompatInfo Test Suite">
            <directory suffix="Test.php">tests/</directory>
        </testsuite>
    </testsuites>
</phpunit>
  • configure the PSR-3 logger in tests\MonologConsoleLogger.php, if you want to change some behaviors.

Note
Default will log all PHPUnit events in local file phpunit-phpcompatinfo-php<PHP_VERSION_ID>.log and log events corresponding to PHPUnit mode (--verbose, --debug) to the console.
Note
If you’ve a Growl client installed and running, you will be notified at end of tests run.
Output look like
PHPUnit 4.6.6 by Sebastian Bergmann and contributors.

Configuration read from C:\home\github\php-compat-info\phpunit.xml

CompatInfo Test Suite:

    Test suite started with 1372 tests

Bartlett\Tests\CompatInfo\ClassIssueTest:

    Test suite started with 6 tests

Bartlett\Tests\CompatInfo\ClassIssueTest:

    Test suite ended. Results OK. Tests: 6, Assertions: 10

Bartlett\Tests\CompatInfo\ConditionIssueTest:

    Test suite started with 4 tests

< ... MORE LINES ...>

CompatInfo Test Suite:

    Test suite ended. Results OK. Tests: 1108, Assertions: 15465, Skipped: 22

Time: 3.42 minutes, Memory: 35.25Mb, References: 105

Results OK. Tests: 1130, Assertions: 15465, Skipped: 264

php-compat-info's People

Contributors

cmb69 avatar dennisbecker avatar dregad avatar glensc avatar llaville avatar remicollet avatar siwinski avatar vrana avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.