ramsey/conventional-commits
PHP library for parsing and working with Conventional Commits. Read commit messages into structured objects, validate format, and extract type/scope/description, body, footers, and breaking changes—useful for changelogs, release automation, and tooling.
composer require ramsey/conventional-commitsConventionalCommit and CommitParser$parser = new CommitParser();
$commit = $parser->parse('feat(auth): add JWT token support');
echo $commit->getType(); // 'feat'
echo $commit->getDescription(); // 'add JWT token support'
CommitValidator to ensure adherence to spec before mergingCommitValidator in pre-commit hooks or GitHub Actions workflows to block non-compliant messagesstandard-version or custom scriptshusky + PHP lint script) to enforce team standardsCloses #123, Fixes #456) to auto-link issues or trigger downstream jobsBREAKING CHANGE footers to bump major version automatically via semver logicBREAKING CHANGE footer (not just in the description), or they won’t be detected\n-separated lines; ensure CI environments normalize commit messagesCommitParser::withStrict(false) if handling legacy or relaxed formatsCommitParser or implement custom footer parsers for project-specific semantics (e.g., Team: backend)toArray() or __toString() on a parsed commit for inspection during troubleshootingCommitParser instances—avoid recreating them per commit in loops or CI runsHow can I help you explore Laravel packages today?