The ultra modular PHP framework
Build web applications with only the pieces you need. No dependency, no magic: just PHP 8.2 and clean, attribute-driven code.
composer create-project neophp/skeleton my-app
- features
- 46
- dependencies
- 0
- PHP
- 8.2+
Why NeoPHP
Everything you need, nothing you don't
Ultra modular
Components, packages and processes are independent: the kernel only loads the providers you use.
Zero dependency
Only PHP 8.2. No vendor tree to audit: YAML, Markdown, ORM or Tailwind are written in NeoPHP itself.
Attributes everywhere
Routes, listeners, commands, security and autowiring are declared next to the code with PHP attributes.
Generators
make:entity, make:form, make:auth and friends ask what they need and write clean code for you.
Batteries included
ORM with migrations, forms, validation, security, mailer, translations and a debug toolbar, out of the box.
Modern front-end
Twig or PHP templates, an asset pipeline and Tailwind CSS without Node.js.
Simple by design
A route, a controller, a template.
Routes are attributes, services are autowired and templates are Twig or plain PHP. Read it once, you know how it works.
Read the guide →src/Controller/HelloController.php
class HelloController extends AbstractController
{
#[Route('/hello/{name}', name: 'hello')]
public function index(string $name): Response
{
return $this->render('hello.html.twig', ['name' => $name]);
}
}
templates/hello.html.twig
{% extends 'base.html.twig' %}
{% block body %}
<h1>Hello {{ name }}!</h1>
{% endblock %}
The ecosystem
46 features, one documentation each
components
26The building blocks: HTTP, routing, container, views, forms...
packages
16Plugged into the kernel: ORM, security, translation, Markdown...
Latest releases
-
v2.14.0
User accounts: signed tokens for the password reset and the email verification (
UserTokenSigner,EmailVerifiedUserChecker); personal API tokens (ApiTokenManager,ApiTokenHandler); JWT authentication (JwtManager,JwtTokenHandler); TOTP two-factor authentication with backup codes (TwoFactorManager); OAuth login for Google, GitHub and OpenID Connect (OAuthManager,OAuthAuthenticator);make:migrationignores theapi_tokenstable -
v2.13.0
Production reliability: maintenance mode (
down,up,Maintenance\MaintenanceMode); health endpoint (healthoptions ofconfig/framework/app.yaml, disabled by default); PHP fatal errors logged and answered with the error page byrun(); the redis queue transport moves its messages atomically;SqlQueryBuilderreports a query without a table; the Queue and Scheduler directories use the0775permissions -
v2.12.0
Security hardening: Serializer
strict_associationsoption; rate limiters locked while they consume tokens; database remember-me tokens rotated at each use with stolen cookie detection (RotatableTokenProviderInterface);login_throttlingmax_account_attemptsandcache_pooloptions;tailwind:installchecks the checksum of the CLI and saves the installed version;http_method_override_headeroption -
v2.11.1
Translation:
getLanguageName()throws aTranslationExceptionfor an unknown language or display locale, the documentation of the package translations is restored; ORM and Doctor: strict types in the remaining files; Container: type annotation ofinject();ext-intldeclared as an optional extension,SECURITY.mdupdated for NeoPHP 2,README.mdconverted to UTF-8; CI:intl, MySQL, PostgreSQL and Redis services, coverage job
Ready to build?
Create your first NeoPHP application in less than five minutes.
Start with the guide