diff --git a/system/CodeIgniter.php b/system/CodeIgniter.php index 96e455da1c1a..f9ddacc3b24e 100644 --- a/system/CodeIgniter.php +++ b/system/CodeIgniter.php @@ -135,25 +135,6 @@ class CodeIgniter */ protected static $cacheTTL = 0; - /** - * Request path to use. - * - * @var string - * - * @deprecated No longer used. - */ - protected $path; - - /** - * Should the Response instance "pretend" - * to keep from setting headers/cookies/etc - * - * @var bool - * - * @deprecated No longer used. - */ - protected $useSafeOutput = false; - /** * Context * web: Invoked by HTTP request @@ -385,22 +366,6 @@ public function run(?RouteCollectionInterface $routes = null, bool $returnRespon $this->sendResponse(); } - /** - * Set our Response instance to "pretend" mode so that things like - * cookies and headers are not actually sent, allowing PHP 7.2+ to - * not complain when ini_set() function is used. - * - * @return $this - * - * @deprecated No longer used. - */ - public function useSafeOutput(bool $safe = true) - { - $this->useSafeOutput = $safe; - - return $this; - } - /** * Invoked via php-cli command? */ @@ -846,30 +811,9 @@ protected function tryToRouteIt(?RouteCollectionInterface $routes = null) */ protected function determinePath() { - if (! empty($this->path)) { - return $this->path; - } - return method_exists($this->request, 'getPath') ? $this->request->getPath() : $this->request->getUri()->getPath(); } - /** - * Allows the request path to be set from outside the class, - * instead of relying on CLIRequest or IncomingRequest for the path. - * - * This is not used now. - * - * @return $this - * - * @deprecated No longer used. - */ - public function setPath(string $path) - { - $this->path = $path; - - return $this; - } - /** * Now that everything has been setup, this method attempts to run the * controller method and make the script go. If it's not able to, will diff --git a/tests/system/CodeIgniterTest.php b/tests/system/CodeIgniterTest.php index 54ea3d10445c..b7b5e092e609 100644 --- a/tests/system/CodeIgniterTest.php +++ b/tests/system/CodeIgniterTest.php @@ -87,7 +87,7 @@ public function testRunEmptyDefaultRouteReturnResponse(): void $_SERVER['argv'] = ['index.php']; $_SERVER['argc'] = 1; - $response = $this->codeigniter->useSafeOutput(true)->run(null, true); + $response = $this->codeigniter->run(null, true); $this->assertStringContainsString('Welcome to CodeIgniter', $response->getBody()); } @@ -164,7 +164,7 @@ public function testRun404OverrideReturnResponse(): void $router = Services::router($routes, Services::incomingrequest()); Services::injectMock('router', $router); - $response = $this->codeigniter->useSafeOutput(true)->run($routes, true); + $response = $this->codeigniter->run($routes, true); $this->assertStringContainsString('Oops', $response->getBody()); }