markwalet / laravel-changelog
A Laravel package that prevents merge conflicts on your changelog file.
Fund package maintenance!
markwalet
www.paypal.me/markwalet
Installs: 39 653
Dependents: 0
Suggesters: 0
Security: 0
Stars: 15
Watchers: 5
Forks: 5
Open Issues: 8
Requires
- php: 8.*
- ext-dom: *
- ext-simplexml: *
- laravel/framework: ^10.0|^11.0
- markwalet/laravel-git-state: ~1.0
Requires (Dev)
- mockery/mockery: ~1.4
- orchestra/testbench: 8.*|9.*
- phpunit/phpunit: ^10.5
This package is auto-updated.
Last update: 2024-11-18 23:12:06 UTC
README
A Laravel package that prevents merge conflicts on your changelog file.
It enables you to manage your changes by storing them in separate files based on the branch you are currently in. This makes sure that you are not working in the same file as other developers in your team.
Installation
You can install this package with composer:
composer require markwalet/laravel-changelog
Laravel >=5.5 uses Package auto-discovery, so you don't have to register the service provider. If you want to register the service provider manually, add the following line to your config/app.php
file:
MarkWalet\Changelog\ChangelogServiceProvider::class
After installation, verify and change the config for your specific needs and run php artisan changelog:install
. This creates a folder where all the changes will be stored in. This defaults to base_path('.changes')
.
Usage
The main functionality of this package consists of 6 commands:
php artisan changelog:add {--type=} {--message=}
(Add a change to the current feature entry)php artisan changelog:list
(Show a list of changes for all versions)php artisan changelog:unreleased
(Show a list of unreleased changes)php artisan changelog:current
(Show a list of unreleased changes for your current branch)php artisan changelog:release
(Move all unreleased changes to a new version)php artisan changelog:generate {--dry-run} {--path=}
(Generate a markdown file based on your changes. The path option can be empty)
Configuration
The default configuration is defined in changelog.php
. If you want to edit this file you can copy it to your config folder by using the following command:
php artisan vendor:publish --provider="MarkWalet\Changelog\ChangelogServiceProvider"
When you publish these vendor assets, you can also edit the default template that is used when generating the changelog markdown file. The template file can be found in resources/views/vendor/changelog/changelog.blade.php
.