PHPackages                             zorca/composer-exclude-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. [Utility &amp; Helpers](/categories/utility)
4. /
5. zorca/composer-exclude-files

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

zorca/composer-exclude-files
============================

Exclude files from autoload\_files.php

v1.0.1(7y ago)05MITPHP

Since Jan 7Pushed 7y agoCompare

[ Source](https://github.com/zorca/composer-plugin-exclude-files)[ Packagist](https://packagist.org/packages/zorca/composer-exclude-files)[ RSS](/packages/zorca-composer-exclude-files/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (5)Versions (4)Used By (0)

Exclude PHP files from Composer
===============================

[](#exclude-php-files-from-composer)

[![Build Status](https://camo.githubusercontent.com/6938890cae4406d0936a174946260c2b3bc7c8bfa98051cfcbe169456e2d52a3/68747470733a2f2f7472617669732d63692e6f72672f6d6361736b696c6c2f636f6d706f7365722d706c7567696e2d6578636c7564652d66696c65732e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/mcaskill/composer-plugin-exclude-files)[![Coverage Status](https://camo.githubusercontent.com/887b4acf5ceb681fe0cbd820c9ad3317b873ba3f5fa845fabdbc2d84ce13e1be/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f6769746875622f6d6361736b696c6c2f636f6d706f7365722d706c7567696e2d6578636c7564652d66696c65732f62616467652e7376673f6272616e63683d6d6173746572)](https://coveralls.io/github/mcaskill/composer-plugin-exclude-files?branch=master)[![License](https://camo.githubusercontent.com/f4400deaf6c6f6685fa80a99b01d1220cd7fd92f3f25ca26028f558a97e8920d/68747470733a2f2f706f7365722e707567782e6f72672f6d6361736b696c6c2f636f6d706f7365722d6578636c7564652d66696c65732f6c6963656e7365)](https://packagist.org/packages/mcaskill/composer-exclude-files)[![GitHub tag](https://camo.githubusercontent.com/9114367018330ebedae59a6f00097548616f83749e6033c5fa2773b362d7daa1/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f7461672f6d6361736b696c6c2f636f6d706f7365722d706c7567696e2d6578636c7564652d66696c65732e737667)](https://camo.githubusercontent.com/9114367018330ebedae59a6f00097548616f83749e6033c5fa2773b362d7daa1/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f7461672f6d6361736b696c6c2f636f6d706f7365722d706c7567696e2d6578636c7564652d66696c65732e737667)

A Composer plugin for excluding files required by packages using the 'files' autoloading mechanism.

This is useful for ignoring files required for bootstrapping a package or that provide PHP functions, for example.

Resolves [composer/composer#5029](//github.com/composer/composer/issues/5029)

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

[](#installation)

The plugin can be installed locally or globally.

```
$ composer require mcaskill/composer-exclude-files

```

Usage
-----

[](#usage)

> You can only ignore files from your main `composer.json`.
> File exclusions of dependencies' `composer.json`s are ignored.

From your main `composer.json`, add the `exclude-from-files` property to either the 'autoload' section or the 'extra' section. The list of paths must be absolute from the vendor directory.

This plugin is invoked before the autoloader is dumped, either during `install`/`update`, or via the `dump-autoload` command.

Example:

```
{
    "require": {
        "illuminate/support": "^5.5"
    },
    "autoload": {
        "exclude-from-files": [
            "illuminate/support/helpers.php"
        ]
    }
}

```

The plugin will traverse each package and remove all files in the paths configured above from the prepared autoload map. The vendor files themselves are not removed. The root package is ignored.

The resulting effect is the specified files are never included in `vendor/composer/autoload_files.php`.

License
-------

[](#license)

This is licensed under MIT.

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity65

Established project with proven stability

 Bus Factor1

Top contributor holds 50% 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 ~344 days

Total

2

Last Release

2698d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/2f06417d346331422a76bb8da4506b268bee38ab0707445529238664ca4bbb47?d=identicon)[zorca](/maintainers/zorca)

---

Top Contributors

[![mcaskill](https://avatars.githubusercontent.com/u/29353?v=4)](https://github.com/mcaskill "mcaskill (2 commits)")[![zorca](https://avatars.githubusercontent.com/u/5238179?v=4)](https://github.com/zorca "zorca (2 commits)")

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/zorca-composer-exclude-files/health.svg)

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

###  Alternatives

[vaimo/composer-patches

Applies a patch from a local or remote file to any package that is part of a given composer project. Patches can be defined both on project and on package level. Optional support for patch versioning, sequencing, custom patch applier configuration and patch command for testing/troubleshooting added patches.

2994.3M14](/packages/vaimo-composer-patches)[mglaman/composer-drupal-lenient

1317.4M15](/packages/mglaman-composer-drupal-lenient)[drupal/core-composer-scaffold

A flexible Composer project scaffold builder.

5341.9M440](/packages/drupal-core-composer-scaffold)[drupal/core-project-message

Adds a message after Composer installation.

2122.6M172](/packages/drupal-core-project-message)[olvlvl/composer-attribute-collector

A convenient and near zero-cost way to retrieve targets of PHP 8 attributes

184108.8k8](/packages/olvlvl-composer-attribute-collector)[lullabot/drainpipe

An automated build tool to allow projects to have a set standardized operations scripts.

41716.4k2](/packages/lullabot-drainpipe)

PHPackages © 2026

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