Skip to content

Commit

Permalink
Update Kernel class for PHP 7.2 lowest Symfony 4.4 test
Browse files Browse the repository at this point in the history
  • Loading branch information
alexander-schranz committed Apr 15, 2024
1 parent 7121ec2 commit 137348a
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
18 changes: 18 additions & 0 deletions Tests/Application/Kernel.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,27 @@

namespace HandcraftedInTheAlps\RestRoutingBundle\Tests\Application;

use HandcraftedInTheAlps\RestRoutingBundle\RestRoutingBundle;
use Symfony\Bundle\FrameworkBundle\Kernel\MicroKernelTrait;
use Symfony\Component\Config\Loader\LoaderInterface;
use Symfony\Component\DependencyInjection\ContainerBuilder;

class Kernel extends \Symfony\Component\HttpKernel\Kernel
{
use MicroKernelTrait;

public function registerBundles(): iterable
{
return [
new RestRoutingBundle(),
];
}

protected function configureContainer(ContainerBuilder $container, LoaderInterface $loader): void
{
}

protected function configureRoutes($routes): void
{
}
}
2 changes: 2 additions & 0 deletions Tests/DependencyInjection/RestRoutingExtensionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,9 @@ private function load(array $config, bool $frameworkBundle = false): void

if ($frameworkBundle) {
$this->container->setParameter('kernel.project_dir', \dirname(__DIR__) . '/Application');
$this->container->setParameter('kernel.root_dir', \dirname(__DIR__) . '/Application');
$this->container->setParameter('kernel.container_class', 'ApplicationContainer');
$this->container->setParameter('kernel.bundles_metadata', []);
$this->container->set('kernel', new Kernel('test', false));
$extension = new FrameworkExtension();
$extension->load(
Expand Down

0 comments on commit 137348a

Please sign in to comment.