Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • Comptoir/comptoir-du-libre
  • fgangler/comptoir
2 results
Show changes
<?php
namespace App;
use Symfony\Bundle\FrameworkBundle\Kernel\MicroKernelTrait;
use Symfony\Component\Config\Loader\LoaderInterface;
use Symfony\Component\Config\Resource\FileResource;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\HttpKernel\Kernel as BaseKernel;
use Symfony\Component\Routing\RouteCollectionBuilder;
class Kernel extends BaseKernel
{
use MicroKernelTrait;
private const CONFIG_EXTS = '.{php,xml,yaml,yml}';
public function registerBundles(): iterable
{
$contents = require $this->getProjectDir() . '/config/bundles.php';
foreach ($contents as $class => $envs) {
if ($envs[$this->environment] ?? $envs['all'] ?? false) {
yield new $class();
}
}
}
public function getProjectDir(): string
{
return \dirname(__DIR__);
}
protected function configureContainer(ContainerBuilder $container, LoaderInterface $loader): void
{
$container->addResource(new FileResource($this->getProjectDir() . '/config/bundles.php'));
$container->setParameter('container.dumper.inline_class_loader', \PHP_VERSION_ID < 70400 || $this->debug);
$container->setParameter('container.dumper.inline_factories', true);
$confDir = $this->getProjectDir() . '/config';
$loader->load($confDir . '/{packages}/*' . self::CONFIG_EXTS, 'glob');
$loader->load($confDir . '/{packages}/' . $this->environment . '/*' . self::CONFIG_EXTS, 'glob');
$loader->load($confDir . '/{services}' . self::CONFIG_EXTS, 'glob');
$loader->load($confDir . '/{services}_' . $this->environment . self::CONFIG_EXTS, 'glob');
}
protected function configureRoutes(RouteCollectionBuilder $routes): void
{
$confDir = $this->getProjectDir() . '/config';
$routes->import($confDir . '/{routes}/' . $this->environment . '/*' . self::CONFIG_EXTS, '/', 'glob');
$routes->import($confDir . '/{routes}/*' . self::CONFIG_EXTS, '/', 'glob');
$routes->import($confDir . '/{routes}' . self::CONFIG_EXTS, '/', 'glob');
}
}
{
"composer/xdebug-handler": {
"version": "1.4.0"
},
"doctrine/annotations": {
"version": "1.0",
"recipe": {
"repo": "github.com/symfony/recipes",
"branch": "master",
"version": "1.0",
"ref": "a2759dd6123694c8d901d0ec80006e044c2e6457"
},
"files": [
"config/routes/annotations.yaml"
]
},
"doctrine/cache": {
"version": "1.10.0"
},
"doctrine/collections": {
"version": "1.6.4"
},
"doctrine/common": {
"version": "2.12.0"
},
"doctrine/data-fixtures": {
"version": "1.4.2"
},
"doctrine/dbal": {
"version": "v2.10.1"
},
"doctrine/doctrine-bundle": {
"version": "2.0",
"recipe": {
"repo": "github.com/symfony/recipes",
"branch": "master",
"version": "2.0",
"ref": "a9f2463b9f73efe74482f831f03a204a41328555"
},
"files": [
"config/packages/doctrine.yaml",
"config/packages/prod/doctrine.yaml",
"src/Entity/.gitignore",
"src/Repository/.gitignore"
]
},
"doctrine/doctrine-fixtures-bundle": {
"version": "3.0",
"recipe": {
"repo": "github.com/symfony/recipes",
"branch": "master",
"version": "3.0",
"ref": "fc52d86631a6dfd9fdf3381d0b7e3df2069e51b3"
},
"files": [
"src/DataFixtures/AppFixtures.php"
]
},
"doctrine/doctrine-migrations-bundle": {
"version": "1.2",
"recipe": {
"repo": "github.com/symfony/recipes",
"branch": "master",
"version": "1.2",
"ref": "c1431086fec31f17fbcfe6d6d7e92059458facc1"
},
"files": [
"config/packages/doctrine_migrations.yaml",
"src/Migrations/.gitignore"
]
},
"doctrine/event-manager": {
"version": "1.1.0"
},
"doctrine/inflector": {
"version": "1.3.1"
},
"doctrine/instantiator": {
"version": "1.3.0"
},
"doctrine/lexer": {
"version": "1.2.0"
},
"doctrine/migrations": {
"version": "2.2.1"
},
"doctrine/orm": {
"version": "v2.7.1"
},
"doctrine/persistence": {
"version": "1.3.6"
},
"doctrine/reflection": {
"version": "v1.1.0"
},
"easycorp/easy-log-handler": {
"version": "1.0",
"recipe": {
"repo": "github.com/symfony/recipes",
"branch": "master",
"version": "1.0",
"ref": "70062abc2cd58794d2a90274502f81b55cd9951b"
},
"files": [
"config/packages/dev/easy_log_handler.yaml"
]
},
"egulias/email-validator": {
"version": "2.1.17"
},
"fzaninotto/faker": {
"version": "v1.9.1"
},
"gitonomy/gitlib": {
"version": "v1.2.0"
},
"jakub-onderka/php-parallel-lint": {
"version": "v1.0.0"
},
"jdorn/sql-formatter": {
"version": "v1.2.17"
},
"monolog/monolog": {
"version": "2.0.2"
},
"nikic/php-parser": {
"version": "v4.3.0"
},
"ocramius/package-versions": {
"version": "1.4.2"
},
"ocramius/proxy-manager": {
"version": "2.2.3"
},
"pdepend/pdepend": {
"version": "2.7.1"
},
"php": {
"version": "7.2"
},
"php-webdriver/webdriver": {
"version": "1.8.1"
},
"phpcompatibility/php-compatibility": {
"version": "9.3.5"
},
"phpdocumentor/reflection-common": {
"version": "2.0.0"
},
"phpdocumentor/reflection-docblock": {
"version": "4.3.4"
},
"phpdocumentor/type-resolver": {
"version": "1.0.1"
},
"phpmd/phpmd": {
"version": "2.8.2"
},
"phpro/grumphp": {
"version": "v0.18.0"
},
"psr/cache": {
"version": "1.0.1"
},
"psr/container": {
"version": "1.0.0"
},
"psr/event-dispatcher": {
"version": "1.0.0"
},
"psr/link": {
"version": "1.0.0"
},
"psr/log": {
"version": "1.1.2"
},
"seld/jsonlint": {
"version": "1.7.2"
},
"sensio/framework-extra-bundle": {
"version": "5.2",
"recipe": {
"repo": "github.com/symfony/recipes",
"branch": "master",
"version": "5.2",
"ref": "fb7e19da7f013d0d422fa9bce16f5c510e27609b"
},
"files": [
"config/packages/sensio_framework_extra.yaml"
]
},
"squizlabs/php_codesniffer": {
"version": "3.0",
"recipe": {
"repo": "github.com/symfony/recipes-contrib",
"branch": "master",
"version": "3.0",
"ref": "0dc9cceda799fd3a08b96987e176a261028a3709"
},
"files": [
"phpcs.xml.dist"
]
},
"symfony/asset": {
"version": "v5.0.4"
},
"symfony/browser-kit": {
"version": "v5.0.4"
},
"symfony/cache": {
"version": "v5.0.4"
},
"symfony/cache-contracts": {
"version": "v2.0.1"
},
"symfony/config": {
"version": "v5.0.4"
},
"symfony/console": {
"version": "4.4",
"recipe": {
"repo": "github.com/symfony/recipes",
"branch": "master",
"version": "4.4",
"ref": "ea8c0eda34fda57e7d5cd8cbd889e2a387e3472c"
},
"files": [
"bin/console",
"config/bootstrap.php"
]
},
"symfony/css-selector": {
"version": "v5.0.4"
},
"symfony/debug-bundle": {
"version": "4.1",
"recipe": {
"repo": "github.com/symfony/recipes",
"branch": "master",
"version": "4.1",
"ref": "f8863cbad2f2e58c4b65fa1eac892ab189971bea"
},
"files": [
"config/packages/dev/debug.yaml"
]
},
"symfony/debug-pack": {
"version": "v1.0.7"
},
"symfony/dependency-injection": {
"version": "v5.0.4"
},
"symfony/doctrine-bridge": {
"version": "v5.0.4"
},
"symfony/dom-crawler": {
"version": "v5.0.4"
},
"symfony/dotenv": {
"version": "v5.0.4"
},
"symfony/error-handler": {
"version": "v5.0.4"
},
"symfony/event-dispatcher": {
"version": "v5.0.4"
},
"symfony/event-dispatcher-contracts": {
"version": "v2.0.1"
},
"symfony/expression-language": {
"version": "v5.0.4"
},
"symfony/filesystem": {
"version": "v5.0.4"
},
"symfony/finder": {
"version": "v5.0.4"
},
"symfony/flex": {
"version": "1.0",
"recipe": {
"repo": "github.com/symfony/recipes",
"branch": "master",
"version": "1.0",
"ref": "c0eeb50665f0f77226616b6038a9b06c03752d8e"
},
"files": [
".env"
]
},
"symfony/form": {
"version": "v5.0.4"
},
"symfony/framework-bundle": {
"version": "4.4",
"recipe": {
"repo": "github.com/symfony/recipes",
"branch": "master",
"version": "4.4",
"ref": "23ecaccc551fe2f74baf613811ae529eb07762fa"
},
"files": [
"config/bootstrap.php",
"config/packages/cache.yaml",
"config/packages/framework.yaml",
"config/packages/test/framework.yaml",
"config/routes/dev/framework.yaml",
"config/services.yaml",
"public/index.php",
"src/Controller/.gitignore",
"src/Kernel.php"
]
},
"symfony/http-client": {
"version": "v5.0.4"
},
"symfony/http-client-contracts": {
"version": "v2.0.1"
},
"symfony/http-foundation": {
"version": "v5.0.4"
},
"symfony/http-kernel": {
"version": "v5.0.4"
},
"symfony/inflector": {
"version": "v5.0.4"
},
"symfony/intl": {
"version": "v5.0.4"
},
"symfony/mailer": {
"version": "4.3",
"recipe": {
"repo": "github.com/symfony/recipes",
"branch": "master",
"version": "4.3",
"ref": "15658c2a0176cda2e7dba66276a2030b52bd81b2"
},
"files": [
"config/packages/mailer.yaml"
]
},
"symfony/maker-bundle": {
"version": "1.0",
"recipe": {
"repo": "github.com/symfony/recipes",
"branch": "master",
"version": "1.0",
"ref": "fadbfe33303a76e25cb63401050439aa9b1a9c7f"
}
},
"symfony/mime": {
"version": "v5.0.4"
},
"symfony/monolog-bridge": {
"version": "v5.0.4"
},
"symfony/monolog-bundle": {
"version": "3.3",
"recipe": {
"repo": "github.com/symfony/recipes",
"branch": "master",
"version": "3.3",
"ref": "877bdb4223245783d00ed1f7429aa7ebc606d914"
},
"files": [
"config/packages/dev/monolog.yaml",
"config/packages/prod/monolog.yaml",
"config/packages/test/monolog.yaml"
]
},
"symfony/notifier": {
"version": "5.0",
"recipe": {
"repo": "github.com/symfony/recipes",
"branch": "master",
"version": "5.0",
"ref": "c31585e252b32fe0e1f30b1f256af553f4a06eb9"
},
"files": [
"config/packages/notifier.yaml"
]
},
"symfony/options-resolver": {
"version": "v5.0.4"
},
"symfony/orm-pack": {
"version": "v1.0.8"
},
"symfony/panther": {
"version": "v0.7.0"
},
"symfony/phpunit-bridge": {
"version": "4.3",
"recipe": {
"repo": "github.com/symfony/recipes",
"branch": "master",
"version": "4.3",
"ref": "3f8a8c93cd47061999316f8d56edd6c2abca9308"
},
"files": [
".env.test",
"bin/phpunit",
"config/services_test.yaml",
"phpunit.xml.dist",
"tests/bootstrap.php"
]
},
"symfony/polyfill-intl-grapheme": {
"version": "v1.14.0"
},
"symfony/polyfill-intl-icu": {
"version": "v1.14.0"
},
"symfony/polyfill-intl-idn": {
"version": "v1.14.0"
},
"symfony/polyfill-intl-normalizer": {
"version": "v1.14.0"
},
"symfony/polyfill-mbstring": {
"version": "v1.14.0"
},
"symfony/polyfill-php73": {
"version": "v1.14.0"
},
"symfony/process": {
"version": "v5.0.4"
},
"symfony/profiler-pack": {
"version": "v1.0.4"
},
"symfony/property-access": {
"version": "v5.0.4"
},
"symfony/property-info": {
"version": "v5.0.4"
},
"symfony/routing": {
"version": "4.2",
"recipe": {
"repo": "github.com/symfony/recipes",
"branch": "master",
"version": "4.2",
"ref": "683dcb08707ba8d41b7e34adb0344bfd68d248a7"
},
"files": [
"config/packages/prod/routing.yaml",
"config/packages/routing.yaml",
"config/routes.yaml"
]
},
"symfony/security-bundle": {
"version": "4.4",
"recipe": {
"repo": "github.com/symfony/recipes",
"branch": "master",
"version": "4.4",
"ref": "7b4408dc203049666fe23fabed23cbadc6d8440f"
},
"files": [
"config/packages/security.yaml"
]
},
"symfony/security-core": {
"version": "v5.0.4"
},
"symfony/security-csrf": {
"version": "v5.0.4"
},
"symfony/security-guard": {
"version": "v5.0.4"
},
"symfony/security-http": {
"version": "v5.0.4"
},
"symfony/serializer": {
"version": "v5.0.4"
},
"symfony/serializer-pack": {
"version": "v1.0.2"
},
"symfony/service-contracts": {
"version": "v2.0.1"
},
"symfony/stopwatch": {
"version": "v5.0.4"
},
"symfony/string": {
"version": "v5.0.4"
},
"symfony/test-pack": {
"version": "v1.0.6"
},
"symfony/translation": {
"version": "3.3",
"recipe": {
"repo": "github.com/symfony/recipes",
"branch": "master",
"version": "3.3",
"ref": "2ad9d2545bce8ca1a863e50e92141f0b9d87ffcd"
},
"files": [
"config/packages/translation.yaml",
"translations/.gitignore"
]
},
"symfony/translation-contracts": {
"version": "v2.0.1"
},
"symfony/twig-bridge": {
"version": "v5.0.4"
},
"symfony/twig-bundle": {
"version": "5.0",
"recipe": {
"repo": "github.com/symfony/recipes",
"branch": "master",
"version": "5.0",
"ref": "fab9149bbaa4d5eca054ed93f9e1b66cc500895d"
},
"files": [
"config/packages/test/twig.yaml",
"config/packages/twig.yaml",
"templates/base.html.twig"
]
},
"symfony/twig-pack": {
"version": "v1.0.0"
},
"symfony/validator": {
"version": "4.3",
"recipe": {
"repo": "github.com/symfony/recipes",
"branch": "master",
"version": "4.3",
"ref": "d902da3e4952f18d3bf05aab29512eb61cabd869"
},
"files": [
"config/packages/test/validator.yaml",
"config/packages/validator.yaml"
]
},
"symfony/var-dumper": {
"version": "v5.0.4"
},
"symfony/var-exporter": {
"version": "v5.0.4"
},
"symfony/web-link": {
"version": "v5.0.4"
},
"symfony/web-profiler-bundle": {
"version": "3.3",
"recipe": {
"repo": "github.com/symfony/recipes",
"branch": "master",
"version": "3.3",
"ref": "6bdfa1a95f6b2e677ab985cd1af2eae35d62e0f6"
},
"files": [
"config/packages/dev/web_profiler.yaml",
"config/packages/test/web_profiler.yaml",
"config/routes/dev/web_profiler.yaml"
]
},
"symfony/yaml": {
"version": "v5.0.4"
},
"twig/extra-bundle": {
"version": "v3.0.3"
},
"twig/twig": {
"version": "v3.0.3"
},
"webmozart/assert": {
"version": "1.7.0"
},
"zendframework/zend-code": {
"version": "3.4.1"
},
"zendframework/zend-eventmanager": {
"version": "3.2.1"
}
}
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>{% block title %}Welcome!{% endblock %}</title>
{% block stylesheets %}{% endblock %}
</head>
<body>
{% block body %}{% endblock %}
{% block javascripts %}{% endblock %}
</body>
</html>
<?php
use Symfony\Component\Dotenv\Dotenv;
require dirname(__DIR__) . '/vendor/autoload.php';
// Clearing the cache for the test environment
if (isset($_ENV['BOOTSTRAP_CLEAR_CACHE_ENV'])) {
// executes the "php bin/console cache:clear" command
passthru(sprintf(
'APP_ENV=%s php "%s/../bin/console" cache:clear --no-warmup',
$_ENV['BOOTSTRAP_CLEAR_CACHE_ENV'],
__DIR__
));
}
if (file_exists(dirname(__DIR__) . '/config/bootstrap.php')) {
require dirname(__DIR__) . '/config/bootstrap.php';
} elseif (method_exists(Dotenv::class, 'bootEnv')) {
(new Dotenv())->bootEnv(dirname(__DIR__) . '/.env');
}