funkjedi/composer-include-files
Composer plugin that lets you include arbitrary PHP files, such as helper functions or bootstrap scripts, via the extra section of composer.json. They load automatically on every request, no need to package them as a library or manually require them.
This package supports a narrow bootstrap-ordering decision: ensuring selected PHP files load before Composer’s normal autoload files entries. It is relevant when a product depends on a polyfill, function shim, constant/config bootstrap, legacy compatibility layer, or test/development override that must run earlier than Composer’s generated autoload sequence.
PM decisions it can inform:
require before vendor/autoload.php is simpler, more transparent, and easier to own than adding a Composer plugin. Buy only if the ordering requirement genuinely cannot be expressed in application bootstrap code.Consider it only when all of these are true:
files entries.vendor/autoload.php.Look elsewhere or build a small internal bootstrap when:
require of an application bootstrap file before vendor/autoload.php is more transparent and avoids plugin execution during Composer install.Executives: This is a small, old Composer plugin that solves a narrow bootstrap-ordering problem. It is not a strategic platform investment, and its age and low adoption signal make it unsuitable as a default dependency. Approve it only as a time-boxed compatibility measure for a legacy system, with a named owner and a removal plan.
Engineering: The package can force configured files to load ahead of Composer’s autoload files, which can unblock legacy shims, polyfills, or configuration bootstraps. But it adds a Composer plugin to the install path and depends on a package last released in 2020. Before adoption, prove the ordering requirement with a failing test, verify Composer 2 plugin allow-listing and CI behavior, and compare against a one-line application bootstrap require before vendor/autoload.php. If we adopt, pin the version, add load-order tests, and schedule removal once the legacy dependency is refactored.
How can I help you explore Laravel packages today?