1
這是一個非常明確的錯誤消息,但由於某些原因,我一直無法包裹我的頭。路徑「sylius_cart.resources.cart.classes.form」的類型無效。預期的數組,但得到了字符串symfony 2.8.3 sylius 0.17.0
配置:
sylius_cart:
# The driver used for persistence layer.
driver: ~
# Service id of cart item resolver.
resolver: app.cart_item_resolver
# Cart provider service id.
provider: sylius.cart_provider.default
# The id of cart storage for default provider.
storage: sylius.cart_storage.session
resources:
cart:
classes:
controller: Sylius\Bundle\CartBundle\Controller\CartController
form: Sylius\Bundle\CartBundle\Form\Type\CartType
validation_groups:
default: [ sylius ]
cart_item:
classes:
controller: Sylius\Bundle\CartBundle\Controller\CartItemController
form: Sylius\Bundle\CartBundle\Form\Type\CartItemType
validation_groups:
default: [ sylius ]
當我運行
$ php app/console doctrine:schema:update --force
我得到錯誤:
[Symfony\Component\Config\Definition\Exception\InvalidTypeException] Invalid type for path "sylius_cart.resources.cart.classes.form". Expected array, but got string
感謝你,因爲它固定 –