Phel comes with some configuration options. They are stored in the phel-config.php file in the root directory of every project.


These are all Phel specific configuration options available.

// phel-config.php
return [
    'src-dirs' => ['src'],
    'test-dirs' => ['tests'],
    'vendor-dir' => 'vendor',
    'export' => [
        'directories' => ['src'],
        'namespace-prefix' => 'PhelGenerated',
        'target-directory' => 'src/PhelGenerated'

Options in detail#

This chapter contains all configuration options explained in detail.


A list of directories in which the source files for the project are located.


A list of directories in which the test files are located.


The name of the composer vendor directory. Default is vendor.


These configuration options are used for the Phel export command that is described in the PHP Interop chapter. Currently, the export command requires three options:

  • directories: Defines a list of directories in which the export command should search for export functions.
  • namespace-prefix: Defines a namespace prefix for all generated PHP classes.
  • target-directory: Defines the directory where the generated PHP classes are stored.