Release: 0.22.0 – Metadata conditions

Released

Strength metadata handling, expands the function API, introduces new array utilities and debugging tools, and improves printing consistency. It also raises code quality by moving to PHPStan level 5 and removes legacy namespaces for a cleaner core.

✨ New Features

  • Added new array functions with nested lookup
    • php/aget-in, php/aset-in, php/aunset-in, php/apush-in
  • Added *file* global to return the current source file’s path
  • Added set literal shortcut syntax #{1 2 3}
  • Added comma separator between key/value pairs in hash-maps
  • Added metadata :pre / :post conditions
    • Config option to disable them for performance
  • Improved public API module with PhelFunction updates
    • Generated relative file paths and GitHub URLs
    • Deprecated methods in favor of public properties
    • Added meta containing all available metadata
  • Introduced phel\debug namespace with helpers like spy and tap

🐛 Bug Fixes

  • Fixed REPL require from repl.phel failing
  • Fixed metadata on definitions
  • Fixed argv to return a vector instead of a native PHP array
  • Fixed persistence of metadata in core functions and macros
  • Fixed NsSymbol namespace validation
  • Returned empty string for __FILE__ and __DIR__ in the REPL

📈 Code Quality

  • Increased PHPStan level to 5
  • Removed legacy phel\trace namespace (replaced by phel\debug)

👥 Contributors

@Chemaclass @jasalt @JesusValeraDev

Full Changelog: v0.21.0...v0.22.0

Downloads


View release on GitHub