Skip to content

Fix deprecated classes usage #547

Fix deprecated classes usage

Fix deprecated classes usage #547

Triggered via pull request August 21, 2026 17:50
Status Success
Total duration 56s
Artifacts –

mutation.yml

on: pull_request
Matrix: mutation / roave-infection
Fit to window
Zoom out
Zoom in

Annotations

9 warnings
mutation / PHP 8.3-ubuntu-latest: src/Login/Cookie/CookieLoginMiddleware.php#L137
Escaped Mutant for Mutator "ReturnRemoval": @@ @@ if ($expires !== 0 && $expires < time()) { $this->logger->warning('Unable to authenticate user by cookie. Lifetime has expired.'); - return; + } $this->currentUser->login($identity);
mutation / PHP 8.3-ubuntu-latest: src/Login/Cookie/CookieLoginMiddleware.php#L135
Escaped Mutant for Mutator "LessThan": @@ @@ return; } - if ($expires !== 0 && $expires < time()) { + if ($expires !== 0 && $expires <= time()) { $this->logger->warning('Unable to authenticate user by cookie. Lifetime has expired.'); return; }
mutation / PHP 8.3-ubuntu-latest: src/Login/Cookie/CookieLoginMiddleware.php#L132
Escaped Mutant for Mutator "ReturnRemoval": @@ @@ if (!$identity->validateCookieLoginKey($key)) { $this->logger->warning('Unable to authenticate user by cookie. Invalid key.'); - return; + } if ($expires !== 0 && $expires < time()) {
mutation / PHP 8.3-ubuntu-latest: src/Login/Cookie/CookieLoginMiddleware.php#L97
Escaped Mutant for Mutator "IncrementInteger": @@ @@ } try { - $data = json_decode((string) $cookies[$cookieName], true, 512, JSON_THROW_ON_ERROR); + $data = json_decode((string) $cookies[$cookieName], true, 513, JSON_THROW_ON_ERROR); } catch (Throwable) { $this->logger->warning('Unable to authenticate user by cookie. Invalid cookie.'); return;
mutation / PHP 8.3-ubuntu-latest: src/Login/Cookie/CookieLoginMiddleware.php#L97
Escaped Mutant for Mutator "DecrementInteger": @@ @@ } try { - $data = json_decode((string) $cookies[$cookieName], true, 512, JSON_THROW_ON_ERROR); + $data = json_decode((string) $cookies[$cookieName], true, 511, JSON_THROW_ON_ERROR); } catch (Throwable) { $this->logger->warning('Unable to authenticate user by cookie. Invalid cookie.'); return;
mutation / PHP 8.3-ubuntu-latest: src/Login/Cookie/CookieLoginMiddleware.php#L44
Escaped Mutant for Mutator "FalseValue": @@ @@ private IdentityRepositoryInterface $identityRepository, private LoggerInterface $logger, private CookieLogin $cookieLogin, - private bool $forceAddCookie = false, + private bool $forceAddCookie = true, ) {} /**
mutation / PHP 8.3-ubuntu-latest: src/Login/Cookie/CookieLogin.php#L78
Escaped Mutant for Mutator "BitwiseOr": @@ @@ $data[] = 0; } - $cookieValue = json_encode($data, JSON_THROW_ON_ERROR | JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE); + $cookieValue = json_encode($data, JSON_THROW_ON_ERROR | JSON_UNESCAPED_SLASHES & JSON_UNESCAPED_UNICODE); return (new Cookie(name: $this->cookieName, value: $cookieValue, expires: $expires))->addToResponse($response); }
mutation / PHP 8.3-ubuntu-latest: src/Login/Cookie/CookieLogin.php#L42
Escaped Mutant for Mutator "CloneRemoval": @@ @@ */ public function withCookieName(string $name): self { - $new = clone $this; + $new = $this; $new->cookieName = $name; return $new; }
mutation / PHP 8.3-ubuntu-latest: src/CurrentUser.php#L313
Escaped Mutant for Mutator "LogicalOrAllSubExprNegation": @@ @@ /** @var mixed $id */ $id = $this->session->get(self::SESSION_AUTH_ID); - if ($id !== null && ($this->authTimeout !== null || $this->absoluteAuthTimeout !== null)) { + if ($id !== null && (!($this->authTimeout !== null) || !($this->absoluteAuthTimeout !== null))) { $expire = $this->getExpire(); $expireAbsolute = $this->getExpireAbsolute();