fleetlint Policy for a fleet of repositories
v0.6
Getting started

deps/forks-documented/php

Forked or patched dependencies are documented

Implements deps/forks-documented for php.

Severityinfo
Tiers1, 2
Stacksphp
Scoperoot
Kindexpr
Sourcelibrary v0.3.1
Selected byfleetlint-recommended@v0.3.1

Requirement

A VCS repository in composer.json (a fork served instead of Packagist) is documented in FORKS.md or a Forks section (composer.json has no comments).

Why

A fork without a note outlives the reason for it; the next upgrade either drops the fix or keeps the fork forever.

Applies when

grep("composer.json", r'"type"\s*:\s*"(vcs|git|github)"').size() > 0

Check

For each item in:

grep("composer.json", r'"type"\s*:\s*"(vcs|git|github)"')
exists("FORKS.md") || exists("docs/FORKS.md") || exists("docs/forks.md") || grep("README.md", r'^#+ .*\b(forks?|vendored|patched|patches)\b').size() > 0 || grep("docs/**/*.md", r'^#+ .*\b(forks?|vendored|patched|patches)\b').size() > 0

Fix

Add docs/FORKS.md listing each forked or patched dependency with upstream, base version, the change and why, or comment each line.

Agent instruction: Document each forked or patched dependency (upstream, base version, change, reason) in docs/FORKS.md; ask the user for the reason where the history does not say.

See: https://fleetlint.org/baseline/#dependencies, https://fleetlint.org/stacks/#php


Generated by fleetlint docs from catalog v0.3.1.