Reflect 2.0.0RC3 has just been released.

Here are additions and changes since RC2:

  • adds a new command analyser:run that display a structure report.

  • adds a new command plantUML:run to make PlantUML diagrams (package or class).

  • fixes composer.json syntax file.

  • phar version is now a single file with all dependencies bundled.

  • can use all file informations into reflect.progress, reflect.success and reflect.error events.

  • fixes PHP-Parser namespace error.

  • prints progress filenames and optional errors on verbose level 2.

  • prevent error on plugin:list command if json config file does not have a plugins entry.

  • each plugin is now really plug-and-play (should provide additional commands).

  • console application respect now plug-and-play protocol.

  • fixes plugin:list command render when multiple plugins are available.

This is the last RC before final stable version planned for Fri, 4 April 2014.

Tasks to do:
  • Fixes issues if users found something wrong.

  • Finish documentation.

Published by Laurent Laville on 2014-03-24

Reflect has just been published on Packagist.

If you want to use Reflect for your own project, you can add a dependency in your composer.json file as follow:

{
    "require": {
        "php": ">=5.3.0",
        "ext-tokenizer": "*",
        "ext-pcre": "*",
        "ext-spl": "*",
        "ext-json": "*",
        "nikic/php-parser": "1.0.*@dev",
        "bartlett/php-reflect": "2.*@dev"
    }
}
Published by Laurent Laville on 2014-03-14

Enhance the plantUML plugin

I’ve just committed (f694782) an improvement in the plantUML plugin. Class diagram display now namespaces. Compare both versions :

bartlett_reflect.classdiagram.png
Figure 1. Previously
bartlett_reflect.classdiagramV2.png
Figure 2. Now

See explains in previous post 2014-02-23

Run the command below
$ php bin/reflect --profile --plantUML:run --alias Reflect2RC2 --class="Bartlett\Reflect"

You will get such output.

set namespaceSeparator none

namespace Bartlett {
class Reflect{
    #pm
    #files
    +getProviderManager()
    +setProviderManager()
    +parse()
    +getPackages()
    +getFiles()
    -buildFromCache()
}
}

namespace Bartlett.Reflect.Event {
class AbstractDispatcher
}
AbstractDispatcher <|-- Reflect

namespace Bartlett.Reflect {
interface ManagerInterface
}
ManagerInterface <|.. Reflect

Put in in a file , e.g classDiagram.plantuml, and send the result to plantUML

$ java -jar plantuml.jar classDiagram.plantuml
Published by Laurent Laville on 2014-03-05