Add tokenizer_data_gen to build process#6723
Conversation
85971d1 to
4b7510f
Compare
Codecov Report
@@ Coverage Diff @@
## master #6723 +/- ##
=======================================
Coverage 72.16% 72.16%
=======================================
Files 892 892
Lines 317896 317896
=======================================
Hits 229395 229395
Misses 88501 88501 Continue to review full report at Codecov.
|
4b7510f to
b424cd6
Compare
|
I think we need to add detection of a PHP binary on the autoconf side. Using PHP_EXECUTABLE for this purpose doesn't seem right -- it might not yet exist, or be broken. We should be using system PHP, not the one we're building. |
That's a good point. I wonder if we should also rethink using the freshly built PHP binary for the stubs then. |
7.3 is in security mode, so no. Might still be good for PHP 7.4, though. |
|
Thinking about it, it's probably unnecessary for 7.4/8.0 as patches will almost certainly not introduce changes to the grammar. |
|
Please rebase over fa9e2b3 and use |
|
|
||
| Please, generate the PHP parser files by scripts/dev/genfiles | ||
| or by running the ./configure build step. | ||
| ERROR); |
There was a problem hiding this comment.
Remove indentation here to keep this compatible with PHP < 7.3. We should probably bump our PHP version requirement, but this heredoc block probably isn't the right reason to do it :)
|
Thanks Nikita! |
It happens on occasion that people forget to run
tokenizer_data_gen.shwhen updating the grammar. So this PR migrates the script to PHP and runs it automatically whenzend_language_parser.yis changed.Open questions
php-src/build/Makefile.global
Line 152 in dda0cea
Advantages
Disadvantages
Feedback appreciated.