PHPackages                             hydrakit/core - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Framework](/categories/framework)
4. /
5. hydrakit/core

ActiveLibrary[Framework](/categories/framework)

hydrakit/core
=============

Core library for Hydra PHP framework

v0.2.0(yesterday)035—3.3%9MITPHP &gt;=8.2

Since Jul 6Compare

[ Source](https://github.com/hydra-foundation/core)[ Packagist](https://packagist.org/packages/hydrakit/core)[ RSS](/packages/hydrakit-core/feed)WikiDiscussions Synced today

READMEChangelogDependencies (2)Versions (4)Used By (9)

Hydra Core
==========

[](#hydra-core)

The framework-agnostic foundation: the application object, the contracts every other package depends on, environment loading, and a base service provider. Core defines interfaces and orchestration — it ships no concrete container, kernel, or HTTP layer. Those are bound by the application at runtime.

Contracts
---------

[](#contracts)

The public API every other package codes against.

- **`KernelInterface`** — `handle()` runs the request lifecycle and emits the response (returns nothing); `terminate()` performs post-response clean-up.
- **`ServiceProviderInterface`** — `register()` binds services into the container; `boot()` runs once all providers are registered.
- **`ContainerInterface`** — extends PSR-11's `ContainerInterface` and adds `singleton()` (autowires a class-string or uses a callable factory; every entry is shared — there is no transient binding yet), `instance()` (register an already-constructed object), and `bound()` (does a binding exist). Core declares this interface only; the concrete container is supplied by the app.

Environment
-----------

[](#environment)

`Environment` reads `/.env` once, at construction, and exposes typed accessors: `get()`, `has()`, `string()`, `int()`, `bool()`, and `required()`. A missing `.env` is tolerated.

- **Precedence** — the real process environment wins: a variable already set in `$_ENV`, `$_SERVER`, or via the OS (`getenv`) overrides the `.env` file's value, so deployments override checked-in defaults without editing the file. `.env` values fill the gaps (and are exported to `$_ENV`/`putenv`) but never clobber a variable the process already has.
- **`int()`** — a present-but-non-integer value throws rather than silently coercing to `0`.
- **`bool()`** — accepts, case-insensitively: `true`/`false`, `1`/`0`, `yes`/`no`, `on`/`off`. A missing key returns the default; any other present value (including an empty string) throws, same policy as `int()`.
- **`required()`** — returns the value or throws when the key is unset or empty, naming the missing key. Use it for config the app cannot run without.

Construct `Environment` exactly once per process, in your composition root, and share the instance (Hydra's kernel binds the one the bootstrap builds into the container). There is deliberately no internal static cache — the single construction is explicit.

Providers
---------

[](#providers)

`Providers\ServiceProvider` is a concrete base class with empty `register()`and `boot()` methods. App and package providers extend it and override what they need; bindings are registered here.

Application
-----------

[](#application)

`Application` accepts a `ContainerInterface` and owns the boot sequence:

- `register(ServiceProviderInterface)` — registers a provider (and boots it immediately if the app has already booted).
- `boot()` — boots every registered provider exactly once.
- `run()` — boots, resolves the `KernelInterface` from the container, calls `handle()`, flushes the response with `fastcgi_finish_request()` when available, then calls `terminate()`.

###  Health Score

41

—

FairBetter than 87% of packages

Maintenance100

Actively maintained with recent releases

Popularity11

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity38

Early-stage or recently created project

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~1 days

Total

3

Last Release

1d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/a947272da0bf1d7d6326b4fbf6ddb8049977cbdbe333d0d1282dbb6f5927dfdf?d=identicon)[whleucka](/maintainers/whleucka)

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/hydrakit-core/health.svg)

```
[![Health](https://phpackages.com/badges/hydrakit-core/health.svg)](https://phpackages.com/packages/hydrakit-core)
```

###  Alternatives

[laravel/framework

The Laravel Framework.

34.8k543.8M20.3k](/packages/laravel-framework)[symfony/symfony

The Symfony PHP framework

31.4k87.2M2.2k](/packages/symfony-symfony)[cakephp/cakephp

The CakePHP framework

8.9k19.5M1.8k](/packages/cakephp-cakephp)[bref/bref

Bref is a framework to write and deploy serverless PHP applications on AWS Lambda.

3.4k10.6M67](/packages/bref-bref)[tempest/framework

The PHP framework that gets out of your way.

2.2k34.4k15](/packages/tempest-framework)[typo3/cms

TYPO3 CMS is a free open source Content Management Framework initially created by Kasper Skaarhoj and licensed under GNU/GPL.

1.2k1.9M122](/packages/typo3-cms)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
