Reflect 3.0.0-RC-1 preview.

While 3.0.0-rc1 is still planned tomorrow, I would like to introduce a new change suggested by Remi Collet.

In beta3, a warning about xdebug was added to tell to unload it to speed-up execution.

In rc1, this warning is replaced by a new API/command diagnose/run

It’s usefull YES, but only if you run it. So, I’ve decided to run it for you, if you invoke no command. In Symfony/Console vocabulary, its the default command (list)

Here are few behavior’s examples:

With default verbosity level, and xdebug unloaded
$ bin/phpreflect
Results when all are OK
Auto-Diagnostic:

Checking php settings:
- Requires PHP 5.3.2 or better OK
- php.ini file loaded C:\UwAmp\bin\php\php-5.6.6\php.ini
- date extension loaded YES
- json extension loaded YES
- pcre extension loaded YES
- phar extension loaded YES
- reflection extension loaded YES
- spl extension loaded YES
- tokenizer extension loaded YES
With default verbosity level, and xdebug loaded
$ bin/phpreflect
Results with warning about xdebug
Auto-Diagnostic:

Checking php settings:
- Requires PHP 5.3.2 or better OK
- php.ini file loaded C:\UwAmp\bin\php\php-5.6.6\php-compatinfo.ini
- date extension loaded YES
- json extension loaded YES
- pcre extension loaded YES
- phar extension loaded YES
- reflection extension loaded YES
- spl extension loaded YES
- tokenizer extension loaded YES
- Xdebug extension loaded YES
Read more comments by increasing the verbosity level
With very verbose level, and xdebug loaded
$ bin/phpreflect -vv
Results with warning about xdebug
Auto-Diagnostic:

Checking php settings:
- Requires PHP 5.3.2 or better OK
- php.ini file loaded C:\UwAmp\bin\php\php-5.6.6\php-compatinfo.ini
- date extension loaded YES
- json extension loaded YES
- pcre extension loaded YES
- phar extension loaded YES
- reflection extension loaded YES
- spl extension loaded YES
- tokenizer extension loaded YES
- Xdebug extension loaded YES
  : You are encouraged to unload xdebug extension to speed up execution.

And of course, there is no diagnose run when invoking other commands, or simply asking for version.

As with other commands, the verbosity level 3 -vvv (debug), will print the raw response of the API diagnose/run

Auto-Diagnostic:

Raw response
Array
(
    [php_version] => 5.6.6
    [php_ini] => C:\UwAmp\bin\php\php-5.6.6\php-compatinfo.ini
    [date_loaded] => 1
    [json_loaded] => 1
    [pcre_loaded] => 1
    [phar_loaded] => 1
    [reflection_loaded] => 1
    [spl_loaded] => 1
    [tokenizer_loaded] => 1
    [xdebug_loaded] => 1
    [xdebug_profiler_enable] =>
)
Published by Laurent Laville on 2015-03-02