Skip to content
This repository was archived by the owner on Oct 15, 2025. It is now read-only.

Commit f5e7836

Browse files
committed
refactor(config): Migrate http_discovery.yaml to PHP
1 parent a896aa1 commit f5e7836

File tree

2 files changed

+22
-10
lines changed

2 files changed

+22
-10
lines changed

config/packages/http_discovery.php

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
<?php
2+
3+
declare(strict_types=1);
4+
5+
use Http\Discovery\Psr17Factory;
6+
use Psr\Http\Message\RequestFactoryInterface;
7+
use Psr\Http\Message\ResponseFactoryInterface;
8+
use Psr\Http\Message\ServerRequestFactoryInterface;
9+
use Psr\Http\Message\StreamFactoryInterface;
10+
use Psr\Http\Message\UploadedFileFactoryInterface;
11+
use Psr\Http\Message\UriFactoryInterface;
12+
use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
13+
14+
return static function (ContainerConfigurator $containerConfigurator): void {
15+
$containerConfigurator->services()
16+
->alias(RequestFactoryInterface::class, Psr17Factory::class)
17+
->alias(ResponseFactoryInterface::class, Psr17Factory::class)
18+
->alias(ServerRequestFactoryInterface::class, Psr17Factory::class)
19+
->alias(StreamFactoryInterface::class, Psr17Factory::class)
20+
->alias(UploadedFileFactoryInterface::class, Psr17Factory::class)
21+
->alias(UriFactoryInterface::class, Psr17Factory::class);
22+
};

config/packages/http_discovery.yaml

Lines changed: 0 additions & 10 deletions
This file was deleted.

0 commit comments

Comments
 (0)