roots/bedrock-autoloader
An autoloader that enables standard plugins to be required just like must-use plugins
1.1.0
6.5M downloads/mo
#1626 most downloaded on Packagist
roots/bedrock-autoloader
What this package is like to depend on
Last release 5 months ago
10 Mar 2026
Release timing varies
gaps range from 7 months to 5.3 years
Most releases are documented
notes for 4 of 6 stable releases
Nothing withdrawn
no release was ever pulled
6 years old
7 releases · first in 2020
2 releases in the last 12 months
see the full history below
Release timeline
7 releases · May 2020 to Mar 2026Releases
latest 7-
v2.0.0-beta.110 Mar 2026 pre-releaseRelease notes
Open source →Breaking Changes
- PHP 8.2+ is now required (#40)
- Namespace changed to
Roots\Bedrock\Autoloader(#42) - Constructor is now side-effect-free with injected mu-plugin path (#43)
New
mu-plugins/bedrock-autoloader.php(roots/bedrock#807):<?php /** * Plugin Name: Bedrock Autoloader * Plugin URI: https://github.com/roots/bedrock-autoloader * Description: An autoloader that enables standard plugins to be required just like must-use plugins. The autoloaded plugins are included during mu-plugin loading. An asterisk (*) next to the name of the plugin designates the plugins that have been autoloaded. * Version: 2.0.0 * Author: Roots * Author URI: https://roots.io/ * License: MIT License */ if (is_blog_installed() && class_exists(\Roots\Bedrock\Autoloader\Autoloader::class)) { $autoloader = new \Roots\Bedrock\Autoloader\Autoloader(WPMU_PLUGIN_DIR); foreach ($autoloader->boot() as $file) { include_once $file; } $autoloader->markLoaded(); unset($autoloader, $file); }
What's Changed
- Require PHP 8.2+ and update CI and dependencies by @retlehs in #40
- Add Laravel Pint for code styling by @retlehs in #41
- Change namespace to
Roots\Bedrock\Autoloaderby @retlehs in #42 - Make constructor side-effect-free and inject mu-plugin path by @retlehs in #43
- Fix global variable scope for autoloaded mu-plugins by @retlehs in #44
- Add e2e tests for autoloaded mu-plugins by @retlehs in #45
Full Changelog: 1.1.0...v2.0.0-beta.1
-
1.1.009 Mar 2026Release notes
Open source →What's Changed
New
- Add
bedrock_autoloader_load_pluginsfilter to selectively exclude plugins from autoloading (#37)
Fixed
- Fix autoloader failure when plugins directory does not exist (#30)
- Fix
countPluginscounting non-plugin directories (#26) - Fix autoloader when plugins directory is a symlink (#12)
- Move synthetic activation hooks from
plugins_loadedtoinitto prevent fatals on first load (#23) - Harden filter output sanitization and prune stale pending activations (#37)
Maintenance
- Exclude non-essential files in .gitattributes (#27)
- Test on PHP version 8.0 (#28)
- Fix URLs that point to 404 (#32)
New Contributors
- @itsme-francesco made their first contribution in #32
- @partiellkorrekt's work from #36 was incorporated into #37
Full Changelog: 1.0.4...1.1.0
- Add
-
1.0.404 Dec 2020 -
1.0.318 May 2020Nothing published for this version
-
1.0.216 May 2020Release notes
Open source →Merge pull request #16 from aaemnnosttv/patch-1
Remove code outside of class definition
-
1.0.116 May 2020Nothing published for this version
-
1.0.016 May 2020Release notes
Open source →Merge pull request #15 from roots/use-WPMU_PLUGIN_DIR-in-path
Use WPMU_PLUGIN_DIR