Skip to content

v2.0.0

Choose a tag to compare

@cbatista8a cbatista8a released this 06 Nov 12:25
· 24 commits to main since this release

2.0.0 (2025-11-06)

Bug Fixes

  • comment out unnecessary permission setting step in release workflow (69e98be)
  • improve Git permissions handling and streamline version bump process in release workflow (ce4dab7)
  • improve Git permissions handling and streamline version bump process in release workflow (#76) (a6fdbb7)
  • improve release building (#70) (a1ead17), closes #67 #68
  • remove unnecessary space in webhook_secret in .env.testing.example (3b144fd)
  • remove unnecessary space in webhook_secret in .env.testing.example (db2c3d7)
  • remove unnecessary spaces in .env.example and update semver.yml to configure environment file before composer install (4bb0334)
  • reorder format code step for proper execution in release process (6074770)
  • reorder format code step for proper execution in release process (4fe5b3f)
  • uncomment permission setting step in release workflow and add GitHub token to PHP setup (8806b74)
  • update checkout action to v4 and clean up release job steps (d7457b6)
  • update checkout action to v4 and clean up release job steps (#75) (d3d1ad1)
  • update composer install command to prevent script execution during pipeline (4480d13)
  • update composer install command to prevent script execution during pipeline (16d2e48)
  • update dispatch_mode to synchronous and improve dotenv fallback logic in bootstrap testing (f05c901)
  • update GitHub Actions to use checkout@v4 and improve permission handling in release workflow (58c2589)

Features

  • add .editorconfig and .gitattributes for consistent coding styles and line endings (7da75d0)
  • core and modules separation (#68) (39541fe)
  • It introduces full compatibility with the PSR standard, allowing separation between the responsibilities of the kernel and the modules. (#67) (ae5121a)
  • separates core and modules (#69) (f0df4ac), closes #67 #68

BREAKING CHANGES

  • HttpHandler now requires ResponseFactoryInterface injected via constructor

Changes:

  • HttpHandler: Changed from 'new HttpFactory()' to injected ResponseFactoryInterface parameter
  • All 4 controllers updated: HomeController, WebHookController, HealthController, NotFoundController
  • New test doubles: DummyStream, DummyResponse, DummyResponseFactory (pure PSR implementations)
  • Updated test files: RouterTest, JWTAuthMiddlewareTest, WebHookControllerTest
  • Contracts package now truly PSR-only (no GuzzleHttp imports)
  • Tests now Guzzle-independent (use pure PSR test doubles)
  • All 168 tests passing (328 assertions)

Benefits:
✅ Dependency Inversion: High-level modules depend on PSR interfaces, not concrete implementations
✅ Testability: Easy to inject test doubles or mock implementations
✅ Package Purity: Contracts contains only PSR standard interfaces
✅ Flexibility: Different ResponseFactoryInterface implementations can be used

Architecture:

  • HttpHandler now uses constructor injection for ResponseFactoryInterface
  • TestHttpHandler has optional parameter with DummyResponseFactory default
  • Pure PSR test doubles eliminate external library dependencies from tests
  • Clear separation between production (Guzzle) and test (Dummy) implementations

Files modified: 8
Files created: 5 (3 test doubles + 2 docs)

  • fix: update LogLevel import to use the correct namespace

  • refactor: Move AuthenticatedController to Auth module

Move AuthenticatedController from Home to Auth module where it logically belongs.
This controller demonstrates authentication with the AuthCheckMiddleware.

Changes:

  • Moved: modules/Home/Infrastructure/Controllers/AuthenticatedController.php
    → modules/Auth/Infrastructure/Controllers/AuthenticatedController.php
  • Created: modules/Auth/Config/routes.json with auth-example route
  • Updated: modules/Home/Config/routes.json (removed auth-example route)
  • Updated: AuthenticatedController now properly injects ResponseFactoryInterface

Benefits:
✅ Better module organization: Authentication examples in Auth module
✅ Cleaner separation of concerns: Home module focuses on homepage only
✅ Consistent with new dependency injection pattern

Tests: All 171 tests passing (333 assertions)

  • feat: Implement Auth Module with Basic Authentication and Middlewares
  • Added comprehensive documentation for the Auth module, detailing its features, components, and usage.
  • Introduced BasicAuthMiddleware for handling HTTP Basic Authentication.
  • Created LoginController for managing login requests and responses.
  • Developed DefaultCredentialsVerifier for secure password verification.
  • Implemented tests for DefaultCredentialsVerifier to ensure correct password handling and timing attack prevention.
  • Added BasicAuthMiddlewareTest to validate authentication flow, including handling of valid and invalid credentials.
  • Established event dispatching for authentication events to enhance monitoring and logging.
  • Included examples for configuring credentials and authenticating users via cURL and PHP.
  • fix: Update middleware reference in routes and add test for middleware handling

  • refactor: Update event logging to include detailed request and response information

  • test: Update log message format and adjust expectations in RouterTest

  • refactor: moves LoggerEventListener to Logging module for event logging

  • Introduce ConfigurationInterface and refactor PsrLogger to use it
  • refactor: replace Configuration class with ConfigurationInterface in ContainerTest
  • removes old EventListener class
  • feat: Implement Cache Module with File and InMemory drivers, update service configuration

  • refactor: Replace Configuration class with ConfigurationInterface in Application

  • fix: Add missing return type annotation for get method in InMemoryCache

  • feat: Implement ConsoleExceptionFormatter for improved error handling in CLI

  • adds some service alias on modules for console commands discovering
  • refactor: moves DTOFactory to the Cli namespace

  • feat: introduce composer.json into modules

  • Add use cases for module management

  • Update dependency injection and service definitions

  • Modify ContainerFactory to check for installed modules before initializing services.

  • Adjust Container to handle missing services gracefully.

test: Remove obsolete tests and update class factory tests

  • feat: Implement installed modules filtering in Core

feat(event): Introduce RouteNotFoundEvent and RouteNotFoundListener on module to avoid direct dependencies

  • Created RouteNotFoundEvent to handle 404 scenarios with custom responses.
  • Implemented RouteNotFoundListener to manage route not found events and redirect to a 404 page.
  • Updated EventBus to register and execute event listeners without module dependencies.

chore(tests): General updates to tests for improved reliability

    • refactor: it separates core testing from module testing.

This allows each module to test its functionality independently, while the core validates the correct functioning of the entire application.

  • HttpHandler now requires ResponseFactoryInterface injected via constructor

Changes:

  • HttpHandler: Changed from 'new HttpFactory()' to injected ResponseFactoryInterface parameter
  • All 4 controllers updated: HomeController, WebHookController, HealthController, NotFoundController
  • New test doubles: DummyStream, DummyResponse, DummyResponseFactory (pure PSR implementations)
  • Updated test files: RouterTest, JWTAuthMiddlewareTest, WebHookControllerTest
  • Contracts package now truly PSR-only (no GuzzleHttp imports)
  • Tests now Guzzle-independent (use pure PSR test doubles)
  • All 168 tests passing (328 assertions)

Benefits:
✅ Dependency Inversion: High-level modules depend on PSR interfaces, not concrete implementations
✅ Testability: Easy to inject test doubles or mock implementations
✅ Package Purity: Contracts contains only PSR standard interfaces
✅ Flexibility: Different ResponseFactoryInterface implementations can be used

Architecture:

  • HttpHandler now uses constructor injection for ResponseFactoryInterface
  • TestHttpHandler has optional parameter with DummyResponseFactory default
  • Pure PSR test doubles eliminate external library dependencies from tests
  • Clear separation between production (Guzzle) and test (Dummy) implementations

Files modified: 8
Files created: 5 (3 test doubles + 2 docs)

  • fix: update LogLevel import to use the correct namespace

  • refactor: Move AuthenticatedController to Auth module

Move AuthenticatedController from Home to Auth module where it logically belongs.
This controller demonstrates authentication with the AuthCheckMiddleware.

Changes:

  • Moved: modules/Home/Infrastructure/Controllers/AuthenticatedController.php
    → modules/Auth/Infrastructure/Controllers/AuthenticatedController.php
  • Created: modules/Auth/Config/routes.json with auth-example route
  • Updated: modules/Home/Config/routes.json (removed auth-example route)
  • Updated: AuthenticatedController now properly injects ResponseFactoryInterface

Benefits:
✅ Better module organization: Authentication examples in Auth module
✅ Cleaner separation of concerns: Home module focuses on homepage only
✅ Consistent with new dependency injection pattern

Tests: All 171 tests passing (333 assertions)

  • feat: Implement Auth Module with Basic Authentication and Middlewares
  • Added comprehensive documentation for the Auth module, detailing its features, components, and usage.
  • Introduced BasicAuthMiddleware for handling HTTP Basic Authentication.
  • Created LoginController for managing login requests and responses.
  • Developed DefaultCredentialsVerifier for secure password verification.
  • Implemented tests for DefaultCredentialsVerifier to ensure correct password handling and timing attack prevention.
  • Added BasicAuthMiddlewareTest to validate authentication flow, including handling of valid and invalid credentials.
  • Established event dispatching for authentication events to enhance monitoring and logging.
  • Included examples for configuring credentials and authenticating users via cURL and PHP.
  • fix: Update middleware reference in routes and add test for middleware handling

  • refactor: Update event logging to include detailed request and response information

  • test: Update log message format and adjust expectations in RouterTest

  • refactor: moves LoggerEventListener to Logging module for event logging

  • Introduce ConfigurationInterface and refactor PsrLogger to use it
  • refactor: replace Configuration class with ConfigurationInterface in ContainerTest
  • removes old EventListener class
  • feat: Implement Cache Module with File and InMemory drivers, update service configuration

  • refactor: Replace Configuration class with ConfigurationInterface in Application

  • fix: Add missing return type annotation for get method in InMemoryCache

  • feat: Implement ConsoleExceptionFormatter for improved error handling in CLI

  • adds some service alias on modules for console commands discovering
  • refactor: moves DTOFactory to the Cli namespace

  • feat: introduce composer.json into modules

  • Add use cases for module management

  • Update dependency injection and service definitions

  • Modify ContainerFactory to check for installed modules before initializing services.

  • Adjust Container to handle missing services gracefully.

test: Remove obsolete tests and update class factory tests

  • feat: Implement installed modules filtering in Core

feat(event): Introduce RouteNotFoundEvent and RouteNotFoundListener on module to avoid direct dependencies

  • Created RouteNotFoundEvent to handle 404 scenarios with custom responses.
  • Implemented RouteNotFoundListener to manage route not found events and redirect to a 404 page.
  • Updated EventBus to register and execute event listeners without module dependencies.

chore(tests): General updates to tests for improved reliability

  • HttpHandler now requires ResponseFactoryInterface injected via constructor

Changes:

  • HttpHandler: Changed from 'new HttpFactory()' to injected ResponseFactoryInterface parameter
  • All 4 controllers updated: HomeController, WebHookController, HealthController, NotFoundController
  • New test doubles: DummyStream, DummyResponse, DummyResponseFactory (pure PSR implementations)
  • Updated test files: RouterTest, JWTAuthMiddlewareTest, WebHookControllerTest
  • Contracts package now truly PSR-only (no GuzzleHttp imports)
  • Tests now Guzzle-independent (use pure PSR test doubles)
  • All 168 tests passing (328 assertions)

Benefits:
✅ Dependency Inversion: High-level modules depend on PSR interfaces, not concrete implementations
✅ Testability: Easy to inject test doubles or mock implementations
✅ Package Purity: Contracts contains only PSR standard interfaces
✅ Flexibility: Different ResponseFactoryInterface implementations can be used

Architecture:

  • HttpHandler now uses constructor injection for ResponseFactoryInterface
  • TestHttpHandler has optional parameter with DummyResponseFactory default
  • Pure PSR test doubles eliminate external library dependencies from tests
  • Clear separation between production (Guzzle) and test (Dummy) implementations

Files modified: 8
Files created: 5 (3 test doubles + 2 docs)

  • fix: update LogLevel import to use the correct namespace

  • refactor: Move AuthenticatedController to Auth module

Move AuthenticatedController from Home to Auth module where it logically belongs.
This controller demonstrates authentication with the AuthCheckMiddleware.

Changes:

  • Moved: modules/Home/Infrastructure/Controllers/AuthenticatedController.php
    → modules/Auth/Infrastructure/Controllers/AuthenticatedController.php
  • Created: modules/Auth/Config/routes.json with auth-example route
  • Updated: modules/Home/Config/routes.json (removed auth-example route)
  • Updated: AuthenticatedController now properly injects ResponseFactoryInterface

Benefits:
✅ Better module organization: Authentication examples in Auth module
✅ Cleaner separation of concerns: Home module focuses on homepage only
✅ Consistent with new dependency injection pattern

Tests: All 171 tests passing (333 assertions)

  • feat: Implement Auth Module with Basic Authentication and Middlewares
  • Added comprehensive documentation for the Auth module, detailing its features, components, and usage.
  • Introduced BasicAuthMiddleware for handling HTTP Basic Authentication.
  • Created LoginController for managing login requests and responses.
  • Developed DefaultCredentialsVerifier for secure password verification.
  • Implemented tests for DefaultCredentialsVerifier to ensure correct password handling and timing attack prevention.
  • Added BasicAuthMiddlewareTest to validate authentication flow, including handling of valid and invalid credentials.
  • Established event dispatching for authentication events to enhance monitoring and logging.
  • Included examples for configuring credentials and authenticating users via cURL and PHP.
  • fix: Update middleware reference in routes and add test for middleware handling

  • refactor: Update event logging to include detailed request and response information

  • test: Update log message format and adjust expectations in RouterTest

  • refactor: moves LoggerEventListener to Logging module for event logging

  • Introduce ConfigurationInterface and refactor PsrLogger to use it
  • refactor: replace Configuration class with ConfigurationInterface in ContainerTest
  • removes old EventListener class
  • feat: Implement Cache Module with File and InMemory drivers, update service configuration

  • refactor: Replace Configuration class with ConfigurationInterface in Application

  • fix: Add missing return type annotation for get method in InMemoryCache

  • feat: Implement ConsoleExceptionFormatter for improved error handling in CLI

  • adds some service alias on modules for console commands discovering
  • refactor: moves DTOFactory to the Cli namespace

  • feat: introduce composer.json into modules

  • Add use cases for module management

  • Update dependency injection and service definitions

  • Modify ContainerFactory to check for installed modules before initializing services.

  • Adjust Container to handle missing services gracefully.

test: Remove obsolete tests and update class factory tests

  • feat: Implement installed modules filtering in Core

feat(event): Introduce RouteNotFoundEvent and RouteNotFoundListener on module to avoid direct dependencies

  • Created RouteNotFoundEvent to handle 404 scenarios with custom responses.
  • Implemented RouteNotFoundListener to manage route not found events and redirect to a 404 page.
  • Updated EventBus to register and execute event listeners without module dependencies.

chore(tests): General updates to tests for improved reliability