-
RouterFacade Stable
released this
2025-07-01 22:26:59 +00:00 | 11 commits to main since this releaseWhat's new
RouterFacadeclass
Introduced a new
RouterFacadeclass 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
-
Source code (ZIP)
0 downloads
-
Source code (TAR.GZ)
0 downloads
-
released this
2025-07-01 16:47:56 +00:00 | 13 commits to main since this releaseUpdate 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'Downloads
-
Source code (ZIP)
0 downloads
-
Source code (TAR.GZ)
0 downloads
-
Source code (ZIP)
-
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()
Downloads
-
Source code (ZIP)
0 downloads
-
Source code (TAR.GZ)
0 downloads
-
Set PHP minimum requirement Stable
released this
2025-01-02 17:51:36 +00:00 | 17 commits to main since this releaseRequire PHP 8.2 and greater
Downloads
-
Source code (ZIP)
0 downloads
-
Source code (TAR.GZ)
0 downloads
-
Source code (ZIP)
-
released this
2024-12-09 20:40:29 +00:00 | 18 commits to main since this releaseWhat'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);Downloads
-
Source code (ZIP)
0 downloads
-
Source code (TAR.GZ)
0 downloads
-
released this
2024-10-10 17:33:21 +00:00 | 19 commits to main since this releaseRefactor 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 theupdateContentLength()method before sending the headers. - Introduced interfaces for
AuthenticatorandAuthorizationto standardize authentication and authorization mechanisms.
Downloads
-
Source code (ZIP)
0 downloads
-
Source code (TAR.GZ)
0 downloads
- Moved Content-Length calculation logic to a private
-
released this
2024-10-08 20:11:34 +00:00 | 20 commits to main since this releaseRelease 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
-
Source code (ZIP)
0 downloads
-
Source code (TAR.GZ)
0 downloads
-
release v0.1.1 Stable
released this
2024-10-07 22:35:13 +00:00 | 21 commits to main since this releasehotfixes: Content-Length calculation based on type
Downloads
-
Source code (ZIP)
0 downloads
-
Source code (TAR.GZ)
0 downloads
-
Source code (ZIP)
-
release v0.1.0 Stable
released this
2024-10-07 19:57:32 +00:00 | 23 commits to main since this releaseEnhancements 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.phpandResponse.phpfiles have been reorganized into thesrc/Http/directory, improving file structure and accessibility. - New interfaces—
RequestInterface.phpandResponseInterface.php—have been introduced, providing more flexibility for developers to implement custom request and response handling.
- The
-
Introduction of Router Class
- We've added the
Routerclass from the archived oladesoftware/router repository, which now serves as a foundational routing component within the HTTP toolbox. - The new
Routerclass is available atsrc/Router/Router.php, with corresponding tests intests/Router/RouterTest.php.
- We've added the
-
Updated Test Suite
- The directory structure for test files has been updated to align with the new organization:
tests/RequestTest.php→tests/Http/RequestTest.phptests/ResponseTest.php→tests/Http/ResponseTest.php
- The directory structure for test files has been updated to align with the new organization:
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.
Downloads
-
Source code (ZIP)
0 downloads
-
Source code (TAR.GZ)
0 downloads
-
-
release v0.0.3 Stable
released this
2024-06-19 15:39:53 +00:00 | 23 commits to main since this releaseDownloads
-
Source code (ZIP)
0 downloads
-
Source code (TAR.GZ)
0 downloads
-
Source code (ZIP)