componenta/app-http 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

componenta/app-http

Composer 安装命令:

composer require componenta/app-http

包简介

HTTP runtime integration for Componenta applications

README 文档

README

HTTP runtime integration for Componenta applications. The package connects componenta/app with a PSR-15 middleware pipeline, server request creation, and PSR-7 response emitting.

Use this package when the application must handle HTTP requests. Routing, body parsing, response helpers, and concrete PSR-7 implementations live in separate packages.

Installation

composer require componenta/app-http

The package exposes Componenta\App\Server\ConfigProvider through Composer metadata.

Dependencies

The package requires PHP ^8.4, componenta/app, componenta/config, componenta/http-emitter, componenta/http-psr, componenta/middleware-factory, componenta/path-resolver, componenta/pipeline, nyholm/psr7-server, PSR-11, and PSR-15 middleware contracts.

Registered Services

ConfigProvider registers:

Service or config key Purpose
HttpAppAdapter Creates an HTTP application for the HTTP scope.
HttpBootTargetAdapter Adapts the HTTP application to a boot target.
HttpBootloader Loads configured middleware into the HTTP pipeline.
App The HTTP application implementation.

Runtime Behavior

The HTTP app creates a server request through componenta/http-psr, runs it through the configured middleware pipeline, and emits the resulting PSR-7 response through componenta/http-emitter.

During HTTP boot, HttpBootloader requires config/pipeline.php through the configured path resolver. That file is responsible for calling $app->pipe(...) on the HTTP boot target.

<?php

declare(strict_types=1);

use Componenta\App\Boot\Target\HttpBootTargetInterface;

/** @var HttpBootTargetInterface $app */
$app->pipe(App\Http\Middleware\ExampleMiddleware::class);

This package does not add routes by itself. Register componenta/router-app when routing middleware should be piped during boot.

Related Packages

统计信息

  • 总下载量: 0
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 1
  • 依赖项目数: 2
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-06-14

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固