PHPackages                             t-rex-dino/dino-library - 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. [PSR &amp; Standards](/categories/psr-standards)
4. /
5. t-rex-dino/dino-library

ActiveLibrary[PSR &amp; Standards](/categories/psr-standards)

t-rex-dino/dino-library
=======================

A lightweight PHP library for service management, configuration handling, and dependency injection.

1.2.0(6mo ago)00MITPHPPHP &gt;=8.1CI passing

Since Nov 11Pushed 6mo agoCompare

[ Source](https://github.com/t-rex-dino/dino-library)[ Packagist](https://packagist.org/packages/t-rex-dino/dino-library)[ RSS](/packages/t-rex-dino-dino-library/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (3)Dependencies (5)Versions (4)Used By (0)

[![Dino Library Banner](docs/assets/dino-banner.jpeg)](docs/assets/dino-banner.jpeg)

🦕 Dino Library
==============

[](#-dino-library)

Dino Library is a lightweight, extensible PHP library designed to manage services, configurations, and dependency injection in a clean and modular way.

---

🚀 Installation
--------------

[](#-installation)

```

composer require t-rex-dino/dino-library

```

---

📁 Project Structure
-------------------

[](#-project-structure)

```

src/
├── Contracts/           // Core interfaces
├── Exceptions/          // Custom exception classes
├── Core/                // Main library classes

tests/
├── Unit/                // PHPUnit unit tests

examples/
├── *.php                // Practical usage examples

docs/
├── Guides/              // Conceptual guides
├── API-Reference/       // API documentation
├── Examples/            // Example explanations
├── Tutorials/           // Step-by-step tutorials

```

---

🧩 Quick Usage
-------------

[](#-quick-usage)

### LibraryManager

[](#librarymanager)

```

use Dino\Core\LibraryManager;

$manager = new LibraryManager();
$manager->register('logger', new Logger());
$logger = $manager->get('logger');

```

### ConfigHandler with Validation

[](#confighandler-with-validation)

```

use Dino\Core\ConfigHandler;
use Dino\Validation\Rules\RequiredValidator;

$config = new ConfigHandler();
$config->registerValidator(new RequiredValidator());
$config->set('app.name', 'Dino Library');

```

### ServiceContainer with Factory

[](#servicecontainer-with-factory)

```

use Dino\Core\ServiceContainer;
use Dino\Contracts\FactoryInterface;

class LoggerFactory implements FactoryInterface {
    public function create(...$params): object {
        return new Logger();
    }
}

$container = new ServiceContainer();
$container->addFactory('logger', new LoggerFactory());
$logger = $container->get('logger');

```

### ⚡ Lazy Loading

[](#-lazy-loading)

```

$container->singleton('heavyService', fn() => new HeavyService(), true);
$service = $container->get('heavyService'); // created only when accessed

```

### 🔗 Dependency Injection

[](#-dependency-injection)

```

$resolver = new DependencyResolver($container);
$controller = $resolver->resolve(Controller::class);

```

---

🧪 Running Tests
---------------

[](#-running-tests)

```

vendor/bin/phpunit --bootstrap tests/bootstrap.php tests/Unit

```

---

📚 Examples
----------

[](#-examples)

Example files are located in the `examples/` directory:

- basic-usage.php
- config-handler-demo.php
- service-container-demo.php
- config-validation-demo.php
- service-provider-demo.php (New in 1.2.0)
- lazy-loading-demo.php (New in 1.2.0)
- service-tagging-demo.php (New in 1.2.0)
- advanced-di-demo.php (New in 1.2.0)

```

php examples/advanced-di-demo.php

```

---

🤝 Contributing
--------------

[](#-contributing)

Contributions are welcome! Please submit issues, pull requests, or suggestions. For guidelines, refer to `CONTRIBUTING.md`.

---

🧙‍♂️ Development Team
---------------------

[](#‍️-development-team)

- **t-rex-dino** – Project Manager &amp; Repository Maintainer
- **DeepSeek AI** – Architect &amp; Optimization Specialist
- **Copilot** – Lead Developer &amp; Documentation Specialist

---

📄 License
---------

[](#-license)

This project is licensed under the MIT License.

###  Health Score

32

—

LowBetter than 72% of packages

Maintenance69

Regular maintenance activity

Popularity0

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity46

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

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

2

Last Release

182d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/7926453d9f70b501a6c5703365da77ee7a12a57343ebfef028126b0f1cc95046?d=identicon)[t-rex-dino](/maintainers/t-rex-dino)

---

Top Contributors

[![t-rex-dino](https://avatars.githubusercontent.com/u/133510439?v=4)](https://github.com/t-rex-dino "t-rex-dino (127 commits)")

---

Tags

phpPSR-11configurationdependency-injectionlibrarylightweightmodularservice containerdependency injection containerservice-management

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/t-rex-dino-dino-library/health.svg)

```
[![Health](https://phpackages.com/badges/t-rex-dino-dino-library/health.svg)](https://phpackages.com/packages/t-rex-dino-dino-library)
```

###  Alternatives

[phpwatch/simple-container

A fast and minimal PSR-11 compatible Dependency Injection Container with array-syntax and without auto-wiring

1810.1k2](/packages/phpwatch-simple-container)

PHPackages © 2026

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