0

我通过这个链接安装了引导
但是当我运行

php app/console server:run

要检查它是否正常工作,它会返回一个错误。
错误是

[Symfony\Component\Config\Definition\Exception\InvalidConfigurationException]
路径“assetic.filters.file”的配置无效:
assetic.filters 配置“C:/wamp/www/bootstrap/app/../vendor/leafo/lessphp /lessc.in c.php" 必须为 null 或数组。

如何删除此异常?这是我的 config.yml

imports:
- { resource: parameters.yml }
- { resource: security.yml }

framework:
#esi:             ~
#translator:      { fallback: %locale% }
secret:          %secret%
router:
    resource: "%kernel.root_dir%/config/routing.yml"
    strict_requirements: %kernel.debug%
form:            ~
csrf_protection: ~
validation:      { enable_annotations: true }
templating:
    engines: ['twig']
    #assets_version: SomeVersionScheme
default_locale:  "%locale%"
trusted_proxies: ~
session:         ~
fragments:       ~

# Twig Configuration
twig:
form:
    resources:
        - "AcmeBundle:Form:form_div_layout.html.twig"

# Assetic Configuration
assetic:
debug:          %kernel.debug%
use_controller: false
bundles:        [ ]
#java: /usr/bin/java
filters:
    lessphp:
    file: %kernel.root_dir%/../vendor/leafo/lessphp/lessc.inc.php
    apply_to: "\.less$"
    cssrewrite: ~
    #closure:
    #    jar: %kernel.root_dir%/Resources/java/compiler.jar
    #yui_css:
    #    jar: %kernel.root_dir%/Resources/java/yuicompressor-2.4.7.jar
bc_bootstrap:
assets_dir: %kernel.root_dir%/../vendor/twitter/bootstrap
jquery_path: %kernel.root_dir%/../vendor/jquery/jquery/jquery-1.9.1.js
# Doctrine Configuration
doctrine:
dbal:
    driver:   %database_driver%
    host:     %database_host%
    port:     %database_port%
    dbname:   %database_name%
    user:     %database_user%
    password: %database_password%
    charset:  UTF8
    # if using pdo_sqlite as your database driver, add the path in parameters.yml
    # e.g. database_path: %kernel.root_dir%/data/data.db3
    # path:     %database_path%

orm:
    auto_generate_proxy_classes: %kernel.debug%
    auto_mapping: true

# Swiftmailer Configuration
swiftmailer:
transport: %mailer_transport%
host:      %mailer_host%
username:  %mailer_user%
password:  %mailer_password%
spool:     { type: memory }
4

1 回答 1

0

缩进在 yml 文件中很重要。

file 和 apply_to 应该还有 4 个空格。

于 2013-08-28T11:30:38.667 回答