Download the PHP package 0.0.0/composer-include-files without Composer
On this page you can find all versions of the php package 0.0.0/composer-include-files. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download 0.0.0/composer-include-files
More information about 0.0.0/composer-include-files
Files in 0.0.0/composer-include-files
Package composer-include-files
Short Description Include files at a higher priority than autoload files. Useful for overriding Laravel helpers.
License MIT
Homepage https://github.com/funkjedi/composer-include-files
Informations about the package composer-include-files
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
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 v2.2 includes a new security feature: https://getcomposer.org/doc/06-config.md#allow-plugins
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:
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.