ratzen
This commit is contained in:
parent
203233d2ed
commit
93fa2da696
45 changed files with 2633 additions and 550 deletions
49
config/packages/doctrine.yaml
Normal file
49
config/packages/doctrine.yaml
Normal file
|
@ -0,0 +1,49 @@
|
|||
doctrine:
|
||||
dbal:
|
||||
url: '%env(resolve:DATABASE_URL)%'
|
||||
|
||||
# IMPORTANT: You MUST configure your server version,
|
||||
# either here or in the DATABASE_URL env var (see .env file)
|
||||
#server_version: '16'
|
||||
|
||||
profiling_collect_backtrace: '%kernel.debug%'
|
||||
orm:
|
||||
auto_generate_proxy_classes: true
|
||||
enable_lazy_ghost_objects: true
|
||||
report_fields_where_declared: true
|
||||
validate_xml_mapping: true
|
||||
naming_strategy: doctrine.orm.naming_strategy.underscore_number_aware
|
||||
auto_mapping: true
|
||||
mappings:
|
||||
App:
|
||||
type: attribute
|
||||
is_bundle: false
|
||||
dir: '%kernel.project_dir%/src/Entity'
|
||||
prefix: 'App\Entity'
|
||||
alias: App
|
||||
|
||||
when@test:
|
||||
doctrine:
|
||||
dbal:
|
||||
# "TEST_TOKEN" is typically set by ParaTest
|
||||
dbname_suffix: '_test%env(default::TEST_TOKEN)%'
|
||||
|
||||
when@prod:
|
||||
doctrine:
|
||||
orm:
|
||||
auto_generate_proxy_classes: false
|
||||
proxy_dir: '%kernel.build_dir%/doctrine/orm/Proxies'
|
||||
query_cache_driver:
|
||||
type: pool
|
||||
pool: doctrine.system_cache_pool
|
||||
result_cache_driver:
|
||||
type: pool
|
||||
pool: doctrine.result_cache_pool
|
||||
|
||||
framework:
|
||||
cache:
|
||||
pools:
|
||||
doctrine.result_cache_pool:
|
||||
adapter: cache.app
|
||||
doctrine.system_cache_pool:
|
||||
adapter: cache.system
|
10
config/packages/routing.yaml
Normal file
10
config/packages/routing.yaml
Normal file
|
@ -0,0 +1,10 @@
|
|||
framework:
|
||||
router:
|
||||
# Configure how to generate URLs in non-HTTP contexts, such as CLI commands.
|
||||
# See https://symfony.com/doc/current/routing.html#generating-urls-in-commands
|
||||
#default_uri: http://localhost
|
||||
|
||||
when@prod:
|
||||
framework:
|
||||
router:
|
||||
strict_requirements: null
|
|
@ -1,15 +1,18 @@
|
|||
<?php declare(strict_types=1);
|
||||
|
||||
use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
|
||||
// config/packages/twig.php
|
||||
use Symfony\Config\TwigConfig;
|
||||
|
||||
return static function (ContainerConfigurator $containerConfigurator): void {
|
||||
$containerConfigurator->extension('twig', [
|
||||
'file_name_pattern' => '*.twig',
|
||||
]);
|
||||
use function Symfony\Component\DependencyInjection\Loader\Configurator\service;
|
||||
|
||||
if ($containerConfigurator->env() === 'test') {
|
||||
$containerConfigurator->extension('twig', [
|
||||
'strict_variables' => true,
|
||||
]);
|
||||
use App\Service\WhoAreYou;
|
||||
|
||||
return static function (TwigConfig $twig): void {
|
||||
$twig
|
||||
->fileNamePattern('*.twig')
|
||||
->global('username', service(WhoAreYou::class));
|
||||
|
||||
if ($_SERVER['APP_ENV'] === 'test') {
|
||||
$twig->strictVariables(true);
|
||||
}
|
||||
};
|
||||
|
|
6
config/packages/twig.yaml
Normal file
6
config/packages/twig.yaml
Normal file
|
@ -0,0 +1,6 @@
|
|||
twig:
|
||||
file_name_pattern: '*.twig'
|
||||
|
||||
when@test:
|
||||
twig:
|
||||
strict_variables: true
|
11
config/packages/validator.yaml
Normal file
11
config/packages/validator.yaml
Normal file
|
@ -0,0 +1,11 @@
|
|||
framework:
|
||||
validation:
|
||||
# Enables validator auto-mapping support.
|
||||
# For instance, basic validation constraints will be inferred from Doctrine's metadata.
|
||||
#auto_mapping:
|
||||
# App\Entity\: []
|
||||
|
||||
when@test:
|
||||
framework:
|
||||
validation:
|
||||
not_compromised_password: false
|
5
config/routes.yaml
Normal file
5
config/routes.yaml
Normal file
|
@ -0,0 +1,5 @@
|
|||
controllers:
|
||||
resource:
|
||||
path: ../src/Controller/
|
||||
namespace: App\Controller
|
||||
type: attribute
|
4
config/routes/framework.yaml
Normal file
4
config/routes/framework.yaml
Normal file
|
@ -0,0 +1,4 @@
|
|||
when@dev:
|
||||
_errors:
|
||||
resource: '@FrameworkBundle/Resources/config/routing/errors.xml'
|
||||
prefix: /_error
|
|
@ -1,6 +1,7 @@
|
|||
<?php declare(strict_types=1);
|
||||
|
||||
use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
|
||||
use Symfony\Bridge\Twig\AppVariable;
|
||||
|
||||
return static function (ContainerConfigurator $containerConfigurator): void {
|
||||
$services = $containerConfigurator->services();
|
||||
|
@ -14,4 +15,5 @@ return static function (ContainerConfigurator $containerConfigurator): void {
|
|||
__DIR__ . '/../src/Entity/',
|
||||
__DIR__ . '/../src/Kernel.php',
|
||||
]);
|
||||
$services->alias(AppVariable::class, 'twig.app_variable');
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue