• v0.4.0 1b43844b3f

    RouterFacade Stable

    ahokponou released this 2025-07-01 22:26:59 +00:00 | 11 commits to main since this release

    What's new

    • RouterFacade class

    Introduced a new RouterFacade class to provide a simplified interface for route registration, pattern mapping and route path generation.

    Bug fixes

    • Pattern mapping fix

    Full Changelog: https://github.com/oladesoftware/httpcrafter/compare/v0.3.0...v0.4.0

    Downloads
  • v0.3.0 1a42fc6980

    ahokponou released this 2025-07-01 16:47:56 +00:00 | 13 commits to main since this release

    Update existing generatePath() method in the Router class to generate paths with dynamic values. This should allow developers to create URLs with parameters or dynamic segments without manually concatenating strings.

    Example:

    Assuming dynamic segment userID
    $router->generatePath('profile', [ 'userID' => 123 ]);
    Output: '/account/profile/123'

    Full chancelog

    Downloads
  • v0.2.2 d5d7dfc668

    ahokponou released this 2025-01-14 13:14:14 +00:00 | 16 commits to main since this release

    • Set ? to allow nullable for name parameter for Router->addRoute()

    Full chancelogs

    Downloads
  • v0.2.1 84be51acbd

    ahokponou released this 2025-01-02 17:51:36 +00:00 | 17 commits to main since this release

    Require PHP 8.2 and greater

    Full chancelogs

    Downloads
  • v0.2.0 a61422c061

    ahokponou released this 2024-12-09 20:40:29 +00:00 | 18 commits to main since this release

    What's new?

    • Add redirection method to Response class

    Usage:

    // Redirect to the specified URL with a 301 Moved Permanently status code
    $response->redirect('https://www.example.com', 301);
    // Redirect to the specified URL with a 302 Moved Temporary status code
    $response->redirect('/new-page', 302);
    

    Full chancelogs

    Downloads
  • v0.1.3 e2b924ca77

    ahokponou released this 2024-10-10 17:33:21 +00:00 | 19 commits to main since this release

    Refactor Response Content-Length handling and add interfaces for Authenticator and Authorization

    • Moved Content-Length calculation logic to a private updateContentLength() method to improve encapsulation and reusability.
    • Updated send() method to call the updateContentLength() method before sending the headers.
    • Introduced interfaces for Authenticator and Authorization to standardize authentication and authorization mechanisms.

    Full chancelogs

    Downloads
  • v0.1.2 d291b8e21e

    ahokponou released this 2024-10-08 20:11:34 +00:00 | 20 commits to main since this release

    Release Notes for v0.1.2

    • Hotfix: Fixed the calculation of the Content-Length header in the Response class to ensure accurate length is set based on the body content.
    • Issue Addressed: Previous implementation incorrectly calculated the Content-Length using strlen() on the length itself instead of the actual content length.
    Downloads
  • v0.1.1 bf4b96e1ce

    ahokponou released this 2024-10-07 22:35:13 +00:00 | 21 commits to main since this release

    hotfixes: Content-Length calculation based on type

    Fullchancelogs

    Downloads
  • v0.1.0 a2f71ef617

    ahokponou released this 2024-10-07 19:57:32 +00:00 | 23 commits to main since this release

    Enhancements to Httpcrafter

    This release brings a significant restructuring of core components within the HTTP toolbox, along with the addition of a flexible routing solution. These updates enhance modularity and ease of use for developers looking to integrate individual tools.

    Key Changes:

    • Refactor of Request and Response Classes

      • The Request.php and Response.php files have been reorganized into the src/Http/ directory, improving file structure and accessibility.
      • New interfaces—RequestInterface.php and ResponseInterface.php—have been introduced, providing more flexibility for developers to implement custom request and response handling.
    • Introduction of Router Class

      • We've added the Router class from the archived oladesoftware/router repository, which now serves as a foundational routing component within the HTTP toolbox.
      • The new Router class is available at src/Router/Router.php, with corresponding tests in tests/Router/RouterTest.php.
    • Updated Test Suite

      • The directory structure for test files has been updated to align with the new organization:
        • tests/RequestTest.phptests/Http/RequestTest.php
        • tests/ResponseTest.phptests/Http/ResponseTest.php

    These updates further strengthen the modularity of the Httpcrafter, ensuring that each class can be used independently for a variety of use cases, while maintaining a clean and organized architecture.

    Full Changelog

    Downloads
  • v0.0.3 1fbfd002df

    ahokponou released this 2024-06-19 15:39:53 +00:00 | 23 commits to main since this release

    bug fix in response class:

    • set content-type

    set requirement for php version

    Full chancelogs

    Downloads