Reflect 2.0.0RC2 has just been released.

After many tries to have the more evolutive parser as possible, I’ve finally adopted PHP-Parser 1.0-dev 5 days ago.

Be aware that I used the Nikita Popov version with a little patch (see Pull Request #95) relative to magic constants.

As there are no PEAR package available for PHP-Parser, Reflect 2.0.0RC2 will be 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": ""
    "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 as explained.

require '/path/to/dir/phpreflect.phar';
// ...
What is planned for the final stable version:
  • Fixes issues if users found something wrong.

  • Adds one analyser that will replace the concrete example that measure size of project.

  • Adds one plugin to generate PlantUML diagrams as presented in concrete example make UML diagrams.

Published by Laurent Laville on 2014-02-18