I am trying to clear cache of my application to prod environment. But all time that I run this line: app/console cache:clear --env=prod returns this error below:
[Symfony\Component\Config\Definition\Exception\InvalidConfigurationException]
Unrecognized options "resource, type, prefix" under "core"
My routing file is like this:
//routing.yml
core:
resource: "@CoreBundle/Controller/"
type: annotation
prefix: /
In this project I have a folder called CoreBundle and inside this folder have a folder DependencyInjection that have this 2 files:
//congiguration.php
class Configuration implements ConfigurationInterface
{
/**
* {@inheritdoc}
*/
public function getConfigTreeBuilder()
{
$treeBuilder = new TreeBuilder();
$rootNode = $treeBuilder->root('core');
return $treeBuilder;
}
}
//CoreExtension.php
class CoreExtension extends Extension
{
/**
* {@inheritdoc}
*/
public function load(array $configs, ContainerBuilder $container)
{
$configuration = new Configuration();
$config = $this->processConfiguration($configuration, $configs);
$loader = new Loader\XmlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config'));
$loader->load('services.xml');
}
}
I have no idea why symfony don't recognize this options... Could anyone help me please?
Thanks all
routing.yml
is actually your routing file? Are you linking to it in yourimports
inapp/config/config.yml
rather than via theframework.router.resource
config key? From the look of your error it is trying to register your route as the config for yourcore
bundle, as opposed to a route. – qooplmaoapp/config/config.yml
where it mentionsrouting.yml
. – qooplmao