New v2.14.0 is out →

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.

Get started
$ 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

packages

16

Plugged into the kernel: ORM, security, translation, Markdown...

process

4

Around your application: console and installer.

Latest releases

  1. 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:migration ignores the api_tokens table

  2. v2.13.0

    Production reliability: maintenance mode (down, up, Maintenance\MaintenanceMode); health endpoint (health options of config/framework/app.yaml, disabled by default); PHP fatal errors logged and answered with the error page by run(); the redis queue transport moves its messages atomically; SqlQueryBuilder reports a query without a table; the Queue and Scheduler directories use the 0775 permissions

  3. v2.12.0

    Security hardening: Serializer strict_associations option; rate limiters locked while they consume tokens; database remember-me tokens rotated at each use with stolen cookie detection (RotatableTokenProviderInterface); login_throttling max_account_attempts and cache_pool options; tailwind:install checks the checksum of the CLI and saves the installed version; http_method_override_header option

  4. v2.11.1

    Translation: getLanguageName() throws a TranslationException for 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 of inject(); ext-intl declared as an optional extension, SECURITY.md updated for NeoPHP 2, README.md converted 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