PHPackages                             linkorb/autotune - 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. linkorb/autotune

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

linkorb/autotune
================

Tune your autoloader

v1.2.0(10y ago)177.0k—0%17MITPHPCI failing

Since Jan 17Pushed 10y ago3 watchersCompare

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

READMEChangelog (4)Dependencies (2)Versions (4)Used By (17)

AutoTune for Composer
=====================

[](#autotune-for-composer)

[![](https://camo.githubusercontent.com/353330892e656785148110a9ced977b7c2815ea37785e44e66db6762c804e9da/687474703a2f2f7570722e696f2f78706e6567642e6a7067)](https://camo.githubusercontent.com/353330892e656785148110a9ced977b7c2815ea37785e44e66db6762c804e9da/687474703a2f2f7570722e696f2f78706e6567642e6a7067)

Why use AutoTune for Composer?
------------------------------

[](#why-use-autotune-for-composer)

AutoTune is great for library developers.

Often you're working on a library and the calling application at the same time.

Before AutoTune there were 2 things you could do to test your library in your application:

1. Commit new version of the library for all changes, wait for packagist to re-index, and update your composer.lock in the calling application and test.
2. Add a "repository" to your calling application's composer.json (which you shouldn't forget to remove during commit, and put back after)

Both are cumbersome. This is where AutoTune comes in!

How does autotune work?
-----------------------

[](#how-does-autotune-work)

AutoTune expects to find a `autotune.json` in your calling application's path, next to composer.json. Here's an example:

```
{
    "autoload": {
        "psr-4": {
            "Monolog\\": "~/git/monolog/monolog/src/Monolog"
        }
    }
}
```

If this file is found, it will read the contents, and override any psr-0 or psr-4 namespaces with the local version as defined in your autotune.json file.

You can add the autotune.json to your `.gitignore` file, so that you can keep your code directory clean and in sync with the remote repository.

Making your own application ready for AutoTune
----------------------------------------------

[](#making-your-own-application-ready-for-autotune)

Making your own application ready for AutoTune takes 3 simple steps:

### 1. Include `linkorb/autotune` from Packagist in your composer.json file

[](#1-include-linkorbautotune-from-packagist-in-your-composerjson-file)

```
require-dev": {
   "linkorb/autotune": "~1.0"
}
```

Then run `composer update`

### 2. Initialize AutoTune in your app

[](#2-initialize-autotune-in-your-app)

Somewhere in your application, you're including `vendor/autoload.php`. Sometimes it's in `web/index.php` or `bin/console`. Find this location, and modify add these lines:

```
$loader = require_once __DIR__.'/../vendor/autoload.php';
if (class_exists('AutoTune\Tuner')) {
    \AutoTune\Tuner::init($loader);
}
```

Wrapping the call to `init` in the `class_exists` block ensures autotune is only used if AutoTune is installed in your (development) environment (installed from the require-dev block in composer.json). In production environments it won't be called if you install your dependencies with `--no-dev`)

### 3. Add an `autotune.json` file to your project root.

[](#3-add-an-autotunejson-file-to-your-project-root)

Example content:

```
{
    "autoload": {
        "psr-4": {
            "Monolog\\": "~/git/monolog/monolog/src/Monolog"
        }
    }
}
```

Ideally you'd add the `autotune.json` to your `.gitignore` file.

### Done

[](#done)

Whenever your application is doing something like the following, it will load the "local" version of a library, instead of the one in your `vendor/` directory.

```
$logger = new \Monolog\Logger('example');
```

So from now on, no changes are required to your main application. Everything is managed by your local `autotune.json` file.

License
-------

[](#license)

MIT (see [LICENSE.md](LICENSE.md))

Brought to you by the LinkORB Engineering team
----------------------------------------------

[](#brought-to-you-by-the-linkorb-engineering-team)

[![](https://camo.githubusercontent.com/62fb66b034de7ea7fca9fd9776424b5348daa76ef8622caf92c2f7622003e5ef/687474703a2f2f7777772e6c696e6b6f72622e636f6d2f642f6d6574612f74696572312f696d616765732f6c696e6b6f7262656e67696e656572696e672d6c6f676f2e706e67)](https://camo.githubusercontent.com/62fb66b034de7ea7fca9fd9776424b5348daa76ef8622caf92c2f7622003e5ef/687474703a2f2f7777772e6c696e6b6f72622e636f6d2f642f6d6574612f74696572312f696d616765732f6c696e6b6f7262656e67696e656572696e672d6c6f676f2e706e67)
Check out our other projects at [linkorb.com/engineering](http://www.linkorb.com/engineering).

Btw, we're hiring!

###  Health Score

36

—

LowBetter than 82% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity30

Limited adoption so far

Community18

Small or concentrated contributor base

Maturity65

Established project with proven stability

 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 ~8 days

Total

3

Last Release

3760d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/1db66b320db18b8036ea68211b7d8a39e7c6da97e6fd29f59a50380ebb69d0bb?d=identicon)[joostfaassen](/maintainers/joostfaassen)

---

Top Contributors

[![joostfaassen](https://avatars.githubusercontent.com/u/411113?v=4)](https://github.com/joostfaassen "joostfaassen (11 commits)")

---

Tags

composerautoloadautoloaderpackagisttune

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/linkorb-autotune/health.svg)

```
[![Health](https://phpackages.com/badges/linkorb-autotune/health.svg)](https://phpackages.com/packages/linkorb-autotune)
```

###  Alternatives

[automattic/jetpack-autoloader

Creates a custom autoloader for a plugin or theme.

525.5M69](/packages/automattic-jetpack-autoloader)[funkjedi/composer-include-files

Include files at a higher priority than autoload files.

1263.2M19](/packages/funkjedi-composer-include-files)[typo3/class-alias-loader

Amends the composer class loader to support class aliases to provide backwards compatibility for packages

4313.7M21](/packages/typo3-class-alias-loader)[mouf/classname-mapper

Provides a way to find in which PHP files a class will be looked upon.

112.3M5](/packages/mouf-classname-mapper)[cybercog/laravel-paket

Composer personal web interface. Manage Laravel dependencies without switching to command line!

1753.3k](/packages/cybercog-laravel-paket)[bnomei/autoloader-for-kirby

Helper to automatically load various Kirby extensions in a plugin

185.7k2](/packages/bnomei-autoloader-for-kirby)

PHPackages © 2026

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