我想在Twig中使用truncate过滤器,但是出现了错误:
The file "D:\projets\dzairdeals\config/services.yaml" does not contain valid YAML: Indentation problem in "D:\\projets\\dzairdeals\\config/services.yaml" at line 30 (near " twig.extension.text:") in D:\projets\dzairdeals\config/services.yaml (which is loaded in resource "D:\projets\dzairdeals\config/services.yaml").
当我尝试将这些行添加到我的services.yaml
文件时:
twig.extension.text:
class: Twig_Extensions_Extension_Text
tags: - { name: twig.extension }
composer require twig/extensions
命令了吗? - Dylan Delobelyaml
文件中的格式问题。请检查文件缩进。 - titili