- PHP 8.4+ (
php -vto check) - Composer
Install dependencies:
composer installTests live in test/ (configurable in phel-config.php via withTestDirs).
See also the Phel Getting Started guide.
Full suite:
composer testA single file:
composer test -- test/clojure/core_test/abs.cljcA namespace:
composer test -- --filter clojure.core-test.absThe
composer testscript setsXDEBUG_MODE=off, which makes startup noticeably faster than calling./vendor/bin/phel testdirectly when Xdebug is installed system-wide.
If the runner crashes before printing a report, re-run with --testdox or -v to locate the failing test.
See the Phel testing docs.
Format the test sources (uses withFormatDirs from phel-config.php):
./vendor/bin/phel formatcomposer.json currently pins a stable release:
{
"require": {
"phel-lang/phel-lang": "^0.38"
}
}Pull the latest matching release:
composer update phel-lang/phel-langTo track development HEAD instead, switch to dev-main and allow dev stability:
{
"require": {
"phel-lang/phel-lang": "dev-main"
},
"minimum-stability": "dev",
"prefer-stable": true
}Pin to a specific commit (useful for bisecting upstream regressions):
composer require "phel-lang/phel-lang:dev-main#<commit-hash>"The shared .cljc tests select the Phel branch via :phel:
#?(:clj (Integer/MAX_VALUE)
:cljs js/Number.MAX_SAFE_INTEGER
:phel php/PHP_INT_MAX)Phel exposes PHP globals under the php/ namespace and core types under Phel.Lang.*
(e.g. Phel.Lang.ExInfoException, Phel.Lang.Collections.Map.PersistentMapInterface).
See writing-tests.md for cross-dialect conventions.