mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-30 14:08:46 +02:00
N°6934 - Symfony 6.4 - upgrade Symfony bundles to 6.4 (#580)
* Update Symfony lib to version ~6.4.0 * Update code missing return type * Add an iTop general configuration entry to store application secret (Symfony mandatory parameter) * Use dependency injection in ExceptionListener & UserProvider classes
This commit is contained in:
@@ -23,33 +23,31 @@ interface SessionInterface
|
||||
/**
|
||||
* Starts the session storage.
|
||||
*
|
||||
* @return bool
|
||||
*
|
||||
* @throws \RuntimeException if session fails to start
|
||||
*/
|
||||
public function start();
|
||||
public function start(): bool;
|
||||
|
||||
/**
|
||||
* Returns the session ID.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getId();
|
||||
public function getId(): string;
|
||||
|
||||
/**
|
||||
* Sets the session ID.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function setId(string $id);
|
||||
|
||||
/**
|
||||
* Returns the session name.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getName();
|
||||
public function getName(): string;
|
||||
|
||||
/**
|
||||
* Sets the session name.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function setName(string $name);
|
||||
|
||||
@@ -59,28 +57,24 @@ interface SessionInterface
|
||||
* Clears all session attributes and flashes and regenerates the
|
||||
* session and deletes the old session from persistence.
|
||||
*
|
||||
* @param int $lifetime Sets the cookie lifetime for the session cookie. A null value
|
||||
* will leave the system settings unchanged, 0 sets the cookie
|
||||
* to expire with browser session. Time is in seconds, and is
|
||||
* not a Unix timestamp.
|
||||
*
|
||||
* @return bool
|
||||
* @param int|null $lifetime Sets the cookie lifetime for the session cookie. A null value
|
||||
* will leave the system settings unchanged, 0 sets the cookie
|
||||
* to expire with browser session. Time is in seconds, and is
|
||||
* not a Unix timestamp.
|
||||
*/
|
||||
public function invalidate(int $lifetime = null);
|
||||
public function invalidate(int $lifetime = null): bool;
|
||||
|
||||
/**
|
||||
* Migrates the current session to a new session id while maintaining all
|
||||
* session attributes.
|
||||
*
|
||||
* @param bool $destroy Whether to delete the old session or leave it to garbage collection
|
||||
* @param int $lifetime Sets the cookie lifetime for the session cookie. A null value
|
||||
* will leave the system settings unchanged, 0 sets the cookie
|
||||
* to expire with browser session. Time is in seconds, and is
|
||||
* not a Unix timestamp.
|
||||
*
|
||||
* @return bool
|
||||
* @param bool $destroy Whether to delete the old session or leave it to garbage collection
|
||||
* @param int|null $lifetime Sets the cookie lifetime for the session cookie. A null value
|
||||
* will leave the system settings unchanged, 0 sets the cookie
|
||||
* to expire with browser session. Time is in seconds, and is
|
||||
* not a Unix timestamp.
|
||||
*/
|
||||
public function migrate(bool $destroy = false, int $lifetime = null);
|
||||
public function migrate(bool $destroy = false, int $lifetime = null): bool;
|
||||
|
||||
/**
|
||||
* Force the session to be saved and closed.
|
||||
@@ -88,41 +82,37 @@ interface SessionInterface
|
||||
* This method is generally not required for real sessions as
|
||||
* the session will be automatically saved at the end of
|
||||
* code execution.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function save();
|
||||
|
||||
/**
|
||||
* Checks if an attribute is defined.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function has(string $name);
|
||||
public function has(string $name): bool;
|
||||
|
||||
/**
|
||||
* Returns an attribute.
|
||||
*
|
||||
* @param mixed $default The default value if not found
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
public function get(string $name, $default = null);
|
||||
public function get(string $name, mixed $default = null): mixed;
|
||||
|
||||
/**
|
||||
* Sets an attribute.
|
||||
*
|
||||
* @param mixed $value
|
||||
* @return void
|
||||
*/
|
||||
public function set(string $name, $value);
|
||||
public function set(string $name, mixed $value);
|
||||
|
||||
/**
|
||||
* Returns attributes.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function all();
|
||||
public function all(): array;
|
||||
|
||||
/**
|
||||
* Sets attributes.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function replace(array $attributes);
|
||||
|
||||
@@ -131,36 +121,34 @@ interface SessionInterface
|
||||
*
|
||||
* @return mixed The removed value or null when it does not exist
|
||||
*/
|
||||
public function remove(string $name);
|
||||
public function remove(string $name): mixed;
|
||||
|
||||
/**
|
||||
* Clears all attributes.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function clear();
|
||||
|
||||
/**
|
||||
* Checks if the session was started.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function isStarted();
|
||||
public function isStarted(): bool;
|
||||
|
||||
/**
|
||||
* Registers a SessionBagInterface with the session.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function registerBag(SessionBagInterface $bag);
|
||||
|
||||
/**
|
||||
* Gets a bag instance by name.
|
||||
*
|
||||
* @return SessionBagInterface
|
||||
*/
|
||||
public function getBag(string $name);
|
||||
public function getBag(string $name): SessionBagInterface;
|
||||
|
||||
/**
|
||||
* Gets session meta.
|
||||
*
|
||||
* @return MetadataBag
|
||||
*/
|
||||
public function getMetadataBag();
|
||||
public function getMetadataBag(): MetadataBag;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user