What the agent does
The agent reads composer.json, composer.lock, symfony.lock and the CI workflows first. symfony/demo requires ^8 but sets extra.symfony.require to 8.1.*, so the minor stays at 8.1. The sandbox had no PHP, so it installs PHP 8.4.27 and Composer 2.11.1. On the untouched clone every check passes except composer audit, which reports 6 advisories in league/commonmark, symfony/expression-language, http-foundation, mime and yaml.
It runs composer update -W, which moves the Symfony packages to 8.1.10 and also bumps Twig, Doctrine, Monolog, PHPUnit, PHPStan and php-cs-fixer. PHPStan then fails on an unmatched ignore: phpstan-symfony 2.1.1 now sees Kernel::getAllowedEnvs() as used, so the agent deletes that 4-line entry from phpstan.dist.neon.
Start it with one API call
POST https://api.phoenix.so/o/{org}/sessions with this body:
{
"agent": "claude",
"input": "Upgrade the Symfony and Composer dependencies to the latest versions the existing PHP and Symfony constraints allow; do not raise the Symfony minor unless composer.json does. Read composer.json, composer.lock and symfony.lock first. Run composer audit, PHPUnit, PHPStan, php-cs-fixer and the console linters the CI runs before and after. Report any config change the new tool versions force, list every major version a transitive dependency crosses, and open a pull request with the output.",
"resources": [
{
"url": "https://github.com/your-org/your-app"
}
]
}- Get an API key. In the console, open Settings, then API keys, and create a key for your org. Send it in the Authorization header as a Bearer token.
- Send the request. POST the body in request.json to https://api.phoenix.so/o/{org}/sessions, with your repository as the resources URL. The run starts in its own cloud sandbox.
- Read what came back. Follow the run on its live stream or wait for the run.completed webhook, then read the result and its trajectory.
What comes back
Tried on symfony/demo at 8d2e2ef: 2 files changed, 1019 insertions(+), 723 deletions(-), all in composer.lock except 4 lines removed from phpstan.dist.neon. composer audit went from exit 1 to No security vulnerability advisories found., PHPUnit stayed at OK (53 tests, 120 assertions), and PHPStan, php-cs-fixer, composer validate, doctrine:schema:validate and the five console linters, lint:container among them, all exited 0.
Two decisions are left to the reviewer: whether the phpstan.dist.neon edit belongs in a dependencies-only change, and doctrine/collections jumping from 2.6.0 to 3.1.0 as a transitive major. Only PHP 8.4.27 was tested, not the PHP 8.5, macOS or Windows CI entries, and composer recipes:update was not run.
Run it on every security advisory alert
An automation with a webhook trigger runs this prompt when your scanner, or a small handler that receives your advisory feed, posts to its URL with the trigger's secret as Authorization: Bearer. The alert body, up to 64 KB, becomes the event text, so the agent starts knowing which package and CVE to look for in composer audit.
The use case this job follows, with its automation and trigger: Upgrade dependencies weekly.
Why run it on Rush?
The demo's lockfile was quietly vulnerable while every test passed; only composer audit showed it. The run also caught that a minor tooling bump can fail CI through config, an ignore entry phpstan-symfony no longer needed, and fixed it instead of loosening PHPStan.
Frequently asked questions
Did composer install change anything outside the lockfile?
Yes. It renamed the tracked .env.local.demo to .env.local and generated an untracked config/reference.php. The agent restored .env.local.demo and kept config/reference.php, which PHPStan's excludePaths expects; neither is in the diff.
Why is symfony.lock unchanged?
The agent did not run composer recipes:update. During the update Flex skipped the symfony/security-csrf recipe because every version of it conflicts with the installed packages, which the agent reported rather than forced.