Yml parse error after SS4.7 update

<%- if @topic_view.topic.tags.present? %>
<%= t 'js.tagging.tags' %>: <%- @topic_view.topic.tags.each do |t| %> <%= t %> <%- end %>
<% end %>

Have just upgraded to SS4.7 and am getting an error in an installed module:
Fatal error : Uncaught Symfony\Component\Yaml\Exception\ParseException: The reserved indicator “%” cannot start a plain scalar; you need to quote the scalar at line 6 (near “generator: %$Ivoba\SilverStripe\SimplePdfPreview\SimplePdfPreviewImagickGenerator”)

Appears to be the %$ in the config.yml file which contains:
Ivoba\SilverStripe\SimplePdfPreview\SimplePdfPreviewImageExtension:
dependencies:
generator: %$Ivoba\SilverStripe\SimplePdfPreview\SimplePdfPreviewImagickGenerator
folderToSave: “Uploads”
imagePrefix: “pdf-preview”

Any quick ideas? Removing %$ results in a different error:

[Emergency] Uncaught TypeError: Argument 1 passed to Ivoba\SilverStripe\SimplePdfPreview\SimplePdfPreviewImageExtension::setGenerator() must implement interface Ivoba\SilverStripe\SimplePdfPreview\SimplePdfPreviewGeneratorInterface, string given

Fixed by adding quotes

generator: ‘%$Ivoba\SilverStripe\SimplePdfPreview\SimplePdfPreviewImagickGenerator’

1 Like