Skip to content

Dependencies: php-parser token map for PHP 8.2+ host runs #113

@PurHur

Description

@PurHur

Problem

Running bin/vm.php / bin/jit.php on the host PHP 8.2 fails before compilation:

Fatal error: Undefined constant "T_OPEN_TAG_WITH_ECHO" in vendor/nikic/php-parser/.../Lexer.php

script/ci-local.sh passes PHPUnit because the test harness may use a different code path, but interactive DevEx on modern PHP is broken without Docker.

Goal

Developers can run examples and the compiler CLI on PHP 8.1–8.3 without a custom Docker image.

Scope

  • Bump nikic/php-parser (and if needed ircmaxell/php-cfg) to versions whose token maps include PHP 8.x tokens
  • Run composer update with locked versions; document minimum PHP in README (Docs: Rewrite README feature list to match current compiler (2026) #48)
  • Smoke: php bin/vm.php -r 'echo 1;', php bin/vm.php -q name=World examples/001-SimpleWeb/example.php
  • Ensure script/ci-local.sh still green

Acceptance criteria

  • No fatal lexer errors on PHP 8.2 with project vendor/
  • README states supported host PHP range

Related

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions