Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
This repository was archived by the owner on May 24, 2026. It is now read-only.

InitPHP/HTTPFactory

Open more actions menu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
3 Commits
 
 
 
 
 
 
 
 
 
 

HTTPFactory

⚠️ DEPRECATED — Use initphp/http instead

As part of the InitPHP package consolidation, this package has been merged into initphp/http starting with version 2.2. The consolidated package ships its own PSR-17 factory under \InitPHP\HTTP\Factory\Factory.

This repository is kept read-only for historical reference. No further updates will be released.

Why this package no longer works

\InitPHP\HTTPFactory\HTTPFactory was written against initphp/http:^1.x, which used the flat \InitPHP\HTTP\* namespace. In initphp/http:^2.0 those classes moved to \InitPHP\HTTP\Message\*, so this package's use statements no longer resolve.

Migration

- "initphp/http-factory": "^1.0",
- "initphp/http": "^1.0",
+ "initphp/http": "^2.2"

Your existing imports keep working: initphp/http:^2.2 ships a class_alias so \InitPHP\HTTPFactory\HTTPFactory remains resolvable. Composer also declares a replace for this package, so the two will not be installed side-by-side.

When you next touch the code, prefer the canonical class:

// Before
use InitPHP\HTTPFactory\HTTPFactory;
$factory = new HTTPFactory();

// After
use InitPHP\HTTP\Factory\Factory;
$factory = new Factory();

PSR-17 HTTP Factory Library

Requirements

Installation

composer require initphp/http-factory

Usage

require_once "vendor/autoload.php";
use InitPHP\HTTPFactory\HTTPFactory;

$http = new HTTPFactory();

$request = $http->createRequest('GET', 'https://www.muhammetsafak.com.tr');

Credits

License

Copyright © 2022 MIT License

About

PSR-17 HTTP Factory Library

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages

Morty Proxy This is a proxified and sanitized view of the page, visit original site.