Release: v0.10.0


Support for fluid configuration

Added support for fluid configuration in phel-config.php

# Instead of a raw array...
return [
    'src-dirs' => ['some/directory'],
    'test-dirs' => ['another/directory'],
    'vendor-dir' => 'vendor',
    'out-dir' => 'out',
    'export' => [
        'target-directory' => 'src/Generated',
        'directories' => ['some/other/dir'],
        'namespace-prefix' => 'Generated',
    'ignore-when-building' => ['src/'],
    'keep-generated-temp-files' => true,
    'format-dirs' => ['src', 'tests'],

# can now use a fluent object interface
return (new PhelConfig())
    ->setExport((new PhelExportConfig())
    ->setFormatDirs(['src', 'tests']);

Both examples above produce the same outcome.

Default format paths

You can now define default directories to apply when using the phel format command without arguments.

vendor/bin/phel format -h
  Formats the given files.

  format [<paths>...]

  paths     The file paths that you want to format. [default: ["src","tests"]]

You can define these dirs in your phel-config.php: PhelConfig::setFormatDirs(['src',...])

Added --testdox to the test command

Added --testdox option to phel test command. Inspired by PHPUnit, in phel you will see the test name plus the assertion description instead of a dot.

Without --testdox:

php phel test --filter test-json-encode-flag

With --testdox:

phel-lang/ (master) $ php phel test --filter test-json-encode-flag --testdox                           
 test-json-encode-flag: It tests flags parameter with one flag.
 test-json-encode-flags: It tests flags parameter with two flags.

Other improvements

  • Enable gacela cache filesystem by default
  • Deprecate compile-mode in favor of build-mode
  • Fix php/apush, php/aset and php/aunset for global php arrays

Full list

For a full list of changes have a look at the Changelog.