From cdc436401ada87e92a9dee4271384d24ccd43a61 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Danijel=20Gali=C4=87?= Date: Thu, 22 Oct 2026 10:19:34 +0200 Subject: [PATCH 1/4] Add @inheritDoc annotations to exception classes for improved documentation --- src/Exception/CircularModuleDependencyException.php | 5 +++++ src/Exception/ModuleAlreadyRegisteredException.php | 5 +++++ src/Exception/ModuleDependencyNotFoundException.php | 5 +++++ src/Exception/ModuleManagerFrozenException.php | 5 +++++ src/Exception/ModuleNotFoundException.php | 5 +++++ 5 files changed, 25 insertions(+) diff --git a/src/Exception/CircularModuleDependencyException.php b/src/Exception/CircularModuleDependencyException.php index e4df5a9..35e3dda 100644 --- a/src/Exception/CircularModuleDependencyException.php +++ b/src/Exception/CircularModuleDependencyException.php @@ -23,6 +23,11 @@ */ final class CircularModuleDependencyException extends RuntimeException { + /** + * @inheritDoc + * + * @since 1.0.0 + */ protected const string DEFAULT_MESSAGE = 'Circular module dependency detected'; } \ No newline at end of file diff --git a/src/Exception/ModuleAlreadyRegisteredException.php b/src/Exception/ModuleAlreadyRegisteredException.php index 6cdab93..21f886a 100644 --- a/src/Exception/ModuleAlreadyRegisteredException.php +++ b/src/Exception/ModuleAlreadyRegisteredException.php @@ -21,6 +21,11 @@ */ final class ModuleAlreadyRegisteredException extends RuntimeException { + /** + * @inheritDoc + * + * @since 1.0.0 + */ protected const string DEFAULT_MESSAGE = 'The module identifier is already registered'; } \ No newline at end of file diff --git a/src/Exception/ModuleDependencyNotFoundException.php b/src/Exception/ModuleDependencyNotFoundException.php index bdbd0ff..bd06623 100644 --- a/src/Exception/ModuleDependencyNotFoundException.php +++ b/src/Exception/ModuleDependencyNotFoundException.php @@ -23,6 +23,11 @@ */ final class ModuleDependencyNotFoundException extends RuntimeException { + /** + * @inheritDoc + * + * @since 1.0.0 + */ protected const string DEFAULT_MESSAGE = 'The module dependency was not found'; } \ No newline at end of file diff --git a/src/Exception/ModuleManagerFrozenException.php b/src/Exception/ModuleManagerFrozenException.php index 2fb2664..c42a1c8 100644 --- a/src/Exception/ModuleManagerFrozenException.php +++ b/src/Exception/ModuleManagerFrozenException.php @@ -23,6 +23,11 @@ */ final class ModuleManagerFrozenException extends RuntimeException { + /** + * @inheritDoc + * + * @since 1.0.0 + */ protected const string DEFAULT_MESSAGE = 'The module manager is frozen'; } \ No newline at end of file diff --git a/src/Exception/ModuleNotFoundException.php b/src/Exception/ModuleNotFoundException.php index 91623b7..65ef189 100644 --- a/src/Exception/ModuleNotFoundException.php +++ b/src/Exception/ModuleNotFoundException.php @@ -21,6 +21,11 @@ */ final class ModuleNotFoundException extends OutOfBoundsException { + /** + * @inheritDoc + * + * @since 1.0.0 + */ protected const string DEFAULT_MESSAGE = 'The module identifier was not found'; } \ No newline at end of file From 48aaeac57fc984967cb9ad4143d04650658905bc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Danijel=20Gali=C4=87?= Date: Fri, 23 Oct 2026 14:32:09 +0200 Subject: [PATCH 2/4] Add method to check for service registrations in modules --- src/Manager.php | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/src/Manager.php b/src/Manager.php index 2db6aae..54cab16 100644 --- a/src/Manager.php +++ b/src/Manager.php @@ -185,6 +185,27 @@ public function registerServices (Registrar $registrar):void { } + /** + * ### Checks whether modules provide service registrations + * + * Determines whether at least one registered module supports dependency injection service registration. + * @since 1.0.0 + * + * @return bool True if service registration is required. + */ + public function hasServiceRegistrations ():bool { + + foreach ($this->modules as $module) { + + if ($module instanceof RegistersServices) + return true; + + } + + return false; + + } + /** * ### Freezes the module registry * From 819da540ff3e676b5553b042544af50ea19dbaae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Danijel=20Gali=C4=87?= Date: Mon, 26 Oct 2026 13:00:09 +0100 Subject: [PATCH 3/4] Update type hint for lifecycle engine in Application.php and bump version to 0.1.1 in README.md --- CHANGELOG.md | 5 +++++ README.md | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6828060..4ca6c99 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,11 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [[v0.1.1](https://github.com/The-FireHub-Project/Module/compare/v0.1.0...v0.1.1)] – 2026-10-26 + +### Added +* Add a method to check for service registrations in modules by @dieselxxx + ## [v0.1.0] – 2026-10-21 ### Added diff --git a/README.md b/README.md index 08fbc74..3644063 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ /> version From 36044e98471448561cb2a22f8c0aa2f3c4300a0f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Danijel=20Gali=C4=87?= <56673130+dieselxxx@users.noreply.github.com> Date: Mon, 26 Oct 2026 13:01:15 +0100 Subject: [PATCH 4/4] Update README.md --- README.md | 99 ++++++++++++++++++++++++++++++++++--------------------- 1 file changed, 62 insertions(+), 37 deletions(-) diff --git a/README.md b/README.md index 3644063..3cd3066 100644 --- a/README.md +++ b/README.md @@ -22,10 +22,6 @@ /> -[![PHPStan](https://github.com/The-FireHub-Project/Module/actions/workflows/PHPStan.yml/badge.svg?branch=develop)](https://github.com/The-FireHub-Project/Module/actions/workflows/PHPStan.yml) -[![PHPUnit](https://github.com/The-FireHub-Project/Module/actions/workflows/PHPUnit.yml/badge.svg?branch=develop)](https://github.com/The-FireHub-Project/Module/actions/workflows/PHPUnit.yml) -[![Codecov](https://codecov.io/gh/The-FireHub-Project/Module/branch/develop/graph/badge.svg?token=XW2YEONF51)](https://app.codecov.io/gh/The-FireHub-Project/Module/tree/develop) -

-Provides the dependency injection and service management foundation of the FireHub ecosystem. This repository contains the runtime components responsible for service registration, dependency resolution, instance creation, and service lifetime management, enabling consistent and loosely coupled application architectures. +FireHub Module provides modular application composition and lifecycle integration for The FireHub Project. It enables applications to organize related functionality into cohesive, reusable modules while maintaining clear architectural boundaries and separation of concerns. -FireHub Module is built around the contracts defined by FireHub Core and provides a modular implementation of the Inversion of Control principle. It separates service definitions from their runtime resolution, allowing applications and framework components to declare dependencies without managing their construction directly. +Built around the contracts defined by FireHub Core, FireHub Module provides the mechanisms for module registration, dependency coordination, initialization ordering, and integration with the application lifecycle. Modules can contribute services, configuration, and lifecycle behavior without introducing independent application runtimes. -This repository serves as a foundational runtime component for FireHub applications, adapters, and capabilities, supporting clean architecture, testability, extensibility, and predictable dependency management. +FireHub Module serves as an application composition and orchestration component within the FireHub ecosystem. It supports Clean Architecture and Domain-Driven Design by enabling applications to assemble independent functional units while preserving centralized lifecycle management through FireHub Application and execution infrastructure through FireHub Kernel. --- -## FireHub Icon Development Branch +## FireHub Icon Repository Purpose + +FireHub Module is the modular application composition and orchestration component of the FireHub ecosystem. + +Built on the contracts provided by FireHub Core, it supplies the mechanisms required to organize, register, coordinate, and integrate functional modules within FireHub applications. + +The purpose of this repository is to provide a consistent modular architecture while preserving separation of concerns between application composition, dependency management, and runtime execution. -⚠️ **This is the `develop` branch** +The Module architecture is designed to support: -- Unstable -- APIs may change without notice -- Not intended for production use +* Modular organization of application functionality +* Registration and management of application modules +* Module dependency declaration and resolution +* Dependency ordering and circular dependency detection +* Integration with application initialization and disposal +* Module-specific service registration and configuration +* Shared application dependency injection infrastructure +* Reusable and independently developed functional modules +* Predictable module initialization and disposal ordering +* Compatibility with Clean Architecture and Domain-Driven Design -## FireHub Icon Branch Purpose +FireHub Module follows the architectural principles of The FireHub Project by separating responsibilities between module composition, application lifecycle orchestration, dependency injection, and runtime execution. -The `develop` branch is the **primary integration branch** for all ongoing development. +Modules do not own independent application kernels or lifecycle state machines. Instead, they participate in the lifecycle of their hosting application through well-defined initialization and disposal mechanisms. -It serves as the staging area where: -- Feature branches are merged -- Bug fixes are integrated -- Experimental work is stabilized -- Code is prepared for upcoming releases +The Module component does not control application execution, dependency injection scopes, or kernel lifecycle transitions. These responsibilities remain with FireHub Application, FireHub Container, and FireHub Kernel. -All **release branches** are created **from `develop`**. +This separation enables applications to organize functionality into modular units without introducing unnecessary runtime complexity or coupling between modules and execution infrastructure. -## Stability Guarantee +## FireHub Icon Security -❌ No backward compatibility guarantee -❌ APIs may change without notice -❌ Behavior may be incomplete or inconsistent -❌ Breaking changes are expected +For security reporting and guidelines, please refer to our [SECURITY.md](https://github.com/The-FireHub-Project/.github/blob/master/.github/SECURITY.md) file. -This branch is intended **only for contributors and advanced testers**. +## FireHub Icon Community -## FireHub Icon Composer Usage (Not Recommended) +![GitHub watchers](https://img.shields.io/github/watchers/The-FireHub-Project/Module?style=social) +![GitHub Repo stars](https://img.shields.io/github/stars/The-FireHub-Project/Module?style=social) +![GitHub forks](https://img.shields.io/github/forks/The-FireHub-Project/Module?style=social) + +- Be sure to review the [Code of Conduct](https://github.com/The-FireHub-Project/.github/blob/master/.github/CODE_OF_CONDUCT.md). +- Read a [Contributing](https://github.com/The-FireHub-Project/.github/blob/master/.github/CONTRIBUTING.md) file to see how you can contribute to this project. +- Read our [Security policy](https://github.com/The-FireHub-Project/.github/blob/master/.github/SECURITY.md) file to see how you can report a vulnerability. +- Review the project [Governance model](https://github.com/The-FireHub-Project/.github/blob/master/.github/GOVERNANCE.md), including roles, decision-making, RFC process, and releases. + +## FireHub Icon Support + +

+ + GitHub in-progress issues + + GitHub total issues + + GitHub opened pull requests +

-For internal testing only: +For help with FireHub products, please refer to the following resources: -```json -{ - "require": { - "the-firehub-project/module": "dev-develop" - } -} -``` -⚠️ Never use dev-develop in production. +- **General questions & discussions**: [GitHub Discussions](https://github.com/orgs/The-FireHub-Project/discussions) +- **Bug reports & issues**: [Support](https://github.com/The-FireHub-Project/Module/issues) +- **Documentation & guides**: [FireHub Docs](https://the-firehub-project.github.io) +- **Commercial support** (Pro/Enterprise): contact your account manager ## FireHub Icon Authors and Contributors @@ -134,4 +159,4 @@ Architecture guidelines, design principles, and ecosystem documentation are avai This software is licensed under the Apache-2.0 License. -For more details, read the full license [here](./LICENSE). \ No newline at end of file +For more details, read the full license [here](./LICENSE).