actra / yuf
yuf (pronounced "[jʌf]" or "[jʊf]") - A smart, fast and lightweight php framework with zero dependencies.
Requires
- php: >=8.5
- ext-bcmath: *
- ext-ctype: *
- ext-curl: *
- ext-dom: *
- ext-fileinfo: *
- ext-iconv: *
- ext-intl: *
- ext-libxml: *
- ext-mbstring: *
- ext-openssl: *
- ext-pdo: *
- ext-simplexml: *
Requires (Dev)
- actra/coding-standard: ^1.27.0
- phpunit/phpunit: ^13.4
Suggests
None
Provides
None
Conflicts
None
Replaces
None
- dev-main
- v6.5.0
- v6.4.0
- v6.3.0
- v6.2.0
- v6.1.0
- v6.0.1
- v6.0.0
- v5.7.0
- v5.6.0
- v5.5.0
- v5.4.0
- v5.3.0
- v5.2.1
- v5.2.0
- v5.1.1
- v5.1.0
- v5.0.2
- v5.0.1
- v5.0.0
- v4.67.3
- v4.67.2
- v4.67.1
- v4.67.0
- v4.66.0
- v4.65.0
- v4.64.0
- v4.63.0
- v4.62.0
- v4.61.0
- v4.60.0
- v4.59.0
- v4.58.0
- v4.57.6
- v4.57.5
- v4.57.4
- v4.57.3
- v4.57.2
- v4.57.1
- v4.57.0
- v4.56.0
- v4.55.0
- v4.54.0
- v4.53.1
- v4.53.0
- v4.52.1
- v4.52.0
- v4.51.0
- v4.50.0
- v4.49.0
- v4.48.0
- v4.47.0
- v4.46.0
- v4.45.0
- v4.44.0
- v4.43.0
- v4.41.0
- v4.40.0
- v4.39.0
- v4.38.0
- v4.37.0
- v4.36.0
- v4.35.0
- v4.34.0
- v4.33.0
- v4.32.0
- v4.31.0
- v4.30.0
- v4.29.0
- v4.28.0
- v4.27.0
- v4.26.0
- v4.25.0
- v4.24.0
- v4.23.0
- v4.22.0
- v4.21.0
- v4.20.0
- v4.19.0
- v4.18.0
- v4.17.0
- v4.16.0
- v4.15.0
- v4.14.0
- v4.13.0
- v4.12.0
- v4.11.0
- v4.10.1
- v4.10.0
- v4.9.2
- v4.9.1
- v4.9.0
- v4.8.2
- v4.8.1
- v4.8.0
- v4.7.1
- v4.7.0
- v4.6.0
- v4.5.0
- v4.4.0
- v4.3.0
- v4.2.0
- v4.1.0
- v4.0.0
- v3.3.2
- v3.3.1
- v3.3.0
- v3.2.2
- v3.2.1
- v3.2.0
- v3.1.0
- v3.0.0
- v2.2.0
- v2.1.1
- v2.1.0
- v2.0.0
- v1.7.0
- v1.6.0
- v1.5.1
- v1.5.0
- v1.4.0
- v1.3.0
- v1.2.0
- v1.1.0
- v1.0.9
- v1.0.8
- v1.0.7
- v1.0.6
- v1.0.5
- v1.0.4
- v1.0.3
- v1.0.2
- v1.0.1
- v1.0.0
- v0.9.0
- v0.8.1
- v0.8.0
- v0.7.6
- v0.7.5
- v0.7.4
- v0.7.3
- v0.7.2
- v0.7.1
- v0.7.0
- v0.6.1
- v0.6.0
- v0.5.3
- v0.5.2
- v0.5.1
- v0.5.0
- v0.4.4
- v0.4.3
- v0.4.2
- v0.4.1
- v0.4.0
- v0.3.1
- v0.3.0
- v0.2.0
- v0.1.0
- v0.0.3
- v0.0.2
- v0.0.1
This package is auto-updated.
Last update: 2026-10-11 17:25:44 UTC
README
yuf (pronounced "[jʌf]" or "[jʊf]") is a smart, fast and lightweight PHP framework without runtime dependencies, installed and loaded with Composer.
- Routing, views, JSON endpoints and an immutable request object
- Template engine with escaping by default and own tags
- Typed form fields, rules, CSRF and spam protection, checked file uploads
- Session object, login with session fixation protection, Argon2id passwords, IP whitelists
- PDO connection with typed rows and a safe query builder
- Mail via SMTP (incl. XOAUTH2) or the Microsoft Graph API, phone numbers based on libphonenumber
- CSP nonces, ships no JavaScript
Requirements
- PHP 8.5 or higher
- Extensions:
mbstring,openssl,pdo,intl,bcmath,simplexml,dom,iconv,curl,libxml,ctype,fileinfo
Installation
Start a new project with the yuf skeleton:
composer create-project actra/yuf-skeleton my-project
Or add yuf to an existing project:
composer require actra/yuf
Composer is needed to build the application (vendor/), not on the server: deploy with
composer install --no-dev --optimize-autoloader.
Usage
require __DIR__ . '/../vendor/autoload.php'; $core = Core::fromEnvironment(envFilePath: __DIR__ . '/../.env.php', copyrightYear: 2026); $core->prepareHttpResponse(routeCollection: $routes)->sendAndExit();
See .env.example.php, index.example.php and the documentation:
- Setup: entry point, environment settings, production (host, client IP, PHP settings), error log
- Views and requests: views, request, path variables, JSON endpoints
- Session and login: session, login, passwords, secret tokens
- Templates: syntax, escaping, snippets and tables, own tags
- Forms: typed values, rules, spam protection, uploads, extension points
- Database: connection, typed rows, query builder, boolean search
- Mail: SMTP (STARTTLS or implicit TLS) and Microsoft 365
- Phone numbers: parsing, formats, validation
- Testing: PHPStan and PHPUnit in projects using yuf, test objects, clock
Upgrading
Read UPGRADE.md before composer update: minor versions may contain breaking changes (marked ⚠️).
Libraries that use yuf require it with ~6.0.0 (minor version locked).
Contributing
Follow the Actra coding standard and AGENTS.md.
composer check (code style, PHPStan, tests) must be green; with DDEV run ddev start and
ddev composer check. The example app in example/ then runs at https://yuf.ddev.site/.
License
© 2026 Actra AG. yuf is licensed under MIT AND LGPL-2.1-only AND Apache-2.0; the
@license tag in the header of each file says which applies:
- MIT, see LICENSE: everything not listed below.
- LGPL-2.1-only, see src/mailer/LICENSE: the classes in
src/mailer/derived from PHPMailer (they say so in their header); the original copyright lines are kept. - Apache-2.0, see src/phone/LICENSE and src/phone/NOTICE:
src/phone/, adapted from libphonenumber-for-php.
Projects under any license, including proprietary ones, may use yuf. When you distribute yuf (or software containing
it), keep these license files and headers; the LGPL parts must stay replaceable and their source available, which
the PHP source of yuf in vendor/ already ensures. Changes to the LGPL parts stay under the LGPL.