initphp/http-factory

This package is abandoned and no longer maintained. The author suggests using the initphp/http package instead.

PSR17 HTTP Factory Library (DEPRECATED — merged into initphp/http:^2.2)

Maintainers

Package info

github.com/InitPHP/HTTPFactory

pkg:composer/initphp/http-factory

Statistics

Installs: 14

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

1.0.1 2026-05-24 08:47 UTC

This package is auto-updated.

Last update: 2026-05-24 08:48:56 UTC


README

⚠️ 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