📦 Marketplace⭐ GitHub
monkeyslegion@2.0PHP 8.4+28 packages

A Modern PHP Platform. Not Just a Framework.

Attribute-first architecture, compiled infrastructure, PSR-aligned internals, first-party auth & security, and a unique AI orchestration engine — all delivered through a modular 28-package ecosystem.

What Defines MonkeysLegion v2

Not a minimal micro-framework. Not a legacy enterprise stack. A modern PHP application platform.

PHP 8.4 Baseline

Property hooks and strict typing are first-class design inputs, not future compatibility goals. Every package targets PHP 8.4+.

🏷️

Attribute-First Architecture

Routes, validation, providers, listeners, and commands live next to the code they control — no YAML, no route files, no registration layers.

🔧

Compiled Container & Config

Autowiring in dev, compiled static PHP arrays in production. Zero runtime reflection, zero parsing overhead.

📐

PSR-Aligned Internals

PSR-7, 11, 14, 15, 16, and 17 are part of the architecture. Replacement and modular adoption stay easy.

🛡️

Integrated Security & Auth

JWT, OAuth2, TOTP 2FA, RBAC, rate limiting, CSRF, CORS, security headers — first-party, not scattered across packages.

🤖

AI-Native Direction

Apex is a full orchestration layer — multi-provider routing, schemas, pipelines, crews, guardrails, budgeting, and MCP support.

Architecture at a Glance

Convention-based discovery, compiled configuration, and a clear separation of concerns.

TEXT
my-app/
├─ app/
│  ├─ Controller/
│  ├─ Dto/
│  ├─ Entity/
│  └─ Auth/
├─ config/
│  ├─ app.php
│  ├─ database.php
│  └─ *.mlc
├─ public/
├─ resources/
│  └─ views/
├─ var/
│  ├─ cache/
│  └─ migrations/
├─ storage/
├─ tests/
└─ bin/

How it works

  • Controllers & DTOs are discovered automatically via attributes
  • Configuration lives in .mlc files with typed parsing and caching
  • Templates compile to optimized PHP under resources/views
  • Migrations are generated into var/migrations from entity diffs
  • Runtime artifacts compile into cache directories for zero-overhead production.

The Package Ecosystem

MonkeysLegion isn't a monolith. It's built from 28 independently-versioned packages that compose beautifully together.

28
Composer Packages
8.4
PHP Minimum
6 Supported
PSR Standards
Decoupled
Architecture
🤖

Apex AI

First-party AI orchestration, agent crews, and tool calling built directly into the framework.

🔐

Auth & Security

JWT, OAuth2, TOTP 2FA, API keys, RBAC, and Argon2id out of the box.

🚀

Core & Router

Attribute-based HTTP routing, compiled DI, and rapid boot lifecycle.

Get everything with one command

$composer require monkeyscloud/monkeyslegion-skeleton my-app

The Request Pipeline

Every HTTP request flows through a PSR-15 middleware stack before reaching your controller.

Benchmarked, not marketed.

All numbers produced on Apple Silicon with PHP 8.5.3, no opcache preloading, warm JIT, identical test harnesses.

OperationMonkeysLegion Ops/secvs Laravelvs Symfony
Entity creation0.0M~140× faster~114× faster
DTO construction0.0M~60× faster~54× faster
Resource serialization0.0K~5.5× faster~3.6× faster
Enum operations0.0M~25× faster~22× faster
Property hooks (email)0.0MN/AN/A
Computed properties0MN/AN/A
Peak memory (cold boot)0MB≈ 22 MB≈ 14 MB

Why we win

  1. 01Zero-magic architecture — Entities, DTOs, and enums are plain PHP objects.
  2. 02PHP 8.4 property hooks — Validation and formatting run as native engine hooks.
  3. 03No ORM hydration overhead — Entities are POPOs. No Doctrine or Eloquent proxies.
  4. 04Attribute routing — Compiled once at cache time. No regex matching at runtime.
  5. 05Lean PSR-15 pipeline — ~12.5K req/s HTTP throughput vs Laravel's ~2.1K req/s.

Great frameworks, different trade-offs

Laravel built an incredible ecosystem — Forge, Vapor, Nova, Cashier — and the largest PHP community. If you need a batteries-included SaaS starter, it's hard to beat.

Symfony powers some of the most mission-critical enterprise systems on earth. Its profiler, debug toolbar, and rigorous release cycle are best-in-class.

MonkeysLegion is built for a different moment: when you need raw throughput, zero-magic PHP 8.4+ code, and a framework that gets out of your way. No 22 MB boot. No runtime proxies. Just your code.