diff --git a/.github/settings.yml b/.github/settings.yml index 043166a6..1d211442 100644 --- a/.github/settings.yml +++ b/.github/settings.yml @@ -17,14 +17,10 @@ branches: - "Assets build" - "Coding Standards (8)" - "Static Code Analysis (8.1)" - - "Test (PHP 8, symfony 4.4, lowest)" - - "Test (PHP 8, symfony 5.1, lowest)" - - "Test (PHP 8, symfony 4.4, highest)" - - "Test (PHP 8, symfony 5.1, highest)" - - "Test (PHP 8.1, symfony 4.4, lowest)" - - "Test (PHP 8.1, symfony 5.1, lowest)" - - "Test (PHP 8.1, symfony 4.4, highest)" - - "Test (PHP 8.1, symfony 5.1, highest)" + - "Test (PHP 8, symfony 5.4, lowest)" + - "Test (PHP 8, symfony 5.4, highest)" + - "Test (PHP 8.1, symfony 5.4, lowest)" + - "Test (PHP 8.1, symfony 5.4, highest)" - "Code Coverage (8.1)" - "Mutation Tests (8.1)" strict: true diff --git a/.github/workflows/continuous-integration.yml b/.github/workflows/continuous-integration.yml index d9a27f9a..23a5d85b 100644 --- a/.github/workflows/continuous-integration.yml +++ b/.github/workflows/continuous-integration.yml @@ -148,8 +148,7 @@ jobs: - highest symfony: - - 4.4 - - 5.1 + - 5.4 steps: - name: "Checkout" diff --git a/composer.json b/composer.json index 24b7c43f..30ada6df 100755 --- a/composer.json +++ b/composer.json @@ -48,15 +48,15 @@ "psr/log": "^1.0", "sonata-project/block-bundle": "^3.23.0 || ^4.5.1", "sonata-project/form-extensions": "^0.1 || ^1.4", - "symfony/config": "^4.4 || ^5.0", - "symfony/dependency-injection": "^4.4 || ^5.0", - "symfony/expression-language": "^4.4 || ^5.0", - "symfony/form": "^4.4 || ^5.0", - "symfony/framework-bundle": "^4.4 || ^5.0", - "symfony/http-foundation": "^4.4 || ^5.0", - "symfony/http-kernel": "^4.4 || ^5.0", - "symfony/options-resolver": "^4.4 || ^5.0", - "symfony/twig-bridge": "^4.4 || ^5.0", + "symfony/config": "^5.4", + "symfony/dependency-injection": "^5.4", + "symfony/expression-language": "^5.4", + "symfony/form": "^5.4", + "symfony/framework-bundle": "^5.4", + "symfony/http-foundation": "^5.4", + "symfony/http-kernel": "^5.4", + "symfony/options-resolver": "^5.4", + "symfony/twig-bridge": "^5.4", "twig/twig": "^2.4 || ^3.0", "willdurand/geocoder": "^4.2", "willdurand/geocoder-bundle": "^5.11" @@ -66,7 +66,7 @@ "geocoder-php/nominatim-provider": "^5.0", "nyholm/psr7": "^1.0", "php-http/mock-client": "^1.3", - "symfony/browser-kit": "^4.4 || ^5.0" + "symfony/browser-kit": "^5.4" }, "suggest": { "geocoder-php/bing-maps-provider": "For bing geocoder", diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon index 84aa08b6..a5af8418 100644 --- a/phpstan-baseline.neon +++ b/phpstan-baseline.neon @@ -15,3 +15,18 @@ parameters: count: 2 path: src/Twig/MapsExtensions.php + - + message: "#^Method Nucleos\\\\MapsBundle\\\\Tests\\\\App\\\\AppKernel\\:\\:configureContainer\\(\\) has parameter \\$container with no type specified\\.$#" + count: 1 + path: tests/App/AppKernel.php + + - + message: "#^Method Nucleos\\\\MapsBundle\\\\Tests\\\\App\\\\AppKernel\\:\\:configureContainer\\(\\) has parameter \\$loader with no type specified\\.$#" + count: 1 + path: tests/App/AppKernel.php + + - + message: "#^Method Nucleos\\\\MapsBundle\\\\Tests\\\\App\\\\AppKernel\\:\\:configureRoutes\\(\\) has parameter \\$routes with no type specified\\.$#" + count: 1 + path: tests/App/AppKernel.php + diff --git a/psalm-baseline.xml b/psalm-baseline.xml index 18d5f0f0..93fbc088 100644 --- a/psalm-baseline.xml +++ b/psalm-baseline.xml @@ -1,22 +1,14 @@ - + $latitude $longitude - - $geo->getCoordinates()->toArray() - array{float, float}|null - $blockContext->getTemplate() - - toArray - - - $index + $value @@ -45,9 +37,18 @@ - - RouteCollectionBuilder - + + $container + $loader + $routes + + + add + load + + + AppKernel + diff --git a/tests/App/AppKernel.php b/tests/App/AppKernel.php index c1bb1911..9866d422 100644 --- a/tests/App/AppKernel.php +++ b/tests/App/AppKernel.php @@ -18,10 +18,9 @@ use Symfony\Bundle\FrameworkBundle\FrameworkBundle; use Symfony\Bundle\FrameworkBundle\Kernel\MicroKernelTrait; use Symfony\Bundle\TwigBundle\TwigBundle; -use Symfony\Component\Config\Loader\LoaderInterface; -use Symfony\Component\DependencyInjection\ContainerBuilder; +use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator; use Symfony\Component\HttpKernel\Kernel; -use Symfony\Component\Routing\RouteCollectionBuilder; +use Symfony\Component\Routing\Loader\Configurator\RoutingConfigurator; final class AppKernel extends Kernel { @@ -39,7 +38,7 @@ public function __construct() parent::__construct('test', false); } - public function registerBundles() + public function registerBundles(): iterable { yield new FrameworkBundle(); yield new TwigBundle(); @@ -63,13 +62,28 @@ public function getProjectDir(): string return __DIR__; } - protected function configureRoutes(RouteCollectionBuilder $routes): void + protected function configureRoutes($routes): void { + if ($routes instanceof RoutingConfigurator) { + $routes + ->add('test', '/test') + ->controller(BlockRenderController::class) + ; + + return; + } + $routes->add('/test', BlockRenderController::class); } - protected function configureContainer(ContainerBuilder $containerBuilder, LoaderInterface $loader): void + protected function configureContainer($container, $loader): void { + if ($container instanceof ContainerConfigurator) { + $container->import(__DIR__.'/config/config.yaml'); + + return; + } + $loader->load(__DIR__.'/config/config.yaml'); } } diff --git a/tests/App/config/config.yaml b/tests/App/config/config.yaml index 39951b76..e61411b6 100644 --- a/tests/App/config/config.yaml +++ b/tests/App/config/config.yaml @@ -2,8 +2,7 @@ framework: secret: secret session: - storage_id: session.storage.mock_file - handler_id: session.handler.native_file + storage_factory_id: session.storage.factory.mock_file cache: app: cache.adapter.filesystem