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.
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, you should create a folder where all the changes will be stored in. This defaults to base_path('.changes')
.
The main functionality of this package consists of 5 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: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)
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. The template file can be found in resources/views/vendor/changelog/changelog.blade.php
.