CompatInfo 3.0.0RC1 PHAR version FIXED

PHAR version of CompatInfo 3.0.0RC1 bundles now all dependencies.

The WARNING I’ve emitted in my previous post should be forgotten if you use the new version:

$ php phpCompatInfo.phar --version
phpCompatInfo version 3.0.0RC1-2-gd181e6c build d181e6cdbf6c701b6400231ebee130c7977ea07c
Published by Laurent Laville on 2014-02-20

CompatInfo 3.0.0RC1 PHAR version WARNING

When I’ve packaged the PHAR version, I’ve not used any specific stub, but just the same launcher as git source code version.

This is major reason you need to have previously installed PHP_Timer and Symfony/Class-Loader 2.4 or better.

I’ll fix this issue, to have a really phar version without any dependencies in first Release Candidate.

Be aware, and sorry for disappointment !

Published by Laurent Laville on 2014-02-20

CompatInfo 3.0.0RC1 has just been released.

As I’ve explained yesterday on Reflect’s blog, about the Reflect 2.0.0RC2 release, there are no PEAR package version.

CompatInfo 3.0.0RC1 is available only on two formats :

  • a PHAR version that bundles all dependencies (PHP-Parser + patch (1.0.0-dev+gh95), Symfony Finder 2.4.1, EventDispatcher 2.4.1, Console 2.4.1) in a single file.

  • a composer version.

Caution about the composer version

To use my patch (1.0.0-dev+gh95) on base Nikita 1.0-dev version, add on your composer.json file the following contents:

{
    "repositories": [
        {
            "type": "vcs",
            "url": "https://github.com/llaville/PHP-Parser"
        }
    ],
    "require": {
        "php": ">=5.3.0",
        "nikic/php-parser": "dev-MagicConst as 1.0.*@dev"
    }
}

You should get something like this output

Loading composer repositories with package information
Installing dependencies
  - Installing nikic/php-parser (dev-MagicConst d287cb4)
    Cloning d287cb42896ba8921fda64fc5868093647fd65de

Writing lock file
Generating autoload files

The PHAR version was built with the Box Project. The config file box.json is available on the github repository.

This phar version is both compatible with CLI and other SAPI

For web usage, just include the phar version, and use API.

<?php
require '/path/to/dir/phpcompatinfo.phar';
// ...

If you use CompatInfo in CLI, you should have access to a console application. This console use a json configuration file. Here is an example.

source-providers
identify your data source (following Symfony/Finder options)
plugins
included all plugins installed. Only one available AnalyserPlugin that give final results.
analysers
list all analysers installed accessible through the AnalyserPlugin. Previously (CompatInfo 1.x) it was called report (--report option).
Example 1: Summary analyser (always available, and display as default report, if none provided)
$ php phpcompatinfo.phar analyser:run --alias Reflect1
Example 2: Extension analyser (with benchmark active if PHP_Timer installed)
$ php phpcompatinfo.phar --profile analyser:run --alias CompatInfo2 extension
Example 3: Inspect full SPL Reference contents (that may be filtered by component; see reference:show options)
$ php phpcompatinfo.phar --profile reference:show spl
Example 4: Inspect Reference contents filtered by PHP version (all elements in Core since PHP 5.3)
$ php phpcompatinfo.phar --profile reference:show --php=">= 5.3.0" core
What is planned for the final stable version:
  • Fixes issues if users found something wrong.

  • Adds 40 extensions remaining (on 100) that were not yet migrated to new format.

  • Adds code to have ability to use the cache feature (plugin).

  • Finish the documentation that is not yet available.

Published by Laurent Laville on 2014-02-19

Command-Line preview of future release 3.0.0RC1

Even if full source code of RC1 is not yet ready for a public release, I’ve just uploaded the new branch v3.

Here is a screenshot preview, but you can test it yourself (independant from other software components).

consoleCompatInfo300RC1.png

In addition to common commands with PHP Reflect 2RC2, there is another one category:

reference
Allow to introspect the data dictionnary of extensions supported.
Example 1: list all elements of SPL extension
$ compatinfo --profile reference:show spl
Example 2: list all elements of SPL extension that requires at least PHP 5.2
$ compatinfo --profile reference:show --php=">= 5.2.0" spl
Example 3: list only ini directives of Xdebug
$ compatinfo --profile reference:show --ini xdebug
analyser:run
The command that will launch the data source parse process and display final results, depending of your analyser choice.
Published by Laurent Laville on 2014-02-03

Release 3.0.0RC1 is planned

While I still work on new core code of PHP Reflect 2.0.0RC2, the code of PHP CompatInfo 3.0.0RC1 is almost ready.

After to add/fix final details (phpdoc, docs, unit tests), I’ll release the source code on Monday 3rd February.

Of course, if you read also the PHP Reflect’s Blog, you’ll be a bit disappointed because you can’t run the first release candidate of CompatInfo, that will required Reflect 2.0.0RC2 not yet published.

I’m focus now on finish as soon as possible the core code of the new parser version.

As you will notice soon, if you read the source code, you will see a new architecture, but more than that, one feature by layout. So, e.g, CompatInfo will not include parser code, as in previous version 2.

And lot more. Stay tuned, I’ll post more on next days to present features you could not test until PHP Reflect 2.0.0RC2 is out.

Published by Laurent Laville on 2014-02-01