Download the PHP package bmd/wp-framework without Composer

On this page you can find all versions of the php package bmd/wp-framework. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package wp-framework

WP Framework

PHPUnit PHPStan PHPCS

A small Composer library for bootstrapping WordPress plugins and themes with a PHP-DI service container, auto-mounted controllers, context-aware asset loading, and shared path/URL helpers.

The framework is intentionally light: it does not own routing, templating, build tooling, or plugin headers. It gives a package a predictable lifecycle and a few reusable services so feature code can stay in small classes.

Requirements

Installation

Install the package with Composer:

Then load Composer's autoloader from your plugin or theme entrypoint:

Quick Start

Create an application class that extends Bmd\WPFramework\Main, set a package slug, and mount it after WordPress has loaded enough for plugin path and URL helpers to work.

config.package defaults to static::PACKAGE, and the package slug is used to namespace WordPress actions and filters.

Lifecycle

Main::mount() performs the framework boot sequence:

  1. Registers configuration values in the service container.
  2. Registers the core controllers.
  3. Builds the PHP-DI container.
  4. Mounts any registered service that implements Bmd\WPFramework\Interfaces\Controller.

Controllers extend Bmd\WPFramework\Abstracts\Controller. When a controller is mounted, its mountActions() and mountFilters() methods are called.

Service Container

Services are registered as PHP-DI definitions. The framework exposes convenience wrappers through Bmd\WPFramework\Services\ServiceLocator, including:

Add your own services or controllers by extending Main::getServiceDefinitions():

You can retrieve a service after boot with:

Configuration

The default configuration entries are:

Configuration is filterable before it is added to the container:

Context Handling

The context provider determines where WordPress currently is and dispatches a chain of context names from most specific to broadest fallback.

Built-in context handlers:

Context chains include:

The first context name that resolves to a registered class implementing Bmd\WPFramework\Interfaces\ContextHandler is mounted through the package context hook.

Built-in handlers enqueue conventional bundles:

Asset Loading

Context handlers extend Bmd\WPFramework\Abstracts\ContextHandler, which provides:

Local files are resolved relative to config.dir and converted to URLs relative to config.url. Empty local files are skipped. Remote URLs and protocol-relative URLs are allowed.

For scripts, a sibling WordPress asset file is detected automatically:

When present, the asset file can provide dependencies and a version generated by WordPress build tooling.

Dependency arrays are filterable per handle:

Path And URL Services

The framework registers:

Example usage from an autowired service:

Helpers

Bmd\WPFramework\Helpers includes small utility methods for:

Development

Install development dependencies:

Run the test suite:

Run static analysis:

Run PHPCS:

Changelog

0.2.7 - 2026-05-05

0.2.6 - 2026-04-30


All versions of wp-framework with dependencies

PHP Build Version
Package Version
Requires php-di/php-di Version *
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package bmd/wp-framework contains the following files

Loading the files please wait ...