Skip to content

Commit

Permalink
Merge pull request #3106 from t0mmy742/support_guzzle_psr17_2_0
Browse files Browse the repository at this point in the history
Use PSR-17 factory from Guzzle/psr7 2.0
  • Loading branch information
l0gicgate committed Aug 19, 2021
2 parents c431514 + 45607c9 commit b9b6339
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
4 changes: 2 additions & 2 deletions Slim/Factory/Psr17/GuzzlePsr17Factory.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@

class GuzzlePsr17Factory extends Psr17Factory
{
protected static $responseFactoryClass = 'Http\Factory\Guzzle\ResponseFactory';
protected static $streamFactoryClass = 'Http\Factory\Guzzle\StreamFactory';
protected static $responseFactoryClass = 'GuzzleHttp\Psr7\HttpFactory';
protected static $streamFactoryClass = 'GuzzleHttp\Psr7\HttpFactory';
protected static $serverRequestCreatorClass = 'GuzzleHttp\Psr7\ServerRequest';
protected static $serverRequestCreatorMethod = 'fromGlobals';
}
1 change: 0 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@
"ext-simplexml": "*",
"adriansuter/php-autoload-override": "^1.2",
"guzzlehttp/psr7": "^2.0",
"http-interop/http-factory-guzzle": "^1.2",
"laminas/laminas-diactoros": "^2.6",
"nyholm/psr7": "^1.4",
"nyholm/psr7-server": "^1.0",
Expand Down
4 changes: 2 additions & 2 deletions tests/Factory/AppFactoryTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

namespace Slim\Tests\Factory;

use Http\Factory\Guzzle\ResponseFactory as GuzzleResponseFactory;
use GuzzleHttp\Psr7\HttpFactory;
use Laminas\Diactoros\ResponseFactory as LaminasDiactorosResponseFactory;
use Nyholm\Psr7\Factory\Psr17Factory;
use Psr\Container\ContainerInterface;
Expand Down Expand Up @@ -46,7 +46,7 @@ public function provideImplementations()
return [
[SlimPsr17Factory::class, SlimResponseFactory::class],
[NyholmPsr17Factory::class, Psr17Factory::class],
[GuzzlePsr17Factory::class, GuzzleResponseFactory::class],
[GuzzlePsr17Factory::class, HttpFactory::class],
[LaminasDiactorosPsr17Factory::class, LaminasDiactorosResponseFactory::class],
[ZendDiactorosPsr17Factory::class, ZendDiactorosResponseFactory::class],
];
Expand Down

0 comments on commit b9b6339

Please sign in to comment.