A new plugin to log events

Future release 2.4.0 will adopt another new plugin.

If you’ve already tried to add some event listeners to your scripts, you have probably noticed that logging Reflect events on Command-Line was impossible, until now !

The LogPlugin will allow to record all events to any compatible PSR-3 logger, and for all API (including CLI).

Have a look on documentation :

  • Configure your logger for CLI

  • Configure your logger for other SAPI (batch script, …)

Published by Laurent Laville on 2014-08-28

Reflect 2.3.0 has just been released.

News :

  • add new --manifest option for PHAR distribution to show dependencies bundled

  • add new validate command to check syntax of your JSON configuration file

Changes :

  • HOME syntax is compatible both Linux and Windows to look for JSON configuration file, and file cache location (see cache plugin)

  • clean-up code (removed unused Use statements)

  • Cache plugin may now be used with all API (including CLI)

  • Cache in CLI mode provide a new command cache:clear to clean selective contents (by data source) of previous cached results

  • Cache in CLI mode is verbose when you used the --profile option

  • remove require-dev entries in composer.json

Bugs :

  • invalidate a cache entry when source code is modified (Thanks to Remi Collet to notice me issue)

Download :

Alternatively, you may use Composer and install it via Packagist.

Published by Laurent Laville on 2014-08-21

Reflect has a manifest for PHAR distribution

Reflect 2.3 and greater will have a manifest on each PHAR distribution.

In Idea to simplify future maintenance, and to provide a way to know what are the dependencies bundled, today, I’ve introduced the new --manifest option (credits to Sebastian Bergmann).

This option print the list of all dependencies and their versions, as follow :

$ phpreflect --manifest
bartlett/php-reflect: v2@aa704f4ab8dd1a6b2b8c0db65c6796717784a29d
doctrine/cache: v1.3.0
nikic/php-parser: v1.0.0beta1
phpunit/php-timer: 1.0.5
seld/jsonlint: 1.2.0
symfony/console: v2.5.3
symfony/event-dispatcher: v2.5.3
symfony/finder: v2.5.3
Published by Laurent Laville on 2014-08-19

Cache Plugin for the Command-Line

While release 2.2.0 offered the new cache plugin feature, it was just for other SAPI than CLI.

Now it’s time to provide cache also for the Command-Line.

A pre-version of manual for version 2.3 is online at url http://php5.laurent-laville.org/reflect/manual/2.3/en/

BTW, there is no more a PDF US, but only a PDF (A4) available.

Published by Laurent Laville on 2014-08-13

Automated building process

To avoid losing time in the preparation of each release, I’ve updated the old phing script used for Reflect v1.x and PEAR packages.

This phing script is not a standalone solution, because it use a new project I’m still working on called bartlett/phing-builder.

It should be release soon as an open source project. Stay tune !

Published by Laurent Laville on 2014-08-08