diff --git a/content/documentation/configuration.md b/content/documentation/configuration.md index a9e4a8db..2974aa2c 100644 --- a/content/documentation/configuration.md +++ b/content/documentation/configuration.md @@ -21,6 +21,7 @@ return (new \Phel\Config\PhelConfig()) ->setNoCacheWhenBuilding([]) ->setFormatDirs(['src', 'tests']) ->setKeepGeneratedTempFiles(false) + ->setTempDir(sys_get_temp_dir().'/phel') ->setBuildConfig((new \Phel\Config\PhelBuildConfig()) ->setMainPhelNamespace('your-ns\index') ->setMainPhpPath('out/index.php')) @@ -133,6 +134,20 @@ return (new \Phel\Config\PhelConfig()) ; ``` +### TempDir + +Allows setting a custom absolute path for temporary files. + +```php +setTempDir('/tmp/phel') + # ... +; +``` + +If the path does not exist and cannot be created or written to, an exception is thrown. + ### BuildConfig The configuration when running the `phel build` command.