Add PHPUnit test execution and Composer package management#2325
Merged
hiroshinishio merged 1 commit intomainfrom Feb 25, 2026
Merged
Add PHPUnit test execution and Composer package management#2325hiroshinishio merged 1 commit intomainfrom
hiroshinishio merged 1 commit intomainfrom
Conversation
…ojects PHP projects like SpiderPlus had no test execution support - the agent couldn't catch PHPUnit test failures before pushing, leading to CI failures requiring extra iterations. This adds the full PHP test pipeline following the same pattern as Jest/Node. Key changes: - PHPUnit test runner (run_phpunit_test.py) with deprecation warning suppression - Composer package management via CodeBuild (ensure_php_packages.py) - vendor.tar.gz extraction alongside node_modules.tar.gz - Config template copying (.default/.example/.sample -> target) in prepare_repo_for_work - PHP CLI + Composer added to Lambda Docker image and CodeBuild buildspec - Inline reuse-check logic in both ensure_node_packages and ensure_php_packages - Integration into verify_task_is_complete and verify_task_is_ready
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
verify_task_is_completeandverify_task_is_ready, catching test failures before pushing. Suppresses PHP deprecation warnings for older codebases running on PHP 8.x.composer.json/composer.lock, triggers CodeBuild to install dependencies, cachesvendor.tar.gzon EFS alongsidenode_modules.tar.gz..default/.example/.sampleconfig templates (e.g.,preference.inc.default→preference.inc) during repo preparation, preventing test failures on fresh clones.composervs npm/yarn/pnpm.ensure_node_packagesandensure_php_packages, removed unnecessary double-checked locking pattern.Social Media Post (GitAuto)
GitAuto can now run PHPUnit tests before pushing code. PHP projects had no test execution support - the agent would generate changes, push, then CI would fail, requiring another iteration. Now it detects vendor/bin/phpunit, runs tests locally, and fixes failures before they reach CI. Same pattern we use for Jest, extended to PHP with Composer dependency management via CodeBuild.
Social Media Post (Wes)
Took the Jest test runner pattern we already had and extended it to PHP. The frustrating part wasn't the runner itself - it was discovering that every fresh clone of our customer's PHP repo failed tests because a config template (preference.inc.default) needed to be copied first. Turns out this .default/.example/.sample pattern is everywhere across ecosystems. Built a generic copier that handles it for all projects now.