We are thrilled to announce the inaugural release of the CommonPHP Web Library, tagged as v0.1!
Highlights of v0.1:
- HTTP Request Handling: Introduction of the
Request
class, empowering developers to handle HTTP requests with unprecedented ease, including support for request methods, schemes, headers, cookies, and parameters. - HTTP Response Management: Launch of the
Response
class, allowing for the structured creation and management of HTTP responses, including customizable status codes, headers, and body content. - Robust Exception Handling: Implementation of specialized exceptions (
UndefinedRequestMethodException
,UndefinedRequestSchemeException
, andUndefinedResponseStatusCodeException
), designed to streamline the troubleshooting process and enhance application reliability. - Support Enums: Addition of
RequestMethod
andRequestScheme
enums, alongsideResponseStatus
, facilitating more readable and maintainable code by providing clear, concise representations of HTTP standards.
Getting Started
To integrate the CommonPHP Web Library into your project, simply add it via Composer with the following command:
composer require comphp/web