[HttpFoundation] Add ReturnTypeWillChange to SessionHandlers
This commit is contained in:
parent
ca61cd64b1
commit
8954b4f922
|
@ -31,6 +31,7 @@ abstract class AbstractSessionHandler implements \SessionHandlerInterface, \Sess
|
|||
/**
|
||||
* @return bool
|
||||
*/
|
||||
#[\ReturnTypeWillChange]
|
||||
public function open($savePath, $sessionName)
|
||||
{
|
||||
$this->sessionName = $sessionName;
|
||||
|
@ -66,6 +67,7 @@ abstract class AbstractSessionHandler implements \SessionHandlerInterface, \Sess
|
|||
/**
|
||||
* @return bool
|
||||
*/
|
||||
#[\ReturnTypeWillChange]
|
||||
public function validateId($sessionId)
|
||||
{
|
||||
$this->prefetchData = $this->read($sessionId);
|
||||
|
@ -86,6 +88,7 @@ abstract class AbstractSessionHandler implements \SessionHandlerInterface, \Sess
|
|||
/**
|
||||
* @return string
|
||||
*/
|
||||
#[\ReturnTypeWillChange]
|
||||
public function read($sessionId)
|
||||
{
|
||||
if (null !== $this->prefetchId) {
|
||||
|
@ -109,6 +112,7 @@ abstract class AbstractSessionHandler implements \SessionHandlerInterface, \Sess
|
|||
/**
|
||||
* @return bool
|
||||
*/
|
||||
#[\ReturnTypeWillChange]
|
||||
public function write($sessionId, $data)
|
||||
{
|
||||
if (null === $this->igbinaryEmptyData) {
|
||||
|
@ -126,6 +130,7 @@ abstract class AbstractSessionHandler implements \SessionHandlerInterface, \Sess
|
|||
/**
|
||||
* @return bool
|
||||
*/
|
||||
#[\ReturnTypeWillChange]
|
||||
public function destroy($sessionId)
|
||||
{
|
||||
if (!headers_sent() && filter_var(ini_get('session.use_cookies'), \FILTER_VALIDATE_BOOLEAN)) {
|
||||
|
|
|
@ -33,6 +33,7 @@ class StrictSessionHandler extends AbstractSessionHandler
|
|||
/**
|
||||
* @return bool
|
||||
*/
|
||||
#[\ReturnTypeWillChange]
|
||||
public function open($savePath, $sessionName)
|
||||
{
|
||||
parent::open($savePath, $sessionName);
|
||||
|
@ -51,6 +52,7 @@ class StrictSessionHandler extends AbstractSessionHandler
|
|||
/**
|
||||
* @return bool
|
||||
*/
|
||||
#[\ReturnTypeWillChange]
|
||||
public function updateTimestamp($sessionId, $data)
|
||||
{
|
||||
return $this->write($sessionId, $data);
|
||||
|
@ -67,6 +69,7 @@ class StrictSessionHandler extends AbstractSessionHandler
|
|||
/**
|
||||
* @return bool
|
||||
*/
|
||||
#[\ReturnTypeWillChange]
|
||||
public function destroy($sessionId)
|
||||
{
|
||||
$this->doDestroy = true;
|
||||
|
@ -88,14 +91,16 @@ class StrictSessionHandler extends AbstractSessionHandler
|
|||
/**
|
||||
* @return bool
|
||||
*/
|
||||
#[\ReturnTypeWillChange]
|
||||
public function close()
|
||||
{
|
||||
return $this->handler->close();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return bool
|
||||
* @return int|false
|
||||
*/
|
||||
#[\ReturnTypeWillChange]
|
||||
public function gc($maxlifetime)
|
||||
{
|
||||
return $this->handler->gc($maxlifetime);
|
||||
|
|
|
@ -38,6 +38,7 @@ class SessionHandlerProxy extends AbstractProxy implements \SessionHandlerInterf
|
|||
/**
|
||||
* @return bool
|
||||
*/
|
||||
#[\ReturnTypeWillChange]
|
||||
public function open($savePath, $sessionName)
|
||||
{
|
||||
return (bool) $this->handler->open($savePath, $sessionName);
|
||||
|
@ -46,6 +47,7 @@ class SessionHandlerProxy extends AbstractProxy implements \SessionHandlerInterf
|
|||
/**
|
||||
* @return bool
|
||||
*/
|
||||
#[\ReturnTypeWillChange]
|
||||
public function close()
|
||||
{
|
||||
return (bool) $this->handler->close();
|
||||
|
@ -54,6 +56,7 @@ class SessionHandlerProxy extends AbstractProxy implements \SessionHandlerInterf
|
|||
/**
|
||||
* @return string
|
||||
*/
|
||||
#[\ReturnTypeWillChange]
|
||||
public function read($sessionId)
|
||||
{
|
||||
return (string) $this->handler->read($sessionId);
|
||||
|
@ -62,6 +65,7 @@ class SessionHandlerProxy extends AbstractProxy implements \SessionHandlerInterf
|
|||
/**
|
||||
* @return bool
|
||||
*/
|
||||
#[\ReturnTypeWillChange]
|
||||
public function write($sessionId, $data)
|
||||
{
|
||||
return (bool) $this->handler->write($sessionId, $data);
|
||||
|
@ -70,22 +74,25 @@ class SessionHandlerProxy extends AbstractProxy implements \SessionHandlerInterf
|
|||
/**
|
||||
* @return bool
|
||||
*/
|
||||
#[\ReturnTypeWillChange]
|
||||
public function destroy($sessionId)
|
||||
{
|
||||
return (bool) $this->handler->destroy($sessionId);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return bool
|
||||
* @return int|false
|
||||
*/
|
||||
#[\ReturnTypeWillChange]
|
||||
public function gc($maxlifetime)
|
||||
{
|
||||
return (bool) $this->handler->gc($maxlifetime);
|
||||
return $this->handler->gc($maxlifetime);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return bool
|
||||
*/
|
||||
#[\ReturnTypeWillChange]
|
||||
public function validateId($sessionId)
|
||||
{
|
||||
return !$this->handler instanceof \SessionUpdateTimestampHandlerInterface || $this->handler->validateId($sessionId);
|
||||
|
@ -94,6 +101,7 @@ class SessionHandlerProxy extends AbstractProxy implements \SessionHandlerInterf
|
|||
/**
|
||||
* @return bool
|
||||
*/
|
||||
#[\ReturnTypeWillChange]
|
||||
public function updateTimestamp($sessionId, $data)
|
||||
{
|
||||
return $this->handler instanceof \SessionUpdateTimestampHandlerInterface ? $this->handler->updateTimestamp($sessionId, $data) : $this->write($sessionId, $data);
|
||||
|
|
Reference in New Issue