memran/marwa-module

Framework-agnostic, PSR-11 friendly module management library for PHP apps (Marwa ecosystem compatible).

Installs: 0

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 0

Forks: 0

Open Issues: 0

pkg:composer/memran/marwa-module

dev-main 2025-11-10 10:58 UTC

This package is auto-updated.

Last update: 2025-11-10 10:58:11 UTC


README

PHP Version Downloads License

A framework-agnostic, PSR-11–friendly module management library for PHP.

It enables modular application architecture — each module is self-contained with its own manifest.php, routes, views, models, and service provider.
marwa-module discovers and bootstraps them automatically.

✨ Features

  • 📁 Filesystem and Composer-based module discovery
  • 🚀 One entry point (ModulesServiceProvider)
  • 🧱 ModuleBuilder for clean module introspection
  • 🧾 PHP or JSON manifest format
  • ⚡ Static in-memory caching for instant reloads
  • 💤 Lazy loading of routes, events, and commands
  • 🔌 Framework-agnostic, PSR-11 compatible
  • 🧪 Unit tested with PHPUnit

Directory structure

project-root/
  src/
  vendor/
  modules/
    User/
      manifest.php
      src/
        Controllers/
        Models/
        Views/
        Commands/
        Events/
        Migrations/
        Entity/
      routes/
        http.php
    Billing/
      manifest.json

Installing

composer require memran/marwa-module

Requirements

  • PHP 8.1+
  • PSR-11 container (or adapter that implements it)
  • Filesystem access to /modules

License

MIT