Download the PHP package middag-io/framework without Composer

On this page you can find all versions of the php package middag-io/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 framework

# middag-io/framework **Symfony-grade DDD architecture that runs inside a Moodle or WordPress plugin, or standalone.** [Documentation](https://docs.middag.dev) · [Where it runs](#where-it-runs) · [Professional services](#professional-services) · [GitHub](https://github.com/middag-io/middag-php-framework) [![CI](https://github.com/middag-io/middag-php-framework/actions/workflows/ci.yml/badge.svg)](https://github.com/middag-io/middag-php-framework/actions/workflows/ci.yml) [![License: Apache 2.0](https://img.shields.io/badge/License-Apache_2.0-blue.svg)](https://opensource.org/licenses/Apache-2.0) [![PHP](https://img.shields.io/badge/php-%5E8.2-777BB4.svg)](https://www.php.net/) [![PHPStan](https://img.shields.io/badge/PHPStan-level%206-brightgreen.svg)](https://phpstan.org/) [![Packagist Version](https://img.shields.io/packagist/v/middag-io/framework.svg)](https://packagist.org/packages/middag-io/framework) [![Packagist Downloads](https://img.shields.io/packagist/dt/middag-io/framework.svg)](https://packagist.org/packages/middag-io/framework)

About

middag-io/framework is a platform-agnostic PHP framework for building business domains that do not depend on their host. You write controllers, forms, queries and services against contracts, then run the exact same code inside a Moodle plugin, a WordPress plugin, or as a standalone app by swapping a thin adapter.

Your domain should not know, or care, where it runs.

Status: 1.x — the API is still consolidating, so a minor release may carry a documented breaking change (see API-STABILITY.md). License: Apache-2.0.

Why middag-io/framework?

Plugin code couples business logic straight to the host: $DB, $CFG and mform on Moodle, $wpdb on WordPress. That coupling is exactly what makes a plugin impossible to test without booting a full host, impossible to reuse on another platform, and fragile on every upgrade. This framework breaks the coupling, and gives you back four things:

Built on giants

We did not reinvent the wheel. Under the hood it is Symfony (dependency injection, HTTP kernel, routing, Messenger, Validator), plain PSR contracts, Monolog and Inertia, wrapped in a single host-agnostic API. Less of our code to carry bugs, battle-tested foundations underneath.

Installation

Requires PHP ^8.2 and the curl, intl, json, mbstring and pdo extensions. Runs standalone or behind a host adapter.

Quick start

A controller that loads your domain and renders an Inertia page: attribute routing, a domain service injected by the container, and not a single host API in sight.

CourseCatalog is your service and index() stays plain PHP, so the exact same controller runs standalone, inside Moodle, or inside WordPress, by swapping the adapter.

And the proof of decoupling: the query layer runs with no host at all, over a plain PDO connection.

What's inside

Generic plumbing, organised by concern (each concern owns its own Contract/):

