vamischenko / nextphp
Nextphp Framework — modern PHP framework monorepo
1.1.1.2
2026-04-17 11:37 UTC
Requires
- php: ^8.2
- psr/container: ^2.0
- psr/event-dispatcher: ^1.0
- psr/http-factory: ^1.1
- psr/http-message: ^2.0
- psr/http-server-handler: ^1.0
- psr/http-server-middleware: ^1.0
- psr/simple-cache: ^3.0
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3.0
- league/flysystem: ^3.33
- phpstan/phpstan: ^2.0
- phpstan/phpstan-phpunit: ^2.0
- phpstan/phpstan-strict-rules: ^2.0
- phpunit/phpunit: ^11.0
- psalm/plugin-phpunit: ^0.19
- psr/container: ^2.0
- psr/event-dispatcher: ^1.0
- psr/http-factory: ^1.1
- psr/http-message: ^2.0
- psr/simple-cache: ^3.0
- roave/security-advisories: dev-latest
- symplify/monorepo-builder: ^12.5
- vimeo/psalm: ^6.0
Suggests
- ext-redis: Required for nextphp/cache RedisCache driver
Replaces
- nextphp/auth: 1.1.1.2
- nextphp/cache: 1.1.1.2
- nextphp/console: 1.1.1.2
- nextphp/core: 1.1.1.2
- nextphp/events: 1.1.1.2
- nextphp/filesystem: 1.1.1.2
- nextphp/graphql: 1.1.1.2
- nextphp/http: 1.1.1.2
- nextphp/mail: 1.1.1.2
- nextphp/migrations: 1.1.1.2
- nextphp/octane: 1.1.1.2
- nextphp/orm: 1.1.1.2
- nextphp/queue: 1.1.1.2
- nextphp/routing: 1.1.1.2
- nextphp/testing: 1.1.1.2
- nextphp/validation: 1.1.1.2
- nextphp/view: 1.1.1.2
- nextphp/websocket: 1.1.1.2
README
Nextphp — современный PHP-фреймворк в формате monorepo: набор независимых компонентов (packages) + шаблоны приложений.
Философия
- PSR-first: PSR-7/11/14/15 и др.
- Компонентный подход: пакеты можно использовать отдельно.
- Сильный DX: консоль, генераторы, шаблоны приложений.
- Продакшн-готовность: статический анализ (PHPStan/Psalm), тесты, CI.
Требования
- PHP 8.2+
- Composer 2.x
Быстрый старт (шаблоны)
В репозитории есть готовые шаблоны:
templates/skeleton— базовое приложениеtemplates/api-skeleton— API-приложение
Установить шаблон можно через локальный installer:
composer install
php bin/nextphp project:install skeleton /path/to/my-app
# или
php bin/nextphp project:install api-skeleton /path/to/my-api
Разработка фреймворка (monorepo)
git clone https://github.com/nextphp/nextphp.git
cd nextphp
composer install
composer qa
Подробности: docs/getting-started/installation.md
Пакеты
| Пакет | Описание |
|---|---|
nextphp/core |
IoC Container, Service Providers, compiler passes |
nextphp/http |
PSR-7/PSR-15 слой, middleware pipeline, debugbar middleware |
nextphp/routing |
RadixTree Router, attribute routes, fluent API, rate limiting |
nextphp/orm |
Active Record ORM, миграции, сидеры, фабрики, связи (в т.ч. morphTo) |
nextphp/migrations |
Миграции и откаты |
nextphp/view |
Blade-like шаблонизатор (директивы, компоненты, слоты) |
nextphp/console |
CLI и генераторы + installer шаблонов |
nextphp/cache |
Cache (PSR-16), драйверы (array/file/redis/memcached/DB) |
nextphp/queue |
Очереди/worker, retry/delay, batching, failed jobs store |
nextphp/events |
Event dispatcher (PSR-14) + async dispatcher |
nextphp/auth |
Guards, gates/policies, remember-me, password reset, TOTP |
nextphp/validation |
Rule-based + attribute validation + локализация ошибок |
nextphp/filesystem |
Local/S3/FTP/SFTP + streams + Flysystem adapters |
nextphp/mail |
SMTP + SES/Mailgun/Postmark + Mailable |
nextphp/testing |
TestCase, HTTP testing, snapshots, mocking, browser testing (Panther) |
nextphp/octane |
Runtime bridge (Swoole/RoadRunner) |
nextphp/websocket |
WebSocket runtime (адаптеры) |
nextphp/graphql |
GraphQL слой |
nextphp/log |
PSR-3 logger пакет |
Качество и команды
composer install # Всё (стиль + анализаторы + тесты) composer qa # Тесты composer test # PHPStan composer analyse # Psalm composer psalm # Стиль composer cs:check composer cs:fix
Runtime / интеграции (демо-скрипты)
- WebSocket demo:
php bin/ws-server swooleилиphp bin/ws-server ratchet
Док:docs/integrations/websocket.md - Octane demo:
php bin/octane-server swooleилиphp bin/octane-server roadrunner
Док:docs/integrations/octane.md - GraphQL integration:
docs/integrations/graphql.md
Документация
- Индекс:
docs/index.md - Архитектура:
docs/architecture/overview.md - Совместимость:
docs/compatibility-matrix.md - Шаблоны и installer:
docs/ecosystem/skeletons-and-installer.md
Стандарты
- PHP 8.2+ with strict types
- PSR-1, PSR-4, PSR-7, PSR-11, PSR-12, PSR-14, PSR-15
- PHPStan level 8
- Psalm level 1
- CI workflows: tests, code style, static analysis
License
MIT