diff --git a/CHANGELOG.md b/CHANGELOG.md index b85d5a3..d8c1035 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,11 @@ All notable changes to `Slytherin` will be documented in this file. +## [0.9.9](https://github.com/rougin/slytherin/compare/v0.9.7...v0.9.8) - Unreleased + +### Changed +- Do not override `System` implementations if already defined from `ContainerInterface` + ## [0.9.8](https://github.com/rougin/slytherin/compare/v0.9.7...v0.9.8) - 2024-05-23 ### Added diff --git a/src/Http/HttpIntegration.php b/src/Http/HttpIntegration.php index b9c601b..623dc16 100644 --- a/src/Http/HttpIntegration.php +++ b/src/Http/HttpIntegration.php @@ -141,9 +141,17 @@ protected function resolve(ContainerInterface $container, ServerRequestInterface $request = ServerRequestFactory::fromGlobals(); } - $container->set(System::REQUEST, $request); + if (! $container->has(System::REQUEST)) + { + $container->set(System::REQUEST, $request); + } + + if (! $container->has(System::RESPONSE)) + { + $container->set(System::RESPONSE, $response); + } - return $container->set(System::RESPONSE, $response); + return $container; } /**