Skip to content

Composer plugin that allows you to exclude files from autoload.

License

Notifications You must be signed in to change notification settings

themosis/composer-exclude-files

Repository files navigation

Composer Exclude Files Plugin

This plugin allows you to exclude files from your project's autoloader.

Installation

The plugin can be installed globally or on a project basis. Run the following command from your terminal:

composer require themosis/composer-exclude-files

Usage

In order to exclude files from being autoloaded upon a Composer operation, simply specify an exclude-from-files key, followed with a list of files to exclude, under the extra property of your composer.json file like so:

"extra": {
    "exclude-from-files": {
        "laravel/framework": [
            "src/Foundation/helpers.php"
        ],
        "symfony/var-dumper": [
            "Resources/functions/dump.php"
        ]
    }
},

First defined the package name you wish to target and then pass it an array of relative paths to files to exclude from that package.

Notes

This Composer plugin automatically exclude files from your project by looking at all its dependencies. Meaning that exclude rules can be defined in both your root package or into one of its dependencies.

Credits

This Composer plugin has been inspired by the mcaskill/composer-plugin-exclude-files package.

The plugin is a working piece of the Themosis framework.

About

Composer plugin that allows you to exclude files from autoload.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages