Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Conventional Commits Laravel Package

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.

View on GitHub
Deep Wiki
Context7

Getting Started

  1. Install via Composer: composer require ramsey/conventional-commits
  2. Import the core classes: ConventionalCommit and CommitParser
  3. Parse a commit message:
    $parser = new CommitParser();
    $commit = $parser->parse('feat(auth): add JWT token support');
    echo $commit->getType(); // 'feat'
    echo $commit->getDescription(); // 'add JWT token support'
    
  4. Validate using CommitValidator to ensure adherence to spec before merging

Implementation Patterns

  • CI/CD Validation: Run commits through CommitValidator in pre-commit hooks or GitHub Actions workflows to block non-compliant messages
  • Changelog Generation: Extract metadata (type, scope, breaking changes) to auto-generate changelogs using tools like standard-version or custom scripts
  • Commit Linting: Integrate with Git hooks (e.g., husky + PHP lint script) to enforce team standards
  • Custom Tooling: Use parsed footers (e.g., Closes #123, Fixes #456) to auto-link issues or trigger downstream jobs
  • Release Automation: Detect BREAKING CHANGE footers to bump major version automatically via semver logic

Gotchas and Tips

  • Footers are key: Breaking changes must be in a BREAKING CHANGE footer (not just in the description), or they won’t be detected
  • Line endings matter: The parser expects \n-separated lines; ensure CI environments normalize commit messages
  • Validation is strict by default: Use CommitParser::withStrict(false) if handling legacy or relaxed formats
  • Extensibility: Extend CommitParser or implement custom footer parsers for project-specific semantics (e.g., Team: backend)
  • Debug tip: Call toArray() or __toString() on a parsed commit for inspection during troubleshooting
  • Performance: Reuse CommitParser instances—avoid recreating them per commit in loops or CI runs
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
hexters/coinpayment
rjcodes/rjcms
act-training/laravel-permissions-manager
alimarchal/laravel-chart-of-accounts
babenkoivan/elastic-scout-driver
mkwebdesign/filament-watchdog-v5
renatomarinho/laravel-page-speed
zedmagdy/filament-business-hours
renatovdemoura/blade-elements-ui
devgeek/beacon-admin
benjamin-rqt/data-watcher-bundle
atriumphp/atrium
sandermuller/package-boost-laravel
sandermuller/boost-skills
redaxo/core
yusufgenc/filament-api-forge
l3aro/rating-star-for-filament
leek/filament-subtenant-scope
anil/file-picker
broqit/fields-ai