PHPackages                             ludofleury/github-annotation-path-mapper - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. ludofleury/github-annotation-path-mapper

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

ludofleury/github-annotation-path-mapper
========================================

Prefix github annotation file location from github action workflow command

v1.1.0(5y ago)131MITPHPPHP ^7.4 || ^8.0

Since Nov 21Pushed 5y ago1 watchersCompare

[ Source](https://github.com/ludofleury/github-annotation-path-mapper)[ Packagist](https://packagist.org/packages/ludofleury/github-annotation-path-mapper)[ RSS](/packages/ludofleury-github-annotation-path-mapper/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (1)Dependencies (1)Versions (3)Used By (0)

[![ci](https://github.com/ludofleury/github-annotation-path-mapper/workflows/ci/badge.svg?branch=main)](https://github.com/ludofleury/github-annotation-path-mapper/workflows/ci/badge.svg?branch=main)[![Latest Stable Version](https://camo.githubusercontent.com/385058c1970f2d9b233b27552f24f3db78abdee3c25d5a7f7080c32399fa3380/68747470733a2f2f706f7365722e707567782e6f72672f6c75646f666c657572792f6769746875622d616e6e6f746174696f6e2d706174682d6d61707065722f76)](//packagist.org/packages/ludofleury/github-annotation-path-mapper)[![Total Downloads](https://camo.githubusercontent.com/a7b3b0ca2f52241409aae48092e29286c7ade5fafbedf5227eb94b1d110191b6/68747470733a2f2f706f7365722e707567782e6f72672f6c75646f666c657572792f6769746875622d616e6e6f746174696f6e2d706174682d6d61707065722f646f776e6c6f616473)](//packagist.org/packages/ludofleury/github-annotation-path-mapper)[![License](https://camo.githubusercontent.com/72ce631f893228b2822be8b28f6acf7f81f73111f26671437bd18c86750ca229/68747470733a2f2f706f7365722e707567782e6f72672f6c75646f666c657572792f6769746875622d616e6e6f746174696f6e2d706174682d6d61707065722f6c6963656e7365)](//packagist.org/packages/ludofleury/github-annotation-path-mapper)

Github annotation path mapper
=============================

[](#github-annotation-path-mapper)

**TL;DR: Basically `| sed ""` in php with sigterm 2 if a replacement occurs.**

Prefix github annotation file location from github action workflow command.

Typically, if you are running your github action in a docker container, and the directory structure does not match your git repository.

Coded in PHP for PHP projects.

Example use case
----------------

[](#example-use-case)

- git repository base path: **backend/src/**
- docker base path: **src**

Considering a git repository like this:

- .git/
- frontend/
- backend/composer.json
- backend/src/File1.php
- backend/src/File2.php
- backend/vendors/\*
- backend/tests/\*

if you run phpstan in this kind of docker container, the *STDOUT* will be `src/File1.php` and github annotation will fail to match the path.

```
docker run --volume backend/:/app php /app/vendors/bin/phpstan analyse --error-format=github

# ::error file=src/File1.php,line=10,col=15::Something went wrong
```

⛑️ But piping to this tiny lib will adjust the *STDOUT* to `backend/src/File1.php`

```
phpstan analyse --error-format=github | vendor/bin/github-annotation-mappe backend/

::error file=backend/src/File1.php,line=10,col=15::Something went wrong
```

And github annotation will finally appear inlined with your code in your PR! [![github pull request with annotation](./example.png)](./example.png)

Setup
-----

[](#setup)

```
$ composer require --dev ludofleury/github-annotation-path-mapper
```

or git clone, copy paste, whatever.

Usage
-----

[](#usage)

Simply pipe to the bin mapper

```
$ my-command-to-run | vendor/bin/github-annotation-mapper [path prefix with trailling slash]

```

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity59

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~10 days

Total

2

Last Release

1985d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/e893ccc6f340d86cfafd86f52bb79a424bcf85377d88026eb7924a26ad8d3636?d=identicon)[ludofleury](/maintainers/ludofleury)

---

Top Contributors

[![ludofleury](https://avatars.githubusercontent.com/u/187038?v=4)](https://github.com/ludofleury "ludofleury (3 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/ludofleury-github-annotation-path-mapper/health.svg)

```
[![Health](https://phpackages.com/badges/ludofleury-github-annotation-path-mapper/health.svg)](https://phpackages.com/packages/ludofleury-github-annotation-path-mapper)
```

###  Alternatives

[garveen/laravoole

Get 10x performance for Laravel on Swoole or Workerman

8834.9k](/packages/garveen-laravoole)[aneeskhan47/laravel-pagination-merge

Merge multiple laravel paginate instances

1823.4k](/packages/aneeskhan47-laravel-pagination-merge)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
