PHPackages                             phpactor/path-finder - 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. phpactor/path-finder

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

phpactor/path-finder
====================

Utility for navigating to related source files

0.1.2(4y ago)145.8k↑80%11MITPHPPHP ^7.3 || ^8.0

Since Aug 24Pushed 4y ago1 watchersCompare

[ Source](https://github.com/phpactor/path-finder)[ Packagist](https://packagist.org/packages/phpactor/path-finder)[ RSS](/packages/phpactor-path-finder/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (5)Versions (6)Used By (1)

Path Finder
===========

[](#path-finder)

[![CI](https://github.com/phpactor/path-finder/workflows/CI/badge.svg)](https://github.com/phpactor/path-finder/workflows/CI/badge.svg)

Library to infer paths from a given path where paths share path segments.

For example, infer test paths for a given source file and vice-versa.

Usage
-----

[](#usage)

Path finder accepts a hash map of destinations and their schemas. The placeholders can be used to identify common parts of the path.

- The last placeholder is *greedy* it will match all path segments until the suffix.
- Preceding placeholders will only match until the first path separator.

Examples
--------

[](#examples)

### Navigating between test files

[](#navigating-between-test-files)

```
$pathFinder = PathFinder::fromDestinations([
    'source' => 'lib/.php',
    'unit_test' => 'tests/Unit/Test.php',
    'benchmark' => 'benchmarks/Bench.php',
]);

$targets = $pathFinder->targetsFor('lib/Acme/Post.php');

// [
//    'unit_test' => 'tests/Unit/Acme/PostTest.php',
//    'benchmark' => 'benchmarks/Acme/PostBench.php',
// ]
```

### Navigating between files organized by domain/module

[](#navigating-between-files-organized-by-domainmodule)

```
$pathFinder = PathFinder::fromDestinations([
    'source' => 'lib//.php',
    'unit_test' => 'tests//Unit/Test.php',
    'benchmark' => 'benchmarks//Bench.php',
]);

$targets = $pathFinder->targetsFor('lib/MyModule/Acme/Post.php');

// [
//    'unit_test' => 'tests/MyModule/Unit/Acme/PostTest.php',
//    'benchmark' => 'benchmarks/MyModule/Acme/PostBench.php',
// ]
```

Contributing
------------

[](#contributing)

This package is open source and welcomes contributions! Feel free to open a pull request on this repository.

Support
-------

[](#support)

- Create an issue on the main [Phpactor](https://github.com/phpactor/phpactor) repository.
- Join the `#phpactor` channel on the Slack [Symfony Devs](https://symfony.com/slack-invite) channel.

###  Health Score

33

—

LowBetter than 75% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity30

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity57

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 97.6% 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 ~398 days

Total

3

Last Release

1664d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/24ec7d5d6b7ea54007be5d7b4f43800381cc1e22929f7d2276fba30e497fdfa6?d=identicon)[dantleech](/maintainers/dantleech)

---

Top Contributors

[![dantleech](https://avatars.githubusercontent.com/u/530801?v=4)](https://github.com/dantleech "dantleech (40 commits)")[![wjzijderveld](https://avatars.githubusercontent.com/u/450201?v=4)](https://github.com/wjzijderveld "wjzijderveld (1 commits)")

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/phpactor-path-finder/health.svg)

```
[![Health](https://phpackages.com/badges/phpactor-path-finder/health.svg)](https://phpackages.com/packages/phpactor-path-finder)
```

###  Alternatives

[dantleech/fink

Checks Links

2266.3k2](/packages/dantleech-fink)[grasmash/composerize-drupal

Convert a non-Composer managed Drupal application into a Composer-managed application.

12819.4k1](/packages/grasmash-composerize-drupal)[puli/manager

Manages the puli.json file of a Puli project.

6847.9k3](/packages/puli-manager)[chenos/v8js-module-loader

1629.5k1](/packages/chenos-v8js-module-loader)

PHPackages © 2026

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