assegaiphp / core
A progressive PHP framework for building efficient and scalable server-side applications.
Fund package maintenance!
Requires
- php: >=8.4
- ext-fileinfo: *
- assegaiphp/attributes: ^1.0
- assegaiphp/common: ^0.9.0
- assegaiphp/forms: ^0.9.0
- assegaiphp/util: ^0.9.0
- assegaiphp/validation: ^0.9.0
- erusev/parsedown: ^1.7
- filp/whoops: ^2.15
- jimmiw/php-time-ago: ^3.3
- psr/log: ^3.0
- symfony/console: ^8.0
- twig/markdown-extra: ^3.10
- twig/twig: ^3.10
- vlucas/phpdotenv: ^5.4
Requires (Dev)
- dev-main
- 0.9.1.x-dev
- 0.9.1
- 0.9.0
- 0.8.2
- 0.8.1
- 0.8.0
- 0.7.6
- 0.7.5
- 0.7.4
- 0.7.3
- 0.7.2
- 0.7.1
- 0.7.0
- 0.6.4
- 0.6.3
- 0.6.2
- 0.6.1
- 0.5.38
- 0.5.37
- 0.5.36
- 0.5.35
- 0.5.34
- 0.5.33
- 0.5.32
- 0.5.31
- 0.5.30
- 0.5.29
- 0.5.28
- 0.5.27
- 0.5.26
- 0.5.25
- 0.5.24
- 0.5.23
- 0.5.22
- 0.5.21
- 0.5.20
- 0.5.19
- 0.5.18
- 0.5.17
- 0.5.16
- 0.5.15
- 0.5.14
- 0.5.13
- 0.5.12
- 0.5.11
- 0.5.10
- 0.5.9
- 0.5.8
- 0.5.7
- 0.5.6
- 0.5.5
- 0.5.4
- 0.5.3
- 0.5.2
- 0.5.1
- 0.5.0
- 0.4.12
- 0.4.11
- 0.4.10
- 0.4.9
- 0.4.8
- 0.4.7
- 0.4.6
- 0.4.5
- 0.4.4
- 0.4.3
- 0.4.2
- 0.4.1
- 0.4.0
- 0.3.11
- 0.3.10
- 0.3.9
- 0.3.8
- 0.3.7
- 0.3.6
- 0.3.5
- 0.3.4
- 0.3.3
- 0.3.2
- 0.3.1
- 0.3.0
- 0.2.1
- 0.2.0
- 0.1.4
- 0.1.3
- 0.1.2
- 0.1.1
- 0.1.0
- dev-release/0.9.1
- dev-develop
- dev-release/0.9.0
- dev-copilot/prepare-release-notes-082
- dev-release/0.8.2
- dev-copilot/release-081
- dev-amasiye-patch-1
- dev-main-abandoned
This package is auto-updated.
Last update: 2026-04-26 03:17:36 UTC
README
A progressive PHP framework for building effecient and scalable server-side applications.
Description
Assegai is a framework for building efficient, scalable PHP server-side applications. It uses modern PHP (PHP 8.4+) and combines elements of OOP (Object Oriented Programming) and FP (Functional Programming).
Contribution workflow
For commit and pull request conventions in this repo, see:
Philosophy
In recent years, PHP has gained a lot of features out the box that make it a really compelling language for developers. Assegai aims to take advantage of these wonderful features and provide an application architecture which allows for the effortless creation of highly testable, scalable, loosely coupled and easily maintainable applications. The architecture is heavily inspired by Nestjs.
Getting started
Quick Start
$ composer require assegaiphp/core
For a real application, the recommended path is still the CLI:
$ assegai new my-app
Then use Core directly when you want to understand or extend the framework runtime itself.
Minimal bootstrap
<?php // <path-to-project>/index.php if (!isset($_GET['path']) || $_GET['path'] === '') { $_GET['path'] = trim(parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH), '/'); } require_once __DIR__ . '/bootstrap.php';
Bootstrap the app:
<?php // <path-to-project>/bootstrap.php use Assegai\Core\AssegaiFactory; use App\AppModule; require __DIR__ . '/vendor/autoload.php'; function bootstrap(): void { $app = AssegaiFactory::createFromProject(AppModule::class, __DIR__); $app->run(); } bootstrap();
Start the development server:
$ assegai serve
For the fuller walkthrough, start with Getting Started.
Server-rendered UI, HTMX, and Web Components
Assegai is not JSON-only. The framework supports classic server-rendered views through view(...), component-backed pages through render(...), automatic HTMX inclusion in rendered HTML, and first-class Web Components hydration through safe data-props helpers plus automatic bundle injection.
For the full walkthrough, see Pages and Components.
Data, ORM, and Relations
For data-backed applications, Assegai ships with a TypeORM-inspired workflow around modules, repositories, entities, and migrations. The fuller persistence track now lives in:
- Data and ORM
- ORM Setup and Data Sources
- ORM Entities, Repositories, and Results
- ORM Relations
- ORM Migrations and Database Workflows
Constrained Route Params
Assegai routes support constrained dynamic params using angle-bracket syntax:
#[Get(':id<int>')] public function findById(#[Param('id')] int $id): object { // ... }
Built-in constraints currently include int, slug, uuid, alpha, alnum, hex, and ulid.
For the full guide set, visit assegaiphp.com/guide.
Questions
For questions and support, use the official guide and support pages:
The issue list of this repo is exclusively for bug reports and feature requests.
Issues
Please make sure to read the Issues Reporting Checklist before opening an issue. Issues not conforming to the guidelines may be closed immediately.
Consulting
With official support, you can get expert help straight from the Assegai core team. We provide dedicated technical support, migration strategies, advice on best practices and design decisions, PR reviews, and team augmentation. Read more about support here.
Support
Assegai is an MIT-licensed open source project. It can grow thanks to sponsors and support by the amazing backers. If you'd like to join them, please read more here.
Stay in touch
- Author - Andrew Masiye
- Website - https://assegaiphp.com
- Twitter - @assegaiphp
License
Assegai is MIT licensed.