ssmiff / entabula-mezzio
Serves the ssmiff/entabula entity-based admin panel, from Mezzio, with Doctrine DBAL backed entities and Doctrine Migrations.
Requires
- php: ^8.4
- doctrine/dbal: ^4.4
- doctrine/migrations: ^3.9
- mezzio/mezzio-router: ^4.2
- psr/container: ^2.0
- psr/http-factory: ^1.1
- psr/http-message: ^2.0
- psr/http-server-handler: ^1.0
- psr/http-server-middleware: ^1.0
- ssmiff/entabula: ^1.0
Requires (Dev)
- nyholm/psr7: ^1.8
- phpstan/phpstan: ^2.2
Suggests
None
Provides
None
Conflicts
None
Replaces
None
README
ssmiff/entabula-mezzio serves Entabula, an entity-based admin panel, from
Mezzio or any PSR-15 application with a mezzio/mezzio-router route collector. Records are kept with Doctrine DBAL,
and its tables (users, roles, permissions, tokens, notifications, error reports) are Doctrine Migrations.
composer require ssmiff/entabula-mezzio npm install @ssmiff/entabula
Add its ConfigProvider to your config aggregator, and give your container a Doctrine\DBAL\Connection and PSR-17
response and stream factories. Then run the migrations and register the routes:
vendor/bin/doctrine-migrations migrate
use Ssmiff\Entabula\Mezzio\Http\EntabulaRoutes; EntabulaRoutes::register($container->get(RouteCollectorInterface::class), $container, '/entabula');
Your entities use DBAL, naming their relations' tables:
use Ssmiff\Entabula\Mezzio\Database\DbalResolver; public function resolver(): EntityResolver { return new DbalResolver($this->connection, 'projects', timestamps: true) ->withHasMany('tasks', 'tasks', 'project_id') ->withBelongsToMany('members', 'users', 'project_user', 'project_id', 'user_id'); }
The client is @ssmiff/entabula, served from one page given the settings
from SettingsHandler.
Requires PHP 8.4 or newer.
Documentation
The Mezzio guide covers the setup, the tables, serving the client and the config.
Developing
This package is developed inside ssmiff/entabula-demo, as a git submodule;
its README says how to work on it there. Its phpstan.neon is written for that repository, its CI adjusts it to run
here on its own.
Releases are tags, e.g. v1.2.0, which Packagist publishes.