patcherly / php-connector
Patcherly detects bugs in real time in your app. It creates a customized AI patch, and once you approve it, backs up your code, fixes it & tests the patch for you. If anything is off, it rolls back the changes automatically, or you can always roll it back in a click. Website: https://patcherly.com
Requires
- php: >=7.4
- ext-curl: *
- ext-json: *
README
Patcherly PHP connector
Auto-detect and fix production errors in your PHP apps. Standalone agent for Laravel, Symfony, and custom PHP — pairs with your Patcherly account.
For a limited time: 30-day Pro trial — no credit card required. Cancel anytime. Sign up.
Prefer
@latest/ unpinned Composer installs, or pin from GitHub Releases.
Recommended install (universal installer)
One command downloads the PHP agent and launches OAuth pairing:
| Platform | Command |
|---|---|
| macOS / Linux / WSL | curl -sSL https://api.patcherly.com/install | sudo CONNECTOR_TYPE=php bash |
| Windows PowerShell | $env:CONNECTOR_TYPE = 'php'; irm "https://api.patcherly.com/install.ps1" | iex |
The CLI prints a verification URL and a short user code — open the URL, sign in, pick your target, and confirm. Credentials are saved to ~/.patcherly/credentials.json (or /root/.patcherly/ when run as root). Then start the agent — see After install.
Full installer options (paths, SKIP_LOGIN, older versions): Installing a connector.
Package install (Composer)
composer global require patcherly/php-connector patcherly login
Then run the long-lived agent (from the package tree or your install directory):
php patcherly_agent.php
Optional on quiet hosts: patcherly heartbeat from a daily cron / systemd timer so the connection stays fresh — see the PHP guide.
Pair later (or re-pair)
| Install method | Command |
|---|---|
| Universal installer (Linux/macOS) | sudo /opt/patcherly-connector/start.sh login |
| Universal installer (Windows) | & "$env:USERPROFILE\patcherly-connector\start.ps1" login |
| Composer | patcherly login |
On Linux, use
sudowhen the installer enabled the root-runpatcherly-connectorsystemd unit so credentials land in/root/.patcherly/.
After install
- Status and approvals: Targets in your Patcherly dashboard.
- Start and keep the agent running — on Linux with the universal installer:
systemctl start patcherly-connector. Otherwise runstart.sh/start.ps1, orphp patcherly_agent.php. Details: PHP connector guide. - Path exclusions and patch policies: Path rules for targets.
Test Mode (sample error)
- In the dashboard: Targets → your target → Test Mode ON (30-minute window).
- On the host:
patcherly send-test
# or: php patcherly_cli.php send-test
Samples are flagged and do not affect metrics or notifications. See Verify detection with send-test.
Context consent
Default is full. Change with:
patcherly context get patcherly context set full|minimal|off patcherly context upload
Env override: PATCHERLY_CONTEXT_CONSENT.
Security
OAuth pairing and per-token HMAC signing; fix payloads are verified before apply. Built-in redaction runs before ingest; you can add custom sanitizer patterns per target.
- Connectors overview
- PHP connector — HMAC
- Prompt injection protection
- Custom sanitizer patterns
- Post-apply restart safety
- Hardening: backup folders
Documentation & support
- PHP connector guide — install, systemd/cron, troubleshooting
- Connectors overview · All connectors
- Discord · Dashboard · Report a bug
License
Using the Patcherly service is governed by our Terms of Service and Acceptable Use policy. Official product support applies only to unmodified connector releases from our official sources.