mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-23 18:48:51 +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:
@@ -32,11 +32,9 @@ class RouterDataCollector extends DataCollector
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*
|
||||
* @final
|
||||
*/
|
||||
public function collect(Request $request, Response $response, \Throwable $exception = null)
|
||||
public function collect(Request $request, Response $response, \Throwable $exception = null): void
|
||||
{
|
||||
if ($response instanceof RedirectResponse) {
|
||||
$this->data['redirect'] = true;
|
||||
@@ -50,6 +48,9 @@ class RouterDataCollector extends DataCollector
|
||||
unset($this->controllers[$request]);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return void
|
||||
*/
|
||||
public function reset()
|
||||
{
|
||||
$this->controllers = new \SplObjectStorage();
|
||||
@@ -61,13 +62,18 @@ class RouterDataCollector extends DataCollector
|
||||
];
|
||||
}
|
||||
|
||||
protected function guessRoute(Request $request, $controller)
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
protected function guessRoute(Request $request, string|object|array $controller)
|
||||
{
|
||||
return 'n/a';
|
||||
}
|
||||
|
||||
/**
|
||||
* Remembers the controller associated to each request.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function onKernelController(ControllerEvent $event)
|
||||
{
|
||||
@@ -77,31 +83,22 @@ class RouterDataCollector extends DataCollector
|
||||
/**
|
||||
* @return bool Whether this request will result in a redirect
|
||||
*/
|
||||
public function getRedirect()
|
||||
public function getRedirect(): bool
|
||||
{
|
||||
return $this->data['redirect'];
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string|null
|
||||
*/
|
||||
public function getTargetUrl()
|
||||
public function getTargetUrl(): ?string
|
||||
{
|
||||
return $this->data['url'];
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string|null
|
||||
*/
|
||||
public function getTargetRoute()
|
||||
public function getTargetRoute(): ?string
|
||||
{
|
||||
return $this->data['route'];
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function getName()
|
||||
public function getName(): string
|
||||
{
|
||||
return 'router';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user