Skip to main content

Getting started with Vibgrate for PHP projects

Scan a Composer-based PHP project for upgrade drift with the Vibgrate CLI, understand the DriftScore, and create a baseline to track drift over time.

Vibgrate Docs

Vibgrate Help

Vibgrate scans Composer-based PHP projects for upgrade drift alongside many other ecosystems. This guide gets a PHP developer from install to first scan and baseline.

Prerequisites

  • The Vibgrate CLI installed (or use npx @vibgrate/cli scan)
  • A PHP project with composer.json and ideally composer.lock

If you have not installed yet, see install the Vibgrate CLI on macOS and Linux or install on Windows.

Run your first scan

From the project root, run the bare command to scan the current directory:

vg

Vibgrate reads composer.json and composer.lock, analyzes your dependencies, and prints a DriftScore from 0 to 100 plus the findings. A higher score means more upgrade drift to work through.

Initialize project config

Store settings in the repository:

vg init

This creates the .vibgrate directory and config file.

Establish a baseline

Capture the current state so future scans report only what changed:

vg baseline

Compare later scans against it:

vg scan --baseline .vibgrate/baseline.json

Output for pipelines

Generate structured output for CI:

vg scan --format sarif

Troubleshooting

  • Missing lockfile — run composer install to produce composer.lock for precise version resolution.
  • Monorepo or multiple apps — scan each app directory that has its own composer.json.

Related

See understanding your first DriftScore and drift baselines. You can also serve version-correct PHP library docs to your AI assistant with Vibgrate AI Context via vg serve.