Search by

hiyan / phpenalva

yanpenalva

PHPenalva is a micro php framework for building web applications and simple APIs.

Package info

github.com/yanpenalva/phpenalva

Type:project

pkg:composer/hiyan/phpenalva

Statistics

Installs: 7

Dependents: 0

Suggesters: 0

Stars: 1

Open Issues: 0

v2.1.0 2026-10-20 00:24 UTC

This package is auto-updated.

Last update: 2026-10-20 12:50:17 UTC


README

PHPenalva is a PHP application framework organized around HTTP entry points, bounded contexts, and PDO persistence. This README is a navigation hub; implementation detail belongs in the linked guides.

Table of Contents

Quickstart

Clone, install, migrate, serve, and complete a register-login-post cycle in about five minutes. Every command was executed against a fresh clone.

Full guide: docs/00-quickstart.md

Usage Recipes

Executable workflows cover contexts, use cases, value objects, endpoints, repository adapters, and migrations. Each recipe names paths, commands, expected output, and verification.

Full guide: docs/03-recipes.md · Create context · Add use case · Add value object · Expose endpoint · Add repository adapter · Add table migration

Testing

Unit tests cover domain rules and adapters; feature tests exercise the HTTP contract and migration manager. The guide records the precise suite boundaries, commands, test patterns, and known coverage gaps.

Full guide: docs/04-testing.md

Architecture

Identity and Content are bounded contexts split into Domain, Application, and Infrastructure layers. Core provides shared HTTP, session, database, and migration facilities.

Full guide: docs/02-architecture.md · Identity module · Content module

Installation

Install Composer dependencies, configure the PDO driver through .env, and apply registered migrations. The Docker Compose development server is exposed on port 8081.

Full guide: docs/01-installation.md

Best Practices

Keep domain and application rules independent of HTTP and SQL; compose adapters in bootstrap and keep controllers thin. Use parameterized SQL, preserve the JSON response contract, and arrange backups before destructive rollback.

Full guide: Best practices · Migration safety

Conventions

PHP files use strict types and explicit types; behavior changes require focused tests. Commit messages use the Conventional Commit form <type>: <description>.

Full guide: Code and commit conventions

Showcase

The framework ships with a ready-made web showcase. The landing page at / presents the project with features, a quickstart, and documentation links. All pages share one layout with navigation and footer; Posts, Contact, and error pages follow the same visual system in public/assets/css. Every dynamic value is HTML-escaped; the debug panel stays behind APP_DEBUG.

Modules