██ ██ ██████ ██████ ██ ██ ██████
████ ████ ██ ██ ██ ██ ██ ██ ██ ██
██ ████ ██ ████████ ██████ █████ ██ ██
██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██
██ ██ ██ ██ ██ ██ ██ ██ ██████
Enterprise-grade extensibility meets modern PHP.
Override anything. Intercept any method. Extend any module — all without touching vendor code.
Documentation, guides, and tutorials at marko.build/docs.

Why Marko?
Rapid-development frameworks are great — until you need to customize a third-party module. Enterprise frameworks let you override anything, but demand months of learning.
Marko bridges the gap.
Magento's deep extensibility + Laravel's developer experience + loud, helpful errors.
Marko is a modular PHP 8.5+ framework where everything is a module: your app code, third-party packages, …even the framework. All integration areas follow the same structure and rules. Later modules always win, so your app layer cleanly overrides vendor without patches, forks, or hacks.
What makes Marko different
- True modularity — Interface and implementation are always separate. Swap any driver (database, cache, mail, queue) without touching a line of application code.
- Preferences — Remap any interface to your own implementation, framework-wide. One line of config replaces an entire class.
- Plugins — Intercept any public method with
before and after hooks. Modify inputs, transform outputs, or add behavior — all without inheritance.
- PHP-native configuration — No XML. No YAML. Every route, binding, and plugin is defined in PHP, including full IDE autocompletion and
::class constants.
- Attribute-driven — Routes, plugins, observers, layouts, commands, and more are declared with PHP attributes. Discovery is automatic.
- Loud errors — No silent failures. When something goes wrong, Marko tells you exactly what happened, where, and how to fix it.
Watch the Introduction
Learn what Marko is, why it exists, and how it works in this short video overview.

Introducing Marko: The Truly Modular PHP Framework
Quick Start
composer create-project marko/skeleton my-app
cd my-app
Register your first module in app/hello/composer.json:
{
"name": "app/hello",
"autoload": {
"psr-4": {
"App\\Hello\\": "src/"
}
},
"extra": {
"marko": {
"module": true
}
}
}
Create a controller at app/hello/src/Controller/HelloController.php:
<?php
declare(strict_types=1);
namespace App\Hello\Controller;
use Marko\Routing\Attributes\Get;
use Marko\Routing\Http\Response;
class HelloController
{
#[Get('/')]
public function index(): Response
{
return new Response('Hello from Marko!');
}
}
Start the dev server:
composer global require marko/cli
marko up
Visit http://localhost:8000 to see your response.
Module System
Everything in Marko is a module. Modules are discovered automatically from three locations, loaded in priority order:
| Location | Purpose | Priority |
|---|
vendor/ | Framework & third-party packages | Lowest |
modules/ | Locally installed third-party modules | Middle |
app/ | Your application code | Highest |
Later modules always win. Your app/ modules can override controllers, templates, config, and DI bindings from any vendor package — without modifying vendor code.
Extending vendor behavior
Preferences — Replace any interface binding:
// app/my-module/module.php
return [
'preferences' => [
PaymentProcessorInterface::class => MyCustomPaymentProcessor::class,
],
];
Plugins — Intercept any public method:
#[Plugin(target: OrderService::class)]
class OrderPlugin
{
#[Before]
public function place(Order $order): null
{
// Runs before OrderService::place() — method name matches target
return null;
}
}