$msg .= sprintf('. Did you mean "%s"?', implode('", "', array_keys($guesses)));
} else {
$msg .= sprintf('. Available option%s %s "%s".', 1 === \count($proposals) ? '' : 's', 1 === \count($proposals) ? 'is' : 'are', implode('", "', $proposals));
}
$ex = new InvalidConfigurationException($msg);
$ex->setPath($this->getPath());
throw $ex;
}
// validate type
$this->doValidateType($value);
// normalize value
return $this->normalizeValue($value);
}
/**
* Normalizes the value before any other normalization is applied.
*
}
}
$prototype = $this->getPrototypeForChild($k);
if (null !== $this->keyAttribute || !$isList) {
$normalized[$k] = $prototype->normalize($v);
} else {
$normalized[] = $prototype->normalize($v);
}
}
// validate type
$this->doValidateType($value);
// normalize value
return $this->normalizeValue($value);
}
/**
* Normalizes the value before any other normalization is applied.
*
$normalized = [];
foreach ($value as $name => $val) {
if (isset($this->children[$name])) {
try {
$normalized[$name] = $this->children[$name]->normalize($val);
} catch (UnsetKeyException $e) {
}
unset($value[$name]);
} elseif (!$this->removeExtraKeys) {
$normalized[$name] = $val;
// validate type
$this->doValidateType($value);
// normalize value
return $this->normalizeValue($value);
}
/**
* Normalizes the value before any other normalization is applied.
*
*/
public function process(NodeInterface $configTree, array $configs): array
{
$currentConfig = [];
foreach ($configs as $config) {
$config = $configTree->normalize($config);
$currentConfig = $configTree->merge($currentConfig, $config);
}
return $configTree->finalize($currentConfig);
}
*
* @return array The processed configuration
*/
public function processConfiguration(ConfigurationInterface $configuration, array $configs): array
{
return $this->process($configuration->getConfigTreeBuilder()->buildTree(), $configs);
}
/**
* Normalizes a configuration entry.
*
final protected function processConfiguration(ConfigurationInterface $configuration, array $configs): array
{
$processor = new Processor();
return $this->processedConfigs[] = $processor->processConfiguration($configuration, $configs);
}
/**
* @internal
*/
if (class_exists(FullStack::class) && Kernel::MAJOR_VERSION < 5 && Logger::API >= 2) {
throw new \RuntimeException('Symfony 5 is required for Monolog 2 support. Please downgrade Monolog to version 1.');
}
$configuration = $this->getConfiguration($configs, $container);
$config = $this->processConfiguration($configuration, $configs);
if (isset($config['handlers'])) {
$loader = new XmlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config'));
$loader->load('monolog.xml');
foreach ($exprLangProviders as $provider) {
$tmpContainer->addExpressionLanguageProvider($provider);
}
$extension->load($config, $tmpContainer);
} catch (\Exception $e) {
if ($resolvingBag instanceof MergeExtensionConfigurationParameterBag) {
$container->getParameterBag()->mergeEnvPlaceholders($resolvingBag);
}
if (!\count($container->getExtensionConfig($extension))) {
$container->loadFromExtension($extension, []);
}
}
parent::process($container);
}
}
*/
public function compile(ContainerBuilder $container)
{
try {
foreach ($this->passConfig->getPasses() as $pass) {
$pass->process($container);
}
} catch (\Exception $e) {
$usedEnvs = [];
$prev = $e;
if ($resolveEnvPlaceholders && $bag instanceof EnvPlaceholderParameterBag) {
$compiler->addPass(new ResolveEnvPlaceholdersPass(), PassConfig::TYPE_AFTER_REMOVING, -1000);
}
$compiler->compile($this);
foreach ($this->definitions as $id => $definition) {
if ($this->trackResources && $definition->isLazy()) {
$this->getReflectionClass($definition->getClass());
}
}
try {
$container = null;
$container = $this->buildContainer();
$container->compile();
} finally {
if ($collectDeprecations) {
restore_error_handler();
@file_put_contents($buildDir.'/'.$class.'Deprecations.log', serialize(array_values($collectedLogs)));
$_ENV['SHELL_VERBOSITY'] = 3;
$_SERVER['SHELL_VERBOSITY'] = 3;
}
$this->initializeBundles();
$this->initializeContainer();
$container = $this->container;
if ($container->hasParameter('kernel.trusted_hosts') && $trustedHosts = $container->getParameter('kernel.trusted_hosts')) {
Request::setTrustedHosts($trustedHosts);
* {@inheritdoc}
*/
public function handle(Request $request, int $type = HttpKernelInterface::MAIN_REQUEST, bool $catch = true)
{
if (!$this->booted) {
$container = $this->container ?? $this->preBoot();
if ($container->has('http_cache')) {
return $container->get('http_cache')->handle($request, $type, $catch);
}
}
// When using the HttpCache, you need to call the method in your front controller
// instead of relying on the configuration parameter
// https://symfony.com/doc/3.4/reference/configuration/framework.html#http-method-override
Request::enableHttpMethodParameterOverride();
$request = Request::createFromGlobals();
$response = $kernel->handle($request);
$response->send();
$kernel->terminate($request, $response);
InvalidConfigurationException
|
---|
Symfony\Component\Config\Definition\Exception\InvalidConfigurationException: Unrecognized option "max_size" under "monolog.handlers.main". Available options are "accepted_levels", "action_level", "activation_strategy", "api_version", "app_name", "auto_log_stacks", "bot_name", "bubble", "buffer_size", "channel", "channels", "client_id", "config", "connection_string", "connection_timeout", "console_formater_options", "console_formatter_options", "content_type", "date_format", "deduplication_level", "document_type", "dsn", "elasticsearch", "email_prototype", "environment", "exchange", "exchange_name", "excluded_404s", "excluded_http_codes", "facility", "file_permission", "filename_format", "flush_on_overflow", "formatter", "from_email", "handler", "headers", "host", "hub_id", "icon_emoji", "id", "ident", "ignore_error", "include_extra", "include_stacktraces", "index", "lazy", "level", "logopts", "mailer", "max_files", "max_level", "members", "message_format", "message_type", "min_level", "mongo", "nested", "nickname", "notify", "passthru_level", "path", "persistent", "port", "predis", "priority", "process_psr_3_messages", "publisher", "redis", "region", "release", "room", "source", "stop_buffering", "store", "subject", "tags", "team", "time", "timeout", "title", "to_email", "token", "type", "url", "use_attachment", "use_locking", "use_short_attachment", "use_ssl", "user", "verbosity_levels", "webhook_url". at /var/www/texet_staging/vendor/symfony/config/Definition/ArrayNode.php:314 at Symfony\Component\Config\Definition\ArrayNode->normalizeValue() (/var/www/texet_staging/vendor/symfony/config/Definition/BaseNode.php:410) at Symfony\Component\Config\Definition\BaseNode->normalize() (/var/www/texet_staging/vendor/symfony/config/Definition/PrototypedArrayNode.php:253) at Symfony\Component\Config\Definition\PrototypedArrayNode->normalizeValue() (/var/www/texet_staging/vendor/symfony/config/Definition/BaseNode.php:410) at Symfony\Component\Config\Definition\BaseNode->normalize() (/var/www/texet_staging/vendor/symfony/config/Definition/ArrayNode.php:279) at Symfony\Component\Config\Definition\ArrayNode->normalizeValue() (/var/www/texet_staging/vendor/symfony/config/Definition/BaseNode.php:410) at Symfony\Component\Config\Definition\BaseNode->normalize() (/var/www/texet_staging/vendor/symfony/config/Definition/Processor.php:34) at Symfony\Component\Config\Definition\Processor->process() (/var/www/texet_staging/vendor/symfony/config/Definition/Processor.php:50) at Symfony\Component\Config\Definition\Processor->processConfiguration() (/var/www/texet_staging/vendor/symfony/dependency-injection/Extension/Extension.php:111) at Symfony\Component\DependencyInjection\Extension\Extension->processConfiguration() (/var/www/texet_staging/vendor/symfony/monolog-bundle/DependencyInjection/MonologExtension.php:88) at Symfony\Bundle\MonologBundle\DependencyInjection\MonologExtension->load() (/var/www/texet_staging/vendor/symfony/dependency-injection/Compiler/MergeExtensionConfigurationPass.php:76) at Symfony\Component\DependencyInjection\Compiler\MergeExtensionConfigurationPass->process() (/var/www/texet_staging/vendor/symfony/http-kernel/DependencyInjection/MergeExtensionConfigurationPass.php:39) at Symfony\Component\HttpKernel\DependencyInjection\MergeExtensionConfigurationPass->process() (/var/www/texet_staging/vendor/symfony/dependency-injection/Compiler/Compiler.php:91) at Symfony\Component\DependencyInjection\Compiler\Compiler->compile() (/var/www/texet_staging/vendor/symfony/dependency-injection/ContainerBuilder.php:744) at Symfony\Component\DependencyInjection\ContainerBuilder->compile() (/var/www/texet_staging/vendor/symfony/http-kernel/Kernel.php:545) at Symfony\Component\HttpKernel\Kernel->initializeContainer() (/var/www/texet_staging/vendor/symfony/http-kernel/Kernel.php:786) at Symfony\Component\HttpKernel\Kernel->preBoot() (/var/www/texet_staging/vendor/symfony/http-kernel/Kernel.php:187) at Symfony\Component\HttpKernel\Kernel->handle() (/var/www/texet_staging/public/index.php:69) |