aksafan / composer-changelog
The composer plugin to show changelog after updating packages through composer
Installs: 44
Dependents: 0
Suggesters: 0
Security: 0
Stars: 2
Watchers: 2
Forks: 0
Open Issues: 0
Type:composer-plugin
Requires
- php: ^8.0
- composer-plugin-api: ^2.3
Requires (Dev)
- composer/composer: ^2.5.0
README
Composer Changelog
This is the composer plugin to show changelog after updating packages through composer.
Installation
The preferred way to install this extension is through composer.
To install, either run
$ php composer.phar require aksafan/composer-changelog
or add
"aksafan/composer-changelog": "*"
to the require
section of your composer.json
file.
Usage
To use this extension you need to create UPGRADE.md
file in the root directory of your project with text like the following for every new release you want to show messages about:
Upgrade from ComposerChangelog 1.0.2 ----------------------- * Initial comments for upgrading from v1.0.2 * Initial comments for upgrading from v1.0.2 Upgrade from ComposerChangelog 1.0.1 ----------------------- * Initial comments for upgrading from v1.0.1 * Initial comments for upgrading from v1.0.1 Upgrade from ComposerChangelog 1.0.0 ----------------------- * Initial comments for upgrading from v1.0.0 * Initial comments for upgrading from v1.0.0
There are 3 main parts of every release changelog message (separated with one empty space):
- the
Upgrade from
; - package name with one word
ComposerChangelog
; - version
1.0.0
(according to semver) from which you are updating.
And under this main message you can wrote down all necessary upgrade notes.
Note: The following upgrading instructions must be cumulative. In other words, if you want to upgrade from version A to version C and there is version B between A and C, you need to follow the instructions for both A and B.
Now, after updating package user will get in console message like:
composer-changelog$ composer update aksafan/composer-changelog ./composer.json has been updated Loading composer repositories with package information Updating dependencies (including require-dev) Package operations: 0 installs, 1 update, 0 removals - Updating aksafan/composer-changelog (1.0.0 => 1.0.3): Loading from cache Writing lock file Generating autoload files 1 package you are using is looking for funding. Use the `composer fund` command to find out more! Seems you have upgraded aksafan/composer-changelog from version 1.0.0 to 1.0.3. Please check the upgrade notes for possible incompatible changes and adjust your application code accordingly. Upgrade from ComposerChangelog 1.0.2 ----------------------- * Initial comments for upgrading from v1.0.2 * Initial comments for upgrading from v1.0.2 Upgrade from ComposerChangelog 1.0.1 ----------------------- * Initial comments for upgrading from v1.0.1 * Initial comments for upgrading from v1.0.1 Upgrade from ComposerChangelog 1.0.0 ----------------------- * Initial comments for upgrading from v1.0.0 * Initial comments for upgrading from v1.0.0 You can find the upgrade notes for all versions online at: https://github.com/aksafan/composer-changelog.git
Completed example can be found in the root directory of this package in UPGRADE.md
file.
License
Copyright 2020 by Anton Khainak.
Available under the MIT license.
Inspired by yii2-composer plugin.