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

Php Conventional Changelog Laravel Package

marcocesarato/php-conventional-changelog

Generate changelogs and release notes automatically from git history using Conventional Commits and SemVer. CLI tool (composer-friendly) outputs customizable Markdown changelog files and helps streamline versioning and releases for PHP projects.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

Architecture Fit

  • Laravel Compatibility: The package is PHP-based and integrates seamlessly with Laravel, as it leverages Composer and Git operations—core Laravel dependencies. No Laravel-specific dependencies exist, ensuring broad compatibility.
  • Conventional Commits Alignment: Aligns with Laravel’s existing CI/CD and release workflows (e.g., GitHub Actions, GitLab CI) that often use semantic versioning and changelog automation.
  • Modularity: The package’s configuration-driven approach allows customization without modifying core Laravel logic, adhering to Laravel’s principle of modularity.

Integration Feasibility

  • Low-Coupling: Can be integrated as a dev dependency without affecting production code. Ideal for release pipelines or CI/CD hooks.
  • CLI/Script Integration: Supports Laravel’s composer.json scripts (e.g., post-release), enabling automation in:
    • Release workflows (e.g., php artisan release → trigger changelog).
    • CI pipelines (e.g., GitHub Actions for auto-generated changelogs).
  • Git Dependency: Requires Git, which Laravel projects already use, but may need explicit setup in CI environments.

Technical Risk

  • Versioning Conflicts: Risk of misaligned version bumps if Laravel’s composer.json or package.json is manually edited post-integration. Mitigate via:
    • Pre-release hooks to validate versions.
    • Configuration to skip version bumps (skipBump: true).
  • Commit Hooks: May conflict with Laravel’s existing Git hooks (e.g., pre-commit). Configure skipVerify: true or adjust hooks.
  • GPG-Signed Tags: Requires GPG setup for signed tags, adding complexity. Document as optional in release guides.
  • Performance: Parsing large Git histories (--history) could slow down CI. Test with project-specific commit volumes.

Key Questions

  1. Release Workflow:
    • How does this integrate with Laravel’s existing release process (e.g., Forge, Envoyer, or custom scripts)?
    • Should it replace or complement tools like laravel-zero or deployer for versioning?
  2. Configuration Management:
    • Where to store .changelog config (e.g., repo root vs. Laravel’s config/)? Impact on deployments?
  3. CI/CD:
    • How to trigger changelog generation in CI (e.g., on tag push vs. manual release)?
    • Should it run in parallel with other release tasks (e.g., artifact builds)?
  4. Customization:
    • Need to override default commit types (e.g., add laravel: scope)? How to maintain consistency across teams?
  5. Fallbacks:
    • Plan for cases where Git history is unavailable (e.g., bare repos) or commits lack conventional formats.

Integration Approach

Stack Fit

  • Laravel Ecosystem:
    • Composer: Native integration via composer require --dev.
    • Artisan: Extend with a custom command (e.g., php artisan changelog) to wrap the package’s CLI.
    • Service Providers: Optional provider to bind config (e.g., .changelog path) to Laravel’s config system.
  • CI/CD:
    • GitHub Actions: Add step to run composer changelog on tag pushes.
    • GitLab CI: Use before_script to install dependencies and trigger changelog generation.
  • Monorepos: If using Laravel in a monorepo, configure root in .changelog to target the correct package.

Migration Path

  1. Pilot Phase:
    • Install in a non-production Laravel project to test:
      • Changelog generation (composer changelog).
      • Version bumping (--commit flag).
      • Custom config (e.g., types, ignorePatterns).
  2. CI Integration:
    • Add to CI workflow (e.g., GitHub Actions):
      - name: Generate Changelog
        run: composer changelog --commit --annotate-tag
      
  3. Artisan Wrapper (Optional):
    • Create a custom Artisan command to standardize usage:
      // app/Console/Commands/GenerateChangelog.php
      public function handle()
      {
          $this->call('vendor:publish', ['--provider' => 'ConventionalChangelogServiceProvider']);
          Artisan::call('changelog', ['--commit' => true]);
      }
      
  4. Documentation:
    • Add to Laravel’s CONTRIBUTING.md or internal release guides.
    • Example: "To release, run php artisan changelog --major."

