PHPackages                             0.0.0/composer-include-files - 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. 0.0.0/composer-include-files

ActiveComposer-plugin

0.0.0/composer-include-files
============================

Include files at a higher priority than autoload files. Useful for overriding Laravel helpers.

1.6.1(3y ago)14427.5k—6.4%39MITPHP

Since Dec 23Pushed 2y ago2 watchersCompare

[ Source](https://github.com/hopeseekr-contribs/composer-include-files)[ Packagist](https://packagist.org/packages/0.0.0/composer-include-files)[ Docs](https://github.com/funkjedi/composer-include-files)[ RSS](/packages/000-composer-include-files/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (2)Versions (7)Used By (9)

Composer - Include Files Plugin
===============================

[](#composer---include-files-plugin)

When using the Composer Autoloader if you need project files included prior to files autoloaded by any of your dependencies your out of luck. No longer!

Installation
------------

[](#installation)

```
composer require 0.0.0/composer-include-files
```

Usage
-----

[](#usage)

Just add the files you need included using `"include_files"` and they will be included prior to any files included by your dependencies.

```
// composer.json (project)
{
    "extra": {
        "include_files": [
            "/path/to/file/you/want/to/include",
            "/path/to/another/file/you/want/to/include"
        ]
    },
}
```

Composer v2.2 includes a new security feature:

*As of Composer 2.2.0, the allow-plugins option adds a layer of security allowing you to restrict which Composer plugins are able to execute code during a Composer run.*

So as well you need to add this library to the allowed plugins in your `composer.json` file like this:

```
{
    "config": {
        "allow-plugins": {
            "0.0.0/composer-include-files": true
        }
    }
}
```

Specific Use Case
-----------------

[](#specific-use-case)

A good example of where this is required is when overriding helpers provided by Laravel.

In the past simply modifying `bootstrap/autoload.php` to include helpers was sufficient. However new versions of PHPUnit include the Composer Autoloader prior to executing the PHPUnit bootstrap file. Consequently this method of overriding helpers is no longer viable as it will trigger a fatal error when your bootstrap file is included.

But now we can use *Composer - Include Files Plugin* to have Composer include the files in the necessary order.

```
// composer.json (project)
{
    "require": {
        "laravel/framework": "^5.2",
        "funkjedi/composer-include-files": "^1.0",
    },
    "extra": {
        "include_files": [
            "app/helpers.php"
        ]
    },
}
```

###  Health Score

42

—

FairBetter than 90% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity44

Moderate usage in the ecosystem

Community25

Small or concentrated contributor base

Maturity67

Established project with proven stability

 Bus Factor2

2 contributors hold 50%+ of commits

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

Total

5

Last Release

1431d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/3f3a2dd16766f6b03c330e65aaca9dfb97f1bbbb41c5e2af5681f58f670b7917?d=identicon)[hopeseekr](/maintainers/hopeseekr)

---

Top Contributors

[![funkjedi](https://avatars.githubusercontent.com/u/9314?v=4)](https://github.com/funkjedi "funkjedi (8 commits)")[![hopeseekr](https://avatars.githubusercontent.com/u/1125541?v=4)](https://github.com/hopeseekr "hopeseekr (5 commits)")[![boryn](https://avatars.githubusercontent.com/u/807297?v=4)](https://github.com/boryn "boryn (1 commits)")[![amanto](https://avatars.githubusercontent.com/u/11464230?v=4)](https://github.com/amanto "amanto (1 commits)")[![iWader](https://avatars.githubusercontent.com/u/2007548?v=4)](https://github.com/iWader "iWader (1 commits)")[![lloy0076](https://avatars.githubusercontent.com/u/1174532?v=4)](https://github.com/lloy0076 "lloy0076 (1 commits)")[![TerrePorter](https://avatars.githubusercontent.com/u/4440749?v=4)](https://github.com/TerrePorter "TerrePorter (1 commits)")

---

Tags

composerautoload

### Embed Badge

![Health badge](/badges/000-composer-include-files/health.svg)

```
[![Health](https://phpackages.com/badges/000-composer-include-files/health.svg)](https://phpackages.com/packages/000-composer-include-files)
```

###  Alternatives

[funkjedi/composer-include-files

Include files at a higher priority than autoload files.

1263.2M19](/packages/funkjedi-composer-include-files)[automattic/jetpack-autoloader

Creates a custom autoloader for a plugin or theme.

525.5M69](/packages/automattic-jetpack-autoloader)[mouf/classname-mapper

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

112.3M5](/packages/mouf-classname-mapper)[linkorb/autotune

Tune your autoloader

177.0k17](/packages/linkorb-autotune)

PHPackages © 2026

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