Conversation
- Add _analyze_properties() and complexity() to PhpEntity for AST-based code property tagging (control flow, operations, expressions) - Create PHP procedural modifiers module (reuses JavaScript modifiers since PHP shares tree-sitter node types) - Register .php extension in MAP_EXT_TO_MODIFIERS - Add 5 new PHP repo profiles: Guzzle, Monolog, PHP-Parser, Carbon, PHPMailer - Extract reusable parse_log_phpunit_testdox() and parse_log_phpunit_verbose() log parser functions
for more information, see https://pre-commit.ci
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e9ce293b7f
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
- Replace JS modifier reuse with 14 PHP-specific tree-sitter modifiers (8 operation, 2 control flow, 4 remove) using PHP grammar - Add php_parse() helper to handle PHP's <?php tag requirement - Implement get_test_files() for PhpProfile with testdox name mapping - Remove PHPMailer, Carbon, and PHP-Parser profiles (keep dbal, guzzle, monolog) - Add 59 tests (33 procedural modifier + 26 profile/log parser)
for more information, see https://pre-commit.ci
- Fix anonymous_function node type (renamed in tree-sitter-php) - Replace invalid ||= swap with .= for ??= operator - Skip if/elseif/else chains to avoid dropping elseif branches - Remove arrow_function from shuffle targets (single expression) - Add nullsafe_member_call_expression to argument swap detection - Improve test assertions for if-else invert and shuffle modifiers - Add parametrized examples for member and scoped call expressions - Add method shuffle test case
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
|
Hi @akhatua2, Merged. Thanks! A heads-up that there may be a potential issue with testdox class header output matching if a test is annotated with a testdox description containing parentheses: /**
* @testdox Returns foo (when bar is set)
*/This doesn't seem to be a common pattern on GitHub though so I thought it better to merge the current changes as-is. If you want to re-visit we can have a separate follow-up PR. Thanks again! |
Summary
get_test_files()for PhpProfile with PHPUnit testdox name-to-file mappingValidation
Tested on 2 PHP repos and reached a pass% of 35.4% on average:
func_pm_ternary_swapandfunc_pm_ctrl_invert_ifare the most productive modifiers in PHP. Operator and control flow mutations have higher pass rates since they introduce subtle behavioral bugs without breaking syntax.Mirror & Task Branches
Task instance branches have been pushed to the mirror repos with the standard 2-commit structure (Initial commit + Bug Patch + Remove F2P Tests).
Example: swesmith/Seldaek__monolog.6db20ca0 — func_pm_arg_swap__zwytedjj