Compatibility

  • Laravel Versions: Supports PHP 7.1.3+, so compatible with Laravel 5.8+ (LTS).
  • Git Providers: Test with GitHub, GitLab, and Bitbucket (customize issueUrlFormat if needed).
  • Monorepo Tools: If using Lumen or sub-packages, configure root to point to the correct directory.

Sequencing

  1. Pre-Release:
    • Developers write conventional commits (e.g., feat: add auth middleware).
    • CI validates commit messages (e.g., via commitlint).
  2. Release Trigger:
    • Manual: Run composer changelog --minor --commit.
    • Automated: CI detects tag push → runs changelog generation.
  3. Post-Release:
    • Changelog merged to main.
    • Tag pushed to remote (annotated/signed if configured).

Operational Impact

Maintenance

  • Dependency Updates:
    • Monitor for updates to marcocesarato/php-conventional-changelog (check for breaking changes in CHANGELOG.md).
    • Laravel’s Composer updates may indirectly affect Git operations (e.g., PHP version bumps).
  • Configuration Drift:
    • Centralize .changelog config in a shared template (e.g., Laravel’s package.json or a config repo).
    • Use Laravel’s config/caching to preload settings if dynamically loaded.
  • Deprecations:
    • Track deprecations in the package (e.g., PHP 7.1 EOL in 2021) and plan upgrades.

Support

  • Developer Onboarding:
    • Train teams on:
      • Writing conventional commits (e.g., fix: resolve XSS in Blade).
      • Running composer changelog locally before PRs.
    • Provide a cheat sheet for common flags (e.g., --patch, --history).
  • Troubleshooting:
    • Common issues:
      • "No commits found": Verify Git history and --from-tag.
      • "Version bump failed": Check composer.json permissions or skipBump.
      • "GPG errors": Document GPG setup steps for signed tags.
    • Log errors from the package’s CLI output for debugging.

Scaling

  • Performance:
    • Large Repos: Use --from-tag to limit history scope in CI.
    • Parallelization: Run changelog generation in CI alongside other tasks (e.g., tests) but avoid Git operations in parallel.
  • Multi-Repo:
    • For Laravel + microservices, generate changelogs per repo or aggregate with a tool like changesets.
  • Customization Limits:
    • Avoid over-customizing .changelog (e.g., complex preset rules) to reduce maintenance overhead.

Failure Modes

Failure Scenario Impact Mitigation
Git history corrupted Changelog generation fails Backup tags/commits; use --from-tag to recover.
Non-conventional commits Incomplete changelog Enforce commitlint in CI; document required formats.
CI timeout Changelog not generated Optimize Git fetch depth or run in a separate job.
Permission denied (composer.json) Version bump fails Run CI with elevated permissions or use skipBump.
GPG setup missing Signed tags fail Make signed tags optional; document setup.
Config file syntax errors Changelog generation fails Validate .changelog via PHP linting in CI.

Ramp-Up

  • Phase 1: Pilot (2 weeks)
    • Integrate in a single Laravel project.
    • Test with 3–5 releases to validate workflow.
  • Phase 2: CI Integration (1 week)
    • Add to GitHub Actions/GitLab CI.
    • Monitor for flaky builds.
  • Phase 3: Team Adoption (Ongoing)
    • Train teams on commit conventions.
    • Gather feedback to refine .changelog config.
  • Metrics to Track:
    • % of releases with auto-generated changelogs.
    • Time saved per release (e.g., from 30 mins to 5 mins).
    • Number of manual changelog edits (goal: <5%).
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.
davejamesmiller/laravel-breadcrumbs
artisanry/parsedown
christhompsontldr/phpsdk
enqueue/dsn
bunny/bunny
enqueue/test
enqueue/null
enqueue/amqp-tools
milesj/emojibase
bower-asset/punycode
bower-asset/inputmask
bower-asset/jquery
bower-asset/yii2-pjax
laravel/nova
spatie/laravel-mailcoach
spatie/laravel-superseeder
laravel/liferaft
nst/json-test-suite
danielmiessler/sec-lists
jackalope/jackalope-transport