serethix/composer-command-log

Logs all executed commands in order of execution so you can re run them in case there is a merge conflict during a merge or rebase

Installs: 4

Dependents: 0

Suggesters: 0

Security: 0

Stars: 1

Watchers: 1

Forks: 0

Open Issues: 0

Type:composer-plugin

v1.0.4 2019-06-07 18:36 UTC

This package is auto-updated.

Last update: 2024-04-08 06:24:27 UTC


README

Are you also stressed by handling a lot of merge conflicts in your composer.json / composer.lock?

Try this composer plugin! It tracks all composer commands you execute on a project in a project file, so whenever there is a conflict with someone else's branch: Accept theirs or even better: check out their version and simply redo your changes on top of that!

Installation

composer require serethix/composer-command-log or if you want to run it globally run composer global require serethix/composer-command-log

In case you encounter an error with this plugin you can run every command with the --no-plugins option to temporarily disable all installed plugins.

Configuration

This Plugin can be configured either globally or on a per project base.

Currently you can specify these options:

{
  "require": {
    "serethix/composer-command-log": "^1.0"
  },
  "config": {
    "command-logfile": "composer-command.log",
    "command-to-log": [
      "require",
      "remove",
      "update",
      "upgrade",
      "run-script",
      "exec",
      "dumpautoload",
      "dump-autoload",
      "config"
    ]
  }
}

command-logfile specifies the name and path relative to your project directory.

By altering the command-to-log config you can add other commands to the list of commands you want to log and therefore be able to replay later.

This are also the default values and you only need to provide them in case you need a change on them.

Contributing

Pull requests for new features, bug fixes and suggestions are welcome.

Before creating new features have a look at the already planned features and WIP features.

Planned features

  • Utilizing the tag property that is saved together with the commands information
    • include/exclude filter for tags
  • Time based filter
  • Ask for confirmation on every command before executing (like git add -p modes)
    • accept all
    • yes
    • no
    • later
  • Flock on log file during processing.

WIP features

Project just started, so what are you thinking? ^^

License

MIT License

Thanks go to

Rafael Dohms for his blog post that inspired the creation of this composer plugin.