PHPackages                             everton3x/autoload-files-plugin - 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. everton3x/autoload-files-plugin

ActiveComposer-plugin[Utility &amp; Helpers](/categories/utility)

everton3x/autoload-files-plugin
===============================

v1.0.0(1y ago)04PHP

Since May 22Pushed 1y ago1 watchersCompare

[ Source](https://github.com/everton3x/autoload-files-plugin)[ Packagist](https://packagist.org/packages/everton3x/autoload-files-plugin)[ RSS](/packages/everton3x-autoload-files-plugin/feed)WikiDiscussions main Synced today

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

Composer Autoload Files From Directories Plugin
===============================================

[](#composer-autoload-files-from-directories-plugin)

[![License](https://camo.githubusercontent.com/5502410c8cf63037beec183db879ddaada19d220c425a19e2dd3d6580c208010/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f65766572746f6e33782f6175746f6c6f61642d66696c65732d706c7567696e2e737667)](https://packagist.org/packages/everton3x/autoload-files-plugin)[![PHP Version](https://camo.githubusercontent.com/d278b7a2b47577e62bf18d99a99abeb11d4d78c37ab2ba28a3def62755c8797c/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f65766572746f6e33782f6175746f6c6f61642d66696c65732d706c7567696e)](https://php.net)

A Composer plugin to automatically load **all PHP files** from specified directories into the `autoload.files` configuration. Perfect for projects with helper files, legacy code, or configuration scripts.

---

✨ Features
----------

[](#-features)

- **Auto-include PHP files**: Automatically adds all `.php` files from configured directories to Composer's autoload.
- **Directory scanning**: Supports nested directories (recursive scanning).
- **Symfony Finder integration**: Efficient file discovery with the Symfony Finder component.
- **Composer event-driven**: Hooks into Composer's `pre-autoload-dump` event.

---

🚀 Installation
--------------

[](#-installation)

Install via Composer:

```
composer require everton3x/autoload-files-plugin`
```

🛠️ Usage
--------

[](#️-usage)

1. Configure Directories

Add your target directories to composer.json under the extra section:

```
{
    "extra": {
        "autoload-files-from": [
            "src/Helpers",
            "config/scripts",
            "legacy"
        ]
    }
}
```

2. Run Composer

Update and regenerate the autoloader:

```
composer update
composer dump-autoload
```

All PHP files in the specified directories will now be autoloaded!

🔍 How It Works
--------------

[](#-how-it-works)

The plugin:

Listens to Composer's pre-autoload-dump event

Scans all directories listed in extra.autoload-files-from

Adds every found .php file to autoload.files

Updates Composer's autoload configuration

**📂 Example Structure**

```
my-project/
├── src/
│   └── Helpers/
│       ├── StringHelper.php
│       └── ArrayHelper.php
├── config/
│   └── scripts/
│       └── bootstrap.php

```

**Result:**

```
// vendor/composer/autoload_files.php
return [
    // ...
    'a1b2c3' => $baseDir . '/src/Helpers/StringHelper.php',
    'd4e5f6' => $baseDir . '/src/Helpers/ArrayHelper.php',
    'g7h8i9' => $baseDir . '/config/scripts/bootstrap.php',
];
```

⚠️ Notes
--------

[](#️-notes)

Performance: Avoid very large directories (1000+ files) as this may slow down Composer operations.

Duplicates: Files already listed in autoload.files will not be added twice.

Alternatives: For class-based autoloading, prefer psr-4 or classmap.

🤝 Contributing
--------------

[](#-contributing)

Fork the repository

Create a feature branch (git checkout -b feature/awesome-feature)

Commit changes (git commit -am 'Add awesome feature')

Push to branch (git push origin feature/awesome-feature)

Open a Pull Request

📄 License
---------

[](#-license)

MIT License. See [LICENSE](LICENSE) for details.

Happy autoloading! 🎉 Created with ❤️ for PHP developers

###  Health Score

25

—

LowBetter than 35% of packages

Maintenance46

Moderate activity, may be stable

Popularity3

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity37

Early-stage or recently created project

 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

Unknown

Total

1

Last Release

407d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/582620?v=4)[Everton da Rosa](/maintainers/everton3x)[@everton3x](https://github.com/everton3x)

---

Top Contributors

[![everton3x](https://avatars.githubusercontent.com/u/582620?v=4)](https://github.com/everton3x "everton3x (5 commits)")

### Embed Badge

![Health badge](/badges/everton3x-autoload-files-plugin/health.svg)

```
[![Health](https://phpackages.com/badges/everton3x-autoload-files-plugin/health.svg)](https://phpackages.com/packages/everton3x-autoload-files-plugin)
```

###  Alternatives

[phpro/grumphp

A composer plugin that enables source code quality checks.

4.3k16.7M1.0k](/packages/phpro-grumphp)[symfony/stimulus-bundle

Integration with your Symfony app &amp; Stimulus!

17417.5M294](/packages/symfony-stimulus-bundle)[illuminate/session

The Illuminate Session package.

9939.3M849](/packages/illuminate-session)[friendsoftypo3/content-blocks

TYPO3 CMS Content Blocks - Content Types API | Define reusable components via YAML

103519.9k53](/packages/friendsoftypo3-content-blocks)[civicrm/civicrm-core

Open source constituent relationship management for non-profits, NGOs and advocacy organizations.

751291.4k43](/packages/civicrm-civicrm-core)[oro/platform

Business Application Platform (BAP)

645143.5k115](/packages/oro-platform)

PHPackages © 2026

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