<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
pedrotroller / symfony-integration-checker example snippets
use PedroTroller\Symfony\IntegrationChecker\ConfigurableKernel;
return function (ConfigurableKernel $kernel) {
// Your configuration
};
use PedroTroller\Symfony\IntegrationChecker\ConfigurableKernel;
use Symfony\Bundle\FrameworkBundle\FrameworkBundle;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\HttpKernel\KernelInterface;
use Symfony\Component\Translation\TranslatorInterface;
$config = array(
'framework' => array(
'translator' => array(
'enabled' => true,
),
),
);
$test = function (KernelInterface $kernel) {
if (false === $kernel->getContainer()->get('translator') instanceof TranslatorInterface) {
throw new \Exception('Oups, there is a problem !');
}
};
return function (ConfigurableKernel $kernel) use ($config, $test) {
$container = new ContainerBuilder();
$container->setParameter('kernel.secret', md5(time()));
$kernel
->setContainerBuilder($container)
->setConfig($config)
->addBundle(new FrameworkBundle())
->afterBoot($test)
;
};
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.