Skip to content

v3.0.0-beta1

Pre-release
Pre-release

Choose a tag to compare

@ryangjchandler ryangjchandler released this 04 Nov 22:22
· 3 commits to 3.x since this release
3c61701

This is the first beta release for Phiki v3.0.

If you are upgrading from Phiki v2.x, please consult the upgrade guide for information about breaking changes.

Warning

Phiki v3.0 requires PHP 8.3 or newer. Support for PHP 8.2 has been dropped.

Added

  • Added a PCRE regex engine alongside Oniguruma. PHP 8.6 deprecates the mb_ereg* functions and PHP 9 removes them, so Phiki now falls back to PCRE automatically when they aren't available. You can also choose an engine with Phiki::engine(). See the regex engines documentation for more information.
  • Added compatibility and performance reports, which compare both engines with vscode-textmate and Shiki.

Changed

  • Tokenization now follows vscode-textmate's rules much more closely, so many grammars produce more accurate scopes. With PCRE, 219 of 227 bundled grammars now produce identical tokens to vscode-textmate.
  • Highlighting is roughly 2x faster and uses less memory.

Fixed

  • Fixed #name includes not looking in a rule's own repository first, which affected grammars such as Objective-C and Wikitext.
  • Fixed injection selectors only matching their first group, which caused Svelte and Astro to embed the wrong language.
  • Fixed back-references in end and while patterns, and added support for applyEndPatternLast.
  • Fixed rules whose patterns only include missing rules or grammars, which broke grammars such as Lean, Hurl and Haml.
  • Fixed captures being tokenized incorrectly after multibyte text.
  • Fixed memory exhaustion from unbounded line ranges (e.g. {1-100000000}) in the CommonMark extension.

Full Changelog: v2.2.1...v3.0.0-beta1