ondrejmirtes / phplrt-runtime
phplrt runtime (lexer, parser, source, position and their contracts) downgraded to PHP 7.4
Requires
- php: ^7.4 || ^8.0
- ext-json: *
- ext-pcre: *
- symfony/polyfill-php80: ^1.23
- symfony/polyfill-php81: ^1.27
Requires (Dev)
None
Suggests
None
Provides
None
Conflicts
None
Replaces
- phplrt/lexer: 4.2.4.1
- phplrt/lexer-contracts: 4.2.4.1
- phplrt/parser: 4.2.4.1
- phplrt/parser-contracts: 4.2.4.1
- phplrt/position: 4.2.4.1
- phplrt/position-contracts: 4.2.4.1
- phplrt/position-factory-contracts: 4.2.4.1
- phplrt/runtime: 4.2.4.1
- phplrt/source: 4.2.4.1
- phplrt/source-contracts: 4.2.4.1
- phplrt/source-factory-contracts: 4.2.4.1
This package is auto-updated.
Last update: 2026-10-26 17:32:46 UTC
README
The runtime half of phplrt (lexer, parser, source, position and their contracts), downgraded to PHP 7.4 so that PHPStan can run a parser generated by the phplrt compiler everywhere PHPStan runs.
It replaces phplrt/runtime and the packages it is made of. Only the
runtime is here: grammars are compiled with upstream phplrt/compiler
on a recent PHP.
How it is built
Every release is rebuilt from an upstream phplrt tag:
composer install --working-dir build/tools git clone --branch 4.2.4 https://github.com/phplrt/phplrt.git /tmp/phplrt build/build.sh /tmp/phplrt /tmp/phplrt-runtime
which creates these commits:
- the upstream sources, copied verbatim,
- manual changes Rector cannot do (
build/manual.py): enums become singleton classes (Channel::Hidden()) and string constants,WeakMapbecomesSplObjectStorage, and so on. It also appliesbuild/interpreter.patch, which makes the recursive descent interpreter faster without changing what it reads, DowngradeLevelSetList::DOWN_TO_PHP_74applied by Rector,- this build tooling.
Versions follow upstream with a fourth number: 4.2.4.0 is upstream 4.2.4. The fourth number grows
when the fork itself changes: 4.2.4.1 is upstream 4.2.4 with the
interpreter patch.