Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix constant check #10

Merged
merged 1 commit into from
Jan 2, 2025
Merged

Fix constant check #10

merged 1 commit into from
Jan 2, 2025

Conversation

johannescoetzee
Copy link
Collaborator

This PR fixes the missing files issue in the vavkamil/dvwp repo. I couldn't find a minimal example to reproduce the issue, but manually verified that the ast is non-empty for these files when using this version of php-parser with joern. Logs are shown for one of the files below, but the other looks the same (apart from numbers)

With the fix

❯ ./joern-cli/frontends/php2cpg/php2cpg --php-parser-bin ~/code/PHP-Parser/bin/php-parse ~/path/to/dvwp/otherz/search-replace-db/srdb.class.php
...
[INFO ] Start of pass: io.joern.php2cpg.passes.AstCreationPass
[INFO ] Pass io.joern.php2cpg.passes.AstCreationPass completed in 580 ms (7% on mutations). 7826 + 0 changes committed from 1 parts.

Without the fix

❯ ./joern-cli/frontends/php2cpg/php2cpg ~/path/to/dvwp/otherz/search-replace-db/srdb.class.php
...
[INFO ] Start of pass: io.joern.php2cpg.passes.AstCreationPass
[INFO ] Pass io.joern.php2cpg.passes.AstCreationPass completed in 102 ms (1% on mutations). 0 + 0 changes committed from 1 parts.

@johannescoetzee johannescoetzee merged commit 79cad44 into 4.x Jan 2, 2025
8 checks passed
@johannescoetzee johannescoetzee deleted the johannes/const-check-fix branch January 2, 2025 14:07
@mpollmeier
Copy link

note that the php parser version is configured in both joern and x2cpg-internal (for now), so please update it in both places - thank you!

@johannescoetzee
Copy link
Collaborator Author

Ah, thanks for the heads-up!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants