webpatser / fledge
Laravel 13 application skeleton optimized for PHP 8.5.
Requires
- php: ^8.5
- laravel/tinker: ^3.0
- symfony/polyfill-php86: ^1.37
- webpatser/fledge-fiber: ^13.42
- webpatser/fledge-framework: ^13.42
Requires (Dev)
- fakerphp/faker: ^1.23
- larastan/larastan: ^3.13
- laravel/pail: ^1.2.5
- laravel/pao: ^1.0.6
- laravel/pint: ^1.27
- mockery/mockery: ^1.6
- nunomaduro/collision: ^8.6
- phpunit/phpunit: ^11.5.50 || ^12.5.8 || ^13.0.3
Suggests
None
Provides
None
Conflicts
None
Replaces
None
This package is auto-updated.
Last update: 2026-11-18 22:51:57 UTC
README
Laravel 13 application skeleton, optimized for PHP 8.5
This is the app skeleton for Fledge, a drop-in replacement for Laravel's framework that uses PHP 8.5's native features for ~17% better performance.
Forked from
laravel/laraveland rebased onto a clean history.
Quick Start
The skeleton is distributed via Git for now (not yet on Packagist), so clone it directly:
git clone https://github.com/webpatser/fledge my-app
cd my-app
composer install
cp .env.example .env
php artisan key:generate
php artisan serve
After install, verify you are running Fledge and not stock Laravel:
bash vendor/webpatser/fledge-framework/bin/verify-fledge-install.sh
# OK running Fledge framework v13.42.0.2
What You Get
A standard Laravel 13 application that uses webpatser/fledge-framework instead of laravel/framework. Everything works the same: same Artisan commands, same directory structure, same ecosystem compatibility. Just faster.
Out of the box, Fledge includes:
- Non-blocking I/O via
fledge-fiber: one Fiber-based async runtime covering Redis (cache, session, queue, locks), MySQL/MariaDB/PostgreSQL drivers, HTTP client and server, DNS resolution, and concurrency primitives. - Concurrent Middleware: run independent middleware in parallel using fibers via
ConcurrentMiddlewareGroup. - Fiber Queue Worker via
torque: concurrent job processing, a Horizon replacement.
Ecosystem
fledge (this skeleton)
└─ requires webpatser/fledge-framework Laravel 13 fork, PHP 8.5 optimized
└─ requires webpatser/fledge-fiber Fiber async: Redis, DB, HTTP, DNS, primitives
Optional companions:
webpatser/torque Fiber queue worker (Horizon alternative)
webpatser/laravel-fiber Same FiberDriver, standalone for Laravel 11/12/13
Caveats
Things worth knowing before going to production with Fledge:
- Redis Cluster is supported by
fledge-fiber(v13.7.0.1+) via Laravel's standardclusters.*config, with full API parity againstPhpRedisClusterConnection/PredisClusterConnection. Multi-key commands must share a hash tag ({tag}.key),SELECTto a non-zero database is rejected, MULTI/EXEC stays within one slot, and pipelines route per-command (no atomicity across slots). Standalone and Sentinel Redis work too. - PHP 8.5 hosting was released in November 2025. Availability across managed hosts (Forge, Vapor, Ploi, Laravel Cloud) is still rolling out, check your host before committing.
- Differences from stock Laravel in the Redis, MySQL TLS, HTTP and Livewire drivers are listed in fledge-fiber: Differences from stock Laravel. The queue worker signal caveat (Revolt signal handling) is described in the framework README, under "What Changed".
- Active branch is
fledge-13, notmain. Released tags followv13.X.Y.NwhereNis the Fledge patch counter on top of LaravelX.Y.0.
Fiber Database Drivers
Set DB_CONNECTION=fledge-mysql in .env to use the non-blocking MySQL driver. Queries suspend the current Fiber while waiting for I/O, allowing other Fibers to progress concurrently.
Run multiple queries in parallel:
use Fledge\Fiber\Database\FiberDB; [$users, $posts, $count] = FiberDB::concurrent( fn() => User::where('active', true)->get(), fn() => Post::latest()->limit(10)->get(), fn() => Comment::where('approved', false)->count(), );
Available connections: fledge-mysql, fledge-mariadb, fledge-pgsql, preconfigured in config/database.php with the same DB_* variables as the stock connections, except DB_URL. The fiber connections deliberately have no url key: Laravel's URL parser replaces the connection's driver with the URL scheme, so a mysql:// URL would silently turn them into blocking PDO connections. Set DB_HOST, DB_PORT, DB_DATABASE, DB_USERNAME and DB_PASSWORD instead. fledge-fiber also registers fledge-mysql-native and fledge-mariadb-native drivers; add a connection with one of those as driver to use them.
Redis Client
The default Redis client is fledge (REDIS_CLIENT=fledge in .env.example, and the fallback in config/database.php when REDIS_CLIENT is unset). It is the non-blocking client from fledge-fiber, so cache, session, queue and lock traffic suspends the current Fiber instead of blocking the process. Stock Laravel defaults to phpredis; Fledge defaults to fledge because that is the client the Fiber runtime is built around.
To use the phpredis extension instead, install it and set:
REDIS_CLIENT=phpredis
Upgrading an Existing Fledge App
Earlier versions of this skeleton shipped config that no Fledge package registers. If your app was created from one of them:
- Rename the
amphp-mysql,amphp-mariadbandamphp-pgsqlconnections inconfig/database.php, and theirdrivervalues, tofledge-mysql,fledge-mariadbandfledge-pgsql. UpdateDB_CONNECTIONand anyDB::connection('amphp-...')calls to match. REDIS_CLIENT=amphp(also the old fallback inconfig/database.php) has no connector. Change it tofledge, or tophpredisif you want the extension.DB_URLdoes not apply to the fiber connections. Remove theirurlkey and setDB_HOST,DB_PORT,DB_DATABASE,DB_USERNAMEandDB_PASSWORDinstead.
Concurrent Middleware
Run independent middleware in parallel using fibers. Middleware that implement ConcurrentMiddleware can be grouped and executed concurrently, ideal for middleware that perform independent I/O like Redis lookups, API key validation, or rate limit checks.
// In your Kernel protected $concurrentMiddleware = [ 'io-checks' => [ ValidateApiKey::class, // Redis lookup CheckRateLimit::class, // Redis lookup LoadSubscriptionTier::class // Redis lookup ], ]; protected $middlewareGroups = [ 'api' => [ 'concurrent:io-checks', // 3 Redis calls in ~5ms instead of ~15ms SubstituteBindings::class, ], ];
Each middleware implements before(Request): Request|Response and after(Request, Response): Response. The group runs all before() methods concurrently via the FiberDriver, merges request modifications, continues down the pipeline, then runs all after() methods concurrently.
See fledge-framework for details on what's optimized and why.
Switching an Existing Laravel 13 Project
You don't need this skeleton. Swap the framework in your existing project by requiring webpatser/fledge-framework directly:
composer require "webpatser/fledge-framework:^13.7" -W
This installs Fledge and removes vendor/laravel/framework via the replace mechanism. Don't run composer require "laravel/framework:...", that pulls in upstream Laravel even if Fledge is registered as a repository. See the framework README for the resolver detail.
Verify the switch:
bash vendor/webpatser/fledge-framework/bin/verify-fledge-install.sh
To switch back to upstream Laravel:
composer remove webpatser/fledge-framework
composer require "laravel/framework:^13.0" -W
Requirements
- PHP 8.5+
- intl extension
- Composer 2.x
- PHPUnit 11, 12, or 13 (matches laravel/framework support)
Credits
Built on Laravel by Taylor Otwell and the Laravel community.
License
MIT