Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Framework Laravel Package

hyperf/framework

Hyperf is a high-performance PHP coroutine framework built on Swoole and Swow. This package provides the core framework foundation: dependency injection, AOP, annotations, event handling, and a component architecture for scalable microservices and web apps.

Deep Wiki
Context7

At a glance

Frequently asked questions about Framework
What is hyperf/framework and how does it differ from Laravel?
Hyperf is a coroutine-based PHP framework built on Swoole or Swow, distributed as a set of Composer components with hyperf/framework providing the core container, AOP, annotations, and event handling. It offers a Laravel-like developer experience with dependency injection, an ORM, caching, queues, and validation, but it is not a Laravel package. It runs as a long-lived process rather than per-request PHP-FPM, which is the source of its throughput advantages.
Can I install hyperf/framework inside an existing Laravel application?
No. Hyperf is a standalone framework with its own application skeleton, container, and coroutine runtime, so adding hyperf/framework to a Laravel app will not make Laravel coroutine-based. If you want coroutine performance with Laravel, consider Laravel Octane with Swoole or RoadRunner. Use Hyperf for new services where you want its native coroutine and AOP model.
How do I install and start a new Hyperf project?
For a normal application, create a project from hyperf/hyperf-skeleton instead of requiring hyperf/framework directly, because the skeleton wires up configuration, the entrypoint, and required components. Then run composer install and start the server with php bin/hyperf.php start. Requiring hyperf/framework alone is intended for building custom kernels or reusable components.
What PHP extensions and runtime does Hyperf require?
Hyperf needs a coroutine runtime: either the Swoole extension with coroutine support enabled or Swow. You will also need standard PHP extensions such as pdo, redis, and json depending on which components you use. Check the skeleton's composer.json and the installation docs for the exact extension list and recommended versions.
Does Hyperf support PHP 8.1, 8.2, and 8.3?
Hyperf 3.x targets PHP 8.0 and above, and the 3.1 line requires PHP 8.1 or newer, so PHP 8.2 and 8.3 are supported on current releases. Older 2.x lines cover PHP 7.4 and 8.0 but are end-of-life or in maintenance. Confirm exact PHP and extension constraints in the composer.json of the hyperf/framework version you install.
Can I use Eloquent, Blade, and Laravel packages with Hyperf?
Hyperf has its own database ORM component with a Laravel-like query builder, but it is not Eloquent by default, and Blade is not part of the core. Some Laravel components can be adapted, but many rely on PHP-FPM globals and per-request lifecycles that do not map cleanly to a long-running coroutine server. Prefer Hyperf-native components such as hyperf/database, hyperf/view, and hyperf/validation.
How do dependency injection and AOP annotations work in Hyperf?
Hyperf uses a PSR-11 container with annotation and attribute-driven configuration: classes marked with attributes such as Controller, Inject, and Aspect are discovered and wired at startup. AOP lets you wrap method calls with aspects for logging, transactions, or caching without modifying the target class. Because annotations are compiled into a runtime cache, you must restart or reload the server after changing them.
Is Hyperf safe for production, and how do I avoid memory leaks?
Hyperf is designed for production and is used for APIs and microservices, but long-running coroutine processes require discipline. Avoid storing request data in singletons or static properties, close resources when done, and bound in-memory caches. Use the provided reload and graceful shutdown commands for deploys, and monitor memory while tuning Swoole settings such as max_request where appropriate.
How do I write and run tests for a Hyperf application?
Hyperf integrates with PHPUnit, and the hyperf/testing component provides helpers for bootstrapping the container and writing coroutine-aware test cases. Because the framework is coroutine-based, tests that touch I/O should run inside a coroutine context or use the provided testing utilities. Run tests with the standard vendor/bin/phpunit command.
What are the alternatives to hyperf/framework for high-performance PHP?
Alternatives include Laravel Octane with Swoole or RoadRunner, Spiral Framework with RoadRunner, and lower-level async stacks such as ReactPHP and AMPHP. Hyperf's main differentiators are its native coroutine runtime, annotation-driven dependency injection and AOP, and built-in microservice governance components. Choose Hyperf when you want those features as a cohesive framework rather than assembling them yourself.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
vento/laravel-airbrake
wfeller/laravel-batch
maco-studios/mage-os-installer
busarm/armie
siberfx/laravel-logger
kfteam1991/dcat-admin
dashed/dashed-laposta
dashed/dashed-ecommerce-montaportal
dashed/dashed-ecommerce-etsy
neohq/string-blade-compiler
log1x/acf-composer
cgv/localized-resource
noith/settings
kda/laravel-package
kda/filament-dynamic-navigation
bypersoft/signbox
pairus/product-data
fayne/laravel-filament-cms-core
nodisrupt/laravel-agent
sierratecnologia/media-manager