From 08d1cd3834fd97293d85b164e63023435a5f92fa Mon Sep 17 00:00:00 2001 From: Damian Mooyman Date: Mon, 9 Apr 2018 11:44:26 +1200 Subject: [PATCH] API Remove isDev / isTest querystring arguments --- src/Core/BaseKernel.php | 23 ------------------- .../Startup/ErrorControlChainMiddleware.php | 5 +--- .../Startup/ParameterConfirmationToken.php | 1 - 3 files changed, 1 insertion(+), 28 deletions(-) diff --git a/src/Core/BaseKernel.php b/src/Core/BaseKernel.php index 8b57ff0a5..632ab1437 100644 --- a/src/Core/BaseKernel.php +++ b/src/Core/BaseKernel.php @@ -269,12 +269,6 @@ abstract class BaseKernel implements Kernel return $this->enviroment; } - // Check saved session - $env = $this->sessionEnvironment(); - if ($env) { - return $env; - } - // Check getenv if ($env = Environment::getEnv('SS_ENVIRONMENT_TYPE')) { return $env; @@ -283,23 +277,6 @@ abstract class BaseKernel implements Kernel return self::LIVE; } - /** - * Check or update any temporary environment specified in the session. - * - * @return null|string - * - * @deprecated 5.0 Use Director::get_session_environment_type() instead - */ - protected function sessionEnvironment() - { - if (!$this->booted) { - // session is not initialyzed yet, neither is manifest - return null; - } - - return Director::get_session_environment_type(); - } - abstract public function boot($flush = false); abstract public function isFlushed(); diff --git a/src/Core/Startup/ErrorControlChainMiddleware.php b/src/Core/Startup/ErrorControlChainMiddleware.php index e2f2738b6..d6ba136f8 100644 --- a/src/Core/Startup/ErrorControlChainMiddleware.php +++ b/src/Core/Startup/ErrorControlChainMiddleware.php @@ -53,10 +53,7 @@ class ErrorControlChainMiddleware implements HTTPMiddleware { $chain = new ConfirmationTokenChain(); $chain->pushToken(new URLConfirmationToken('dev/build', $request)); - - foreach (['isTest', 'isDev', 'flush'] as $parameter) { - $chain->pushToken(new ParameterConfirmationToken($parameter, $request)); - } + $chain->pushToken(new ParameterConfirmationToken('flush', $request)); return $chain; } diff --git a/src/Core/Startup/ParameterConfirmationToken.php b/src/Core/Startup/ParameterConfirmationToken.php index 6c164f9b6..783665a84 100644 --- a/src/Core/Startup/ParameterConfirmationToken.php +++ b/src/Core/Startup/ParameterConfirmationToken.php @@ -129,7 +129,6 @@ class ParameterConfirmationToken extends AbstractConfirmationToken public function suppress() { - unset($_GET[$this->parameterName]); $this->request->offsetUnset($this->parameterName); }