Check if all authors of a particular file are mentioned in the copyright header.

1.4.3 2019-03-05 16:29 UTC


Version Stable Build Status Upstream Build Status License Downloads

Validate the author information within PHP files, composer.json, bower.json or packages.json.

This is useful to ensure that all authors (from git history) mentioned in all PHP files, the composer.json, bower.json and packages.json.


Add to your composer.json in the require-dev section:

"phpcq/author-validation": "~1.0"

Call the binary:


Optionally pass a path to check:

./vendor/bin/check-author.php /path/to/some/repository/also/with/subdir


Optionally you can pass the path to a config file (defaults to .check-author.yml) which shall be used.

# Example .check-author.yml

# Map multiple authors to a single one (aliasing of contributors).
  # original: alias
  "John Doe <>": "John Doe <>"
  # or original: [multiple aliases]
  "John Doe <>": ["John Doe <>", "Acme Inc <>"]
  # or
  "John Doe <>":
    - "John Doe <>"
    - "Acme Inc <>"

# Ignore commits from these authors (equivalent to cmd line parameter --ignore=...)
  - Build Bot <>

# If present, scan only these and not the whole base dir (equivalent to cmd line arguments).
# Values must either be absolute paths or relative to the current directory.
  - src

# Paths to exclude from scanning (equivalent to cmd line parameter --exclude=...)
  - Foo.php
  - /tests/*
  - */languages

# Enforce copy-left author for certain files.
  "John Doe <>": "/library"
  # or
  "John Doe <>": ["/library", "File.php"]
  # or
  "John Doe <>":
    - "File.php"
# Add additional author metadata. It is used by some comparator handlers when outputting diff format.
# Author metadata of the config file is prioritized over extracted metadata from the files.

  "John Doe <>":
    role:     "Translator"
    homepage: "http:/"