Concern What it does
Kernel Symfony DI container booted from a BootstrapInterface, service auto-discovery, AbstractModule, AbstractFacade, and a per-instance WordPress-style HookManager.
Http PSR-15 HttpKernel, StandaloneKernel, attribute routing (#[Route]), declarative auth (#[Auth] with rich CapabilityRequirement support), per-route middleware (#[Middleware]), AbstractController / AbstractApiController, and AbstractFormRequest.
Inertia Full Inertia v3 protocol: lazy (optional), deferred (defer), merge (merge / deepMerge), partial reloads and asset versioning.
Form AbstractForm, FormValidator, a set of field types (text, select, date, file, and more), and an Inertia renderer.
Persistence An immutable QueryBuilder, an active-record Model, AbstractRepository / AbstractMapper, and Page pagination.
Database ConnectionAdapterInterface with a default PdoConnectionAdapter, a SQL dialect layer, and a schema builder with migrations.
Bus A command bus over Symfony Messenger (sync, plus async by transport routing), an InMemoryTransport, and a CommandWorker.
Logging A Monolog-backed LoggerFactory per channel, with a RotatingStreamHandler.
Mail A MailerInterface port with Mail / Address / Attachment value objects (inline cid: embeds included). The OSS default NullMailer discards; adapters map a Mail onto email_to_user() / wp_mail().
Observability An ErrorReporterInterface port (NullErrorReporter default, SentryErrorReporter behind a composer suggest) plus a ProfileCollectorInterface sink that gives bus, hook and query events a single profiling timeline.
Shared / Exception DTOs, enums and utilities, plus a typed exception hierarchy mapped to HTTP status codes.

Full API reference, guides and examples live at docs.middag.dev.

Where it runs

Target How
Standalone Implement Middag\Framework\Kernel\Contract\BootstrapInterface, build the container with ContainerFactory::build(), and serve through StandaloneKernel.
Moodle The OSS middag-io/moodle adapter (MoodleBootstrap plus the bridge contracts).
WordPress The OSS middag-io/wordpress adapter (in build-out).

An adapter is a thin layer that implements the bridge contracts (BootstrapInterface, ConfigResolverInterface, ConnectionAdapterInterface, HostEventBridgeInterface, UserContextResolverInterface, TranslatorInterface, FormRendererInterface). The framework ships a default OSS implementation of each, so it runs standalone with no adapter at all.

Open source and MIDDAG

The framework, the Moodle and WordPress adapters, and middag-io/ui are open source under Apache-2.0: the generic plumbing, free, forever.

The governed domain infrastructure that is genuinely hard to get right — reliable event delivery, async jobs with retry and audit, an EAV query engine, multi-tenancy, and licensing — is MIDDAG's proprietary product. It is built on top of this OSS and is opt-in, for when a domain outgrows the basics. The framework never imports the proprietary layer; the dependency only ever points downward.

Professional services

Adopting the framework, building a custom adapter, or migrating a legacy plugin to a testable domain? MIDDAG offers consulting and custom development. Reach us at middag.io for more.

Development

Git hooks are wired automatically on install; the commit-msg hook enforces Conventional Commits, and releases are cut by release-please.

Contributing

See SECURITY.md.

Building on the framework? API-STABILITY.md defines the @api public surface, the 1.x versioning policy (breaking changes may land in minors, always flagged in the changelog), and the host-neutral contracts frozen for the whole 1.x line.

License

Licensed under the Apache License, Version 2.0. See LICENSE. Copyright 2026 MIDDAG.


All versions of framework with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
ext-intl Version *
ext-json Version *
ext-mbstring Version *
ext-pdo Version *
middag-io/ui Version ^1.3
monolog/monolog Version ^3.0
nyholm/psr7 Version ^1.8
psr/clock Version ^1.0
psr/container Version ^2.0
psr/http-client Version ^1.0
psr/http-factory Version ^1.0
psr/http-message Version ^1.0 || ^2.0
psr/http-server-handler Version ^1.0
psr/http-server-middleware Version ^1.0
psr/log Version ^3.0
psr/simple-cache Version ^2.0 || ^3.0
symfony/cache Version ^7.0 || ^8.0
symfony/clock Version ^7.0 || ^8.0
symfony/dependency-injection Version ^7.0 || ^8.0
symfony/deprecation-contracts Version ^3.7
symfony/event-dispatcher-contracts Version ^3.0
symfony/http-client Version ^7.0 || ^8.0
symfony/http-foundation Version ^7.0 || ^8.0
symfony/http-kernel Version ^7.0 || ^8.0
symfony/messenger Version ^7.0 || ^8.0
symfony/property-access Version ^7.0 || ^8.0
symfony/property-info Version ^7.0 || ^8.0
symfony/psr-http-message-bridge Version ^7.0 || ^8.0
symfony/routing Version ^7.0 || ^8.0
symfony/serializer Version ^7.0 || ^8.0
symfony/translation-contracts Version ^3.0
symfony/uid Version ^7.0 || ^8.0
symfony/validator Version ^7.0 || ^8.0
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 middag-io/framework contains the following files

Loading the files please wait ...