Update to laravel 7

This commit is contained in:
KodeStar
2022-03-10 11:54:29 +00:00
parent 61a5a1a8b0
commit f9a19fce91
7170 changed files with 274189 additions and 283773 deletions

View File

@@ -23,7 +23,7 @@ interface SessionInterface
/**
* Starts the session storage.
*
* @return bool True if session started
* @return bool
*
* @throws \RuntimeException if session fails to start
*/
@@ -32,30 +32,26 @@ interface SessionInterface
/**
* Returns the session ID.
*
* @return string The session ID
* @return string
*/
public function getId();
/**
* Sets the session ID.
*
* @param string $id
*/
public function setId($id);
public function setId(string $id);
/**
* Returns the session name.
*
* @return mixed The session name
* @return string
*/
public function getName();
/**
* Sets the session name.
*
* @param string $name
*/
public function setName($name);
public function setName(string $name);
/**
* Invalidates the current session.
@@ -68,9 +64,9 @@ interface SessionInterface
* to expire with browser session. Time is in seconds, and is
* not a Unix timestamp.
*
* @return bool True if session invalidated, false if error
* @return bool
*/
public function invalidate($lifetime = null);
public function invalidate(int $lifetime = null);
/**
* Migrates the current session to a new session id while maintaining all
@@ -82,9 +78,9 @@ interface SessionInterface
* to expire with browser session. Time is in seconds, and is
* not a Unix timestamp.
*
* @return bool True if session migrated, false if error
* @return bool
*/
public function migrate($destroy = false, $lifetime = null);
public function migrate(bool $destroy = false, int $lifetime = null);
/**
* Force the session to be saved and closed.
@@ -98,52 +94,44 @@ interface SessionInterface
/**
* Checks if an attribute is defined.
*
* @param string $name The attribute name
*
* @return bool true if the attribute is defined, false otherwise
* @return bool
*/
public function has($name);
public function has(string $name);
/**
* Returns an attribute.
*
* @param string $name The attribute name
* @param mixed $default The default value if not found
* @param mixed $default The default value if not found
*
* @return mixed
*/
public function get($name, $default = null);
public function get(string $name, $default = null);
/**
* Sets an attribute.
*
* @param string $name
* @param mixed $value
* @param mixed $value
*/
public function set($name, $value);
public function set(string $name, $value);
/**
* Returns attributes.
*
* @return array Attributes
* @return array
*/
public function all();
/**
* Sets attributes.
*
* @param array $attributes Attributes
*/
public function replace(array $attributes);
/**
* Removes an attribute.
*
* @param string $name
*
* @return mixed The removed value or null when it does not exist
*/
public function remove($name);
public function remove(string $name);
/**
* Clears all attributes.
@@ -165,11 +153,9 @@ interface SessionInterface
/**
* Gets a bag instance by name.
*
* @param string $name
*
* @return SessionBagInterface
*/
public function getBag($name);
public function getBag(string $name);
/**
* Gets session meta.