Skip to content
Snippets Groups Projects
Unverified Commit 1f22f281 authored by Sascha Grossenbacher's avatar Sascha Grossenbacher Committed by GitHub
Browse files

Symfony6 (#1675)

Add Symfony 6 support
parent 3bb39164
No related branches found
No related tags found
No related merge requests found
This diff is collapsed.
...@@ -67,7 +67,7 @@ class RunnableResponse extends Response ...@@ -67,7 +67,7 @@ class RunnableResponse extends Response
* *
* Note: No return-type possible due to upstream limitations * Note: No return-type possible due to upstream limitations
*/ */
public function sendContent() public function sendContent(): static
{ {
return call_user_func_array($this->callable, $this->arguments); return call_user_func_array($this->callable, $this->arguments);
} }
......
...@@ -14,7 +14,7 @@ use Symfony\Component\DependencyInjection\ContainerBuilder; ...@@ -14,7 +14,7 @@ use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\Definition; use Symfony\Component\DependencyInjection\Definition;
use Symfony\Component\DependencyInjection\Loader\DirectoryLoader; use Symfony\Component\DependencyInjection\Loader\DirectoryLoader;
use Symfony\Component\HttpKernel\Kernel as BaseKernel; use Symfony\Component\HttpKernel\Kernel as BaseKernel;
use Symfony\Component\Routing\RouteCollectionBuilder; use Symfony\Component\Routing\Loader\Configurator\RoutingConfigurator;
/** /**
* A class to create the container and handle a given request. * A class to create the container and handle a given request.
...@@ -132,16 +132,16 @@ class Kernel extends BaseKernel ...@@ -132,16 +132,16 @@ class Kernel extends BaseKernel
/** /**
* Import routes. * Import routes.
* *
* @param RouteCollectionBuilder $routes * @param RoutingConfigurator $routes
*/ */
protected function configureRoutes(RouteCollectionBuilder $routes): void protected function configureRoutes(RoutingConfigurator $routes): void
{ {
$configuration = Configuration::getInstance(); $configuration = Configuration::getInstance();
$baseDir = $configuration->getBaseDir(); $baseDir = $configuration->getBaseDir();
$routes->import($baseDir . '/routing/routes/*' . self::CONFIG_EXTS, '/', 'glob'); $routes->import($baseDir . '/routing/routes/*' . self::CONFIG_EXTS);
$confDir = Module::getModuleDir($this->module) . '/routing/routes'; $confDir = Module::getModuleDir($this->module) . '/routing/routes';
if (is_dir($confDir)) { if (is_dir($confDir)) {
$routes->import($confDir . '/**/*' . self::CONFIG_EXTS, $this->module, 'glob'); $routes->import($confDir . '/**/*' . self::CONFIG_EXTS)->prefix($this->module);
} }
} }
......
...@@ -123,7 +123,7 @@ class MetaDataStorageHandlerSerialize extends MetaDataStorageSource ...@@ -123,7 +123,7 @@ class MetaDataStorageHandlerSerialize extends MetaDataStorageSource
$ret = []; $ret = [];
$loc = new File(Path::canonicalize($this->directory . '/' . rawurlencode($set)), false); $loc = new File(Path::canonicalize($this->directory . '/' . rawurlencode($set)), false);
if (!$this->fileSystem->exists($loc) || !$loc->isReadable()) { if (!$this->fileSystem->exists($loc->getPath()) || !$loc->isReadable()) {
Logger::warning(sprintf( Logger::warning(sprintf(
'Serialize metadata handler: Unable to open directory: %s', 'Serialize metadata handler: Unable to open directory: %s',
var_export($loc->getPathName(), true), var_export($loc->getPathName(), true),
...@@ -208,7 +208,7 @@ class MetaDataStorageHandlerSerialize extends MetaDataStorageSource ...@@ -208,7 +208,7 @@ class MetaDataStorageHandlerSerialize extends MetaDataStorageSource
if (!$loc->isDir()) { if (!$loc->isDir()) {
Logger::info('Creating directory: ' . $loc); Logger::info('Creating directory: ' . $loc);
try { try {
$this->fileSystem->mkdir($loc, 0777); $this->fileSystem->mkdir($loc->getPath(), 0777);
} catch (IOException $e) { } catch (IOException $e) {
Logger::error('Failed to create directory ' . $loc . ': ' . $e->getMessage()); Logger::error('Failed to create directory ' . $loc . ': ' . $e->getMessage());
return false; return false;
......
...@@ -563,7 +563,7 @@ class Template extends Response ...@@ -563,7 +563,7 @@ class Template extends Response
* *
* Note: No return type possible due to upstream limitations * Note: No return type possible due to upstream limitations
*/ */
public function send() public function send(): static
{ {
$this->content = $this->getContents(); $this->content = $this->getContents();
return parent::send(); return parent::send();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment