Skip to content

Commit

Permalink
symfony 7 compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
pmaxs committed Mar 18, 2024
1 parent 732197d commit a387cf3
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 5 deletions.
3 changes: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
"minimum-stability": "stable",
"license": "MIT",
"require": {
"symfony/framework-bundle": "^5.2"
"php": ">=8.2",
"symfony/framework-bundle": "^7.0"
},
"require-dev": {
},
Expand Down
2 changes: 1 addition & 1 deletion src/DependencyInjection/Configuration.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

class Configuration implements ConfigurationInterface
{
public function getConfigTreeBuilder()
public function getConfigTreeBuilder(): TreeBuilder
{
$treeBuilder = new TreeBuilder('pmaxs_path2query');
$rootNode = $treeBuilder->getRootNode();
Expand Down
2 changes: 1 addition & 1 deletion src/Generator/Path2QueryUrlGenerator.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public function __construct(array $compiledRoutes, RequestContext $context, Logg
$this->defaultLocale = $defaultLocale;
}

public function generate(string $name, array $parameters = [], int $referenceType = self::ABSOLUTE_PATH)
public function generate(string $name, array $parameters = [], int $referenceType = self::ABSOLUTE_PATH): string
{
$locale = $parameters['_locale']
?? $this->context->getParameter('_locale')
Expand Down
4 changes: 2 additions & 2 deletions src/Router/Path2QueryRouter.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ class Path2QueryRouter extends \Symfony\Bundle\FrameworkBundle\Routing\Router
{
const QUERY_PARAM = '__path2query__';

public function setOptions(array $options)
public function setOptions(array $options): void
{
return parent::setOptions(array_merge(['generator_class' => Path2QueryUrlGenerator::class], $options));
parent::setOptions(array_merge(['generator_class' => Path2QueryUrlGenerator::class], $options));
}
}

0 comments on commit a387cf3

Please sign in to comment.