Skip to content

Commit 0aa4d8d

Browse files
committed
Document AST comparison and version strategy
1 parent 65030d7 commit 0aa4d8d

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

TOLERANT_TODO.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,13 @@ Monitor RFCs merged into php-src and mirror the token/grammar changes, for examp
6060
- After implementing features, run Phan’s fallback parser tests (`./tests/run_test __FakeSelfFallbackTest`) to ensure parity.
6161
- Publish updated tags / commit references so Phan can subtree merge the changes into `third_party/phan-tolerant`.
6262

63+
### Verification Strategy
64+
65+
- **AST comparison**: use Phan’s `tools/dump_ast.php` (php-ast) to capture the expected AST for new syntax. Create or extend a tolerant-side helper (instantiate `Microsoft\PhpParser\Parser` and `var_dump` the node tree) so we can diff tolerant output against php-ast.
66+
- **PHP runtime selection**: on this dev machine we can run `sudo newphp 83`, `sudo newphp 84`, etc. to switch CLI versions; other environments may require Docker images, phpenv, asdf, etc. Record the PHP version used when regenerating fixtures.
67+
- **Leverage Phan fixtures**: pull feature-specific testcases (e.g. property hooks, asymmetric visibility) from `phan/tests/files/src` into tolerant’s parser tests to validate new constructs.
68+
- **Run tolerant PHPUnit suites**: keep `vendor/bin/phpunit --testsuite invariants,api` (with `zend.assertions=1`) as a fast regression check while iterating.
69+
6370
## Next Steps
6471

6572
1. Audit existing fixtures vs php-src 8.3/8.4 syntax to catalogue precise failures.

0 commit comments

Comments
 (0)