How to fix «Element 'block', attribute 'class': [facet 'pattern'] The value '\Magento\Framework\View\Element\Template' is not accepted by the pattern `[A-Z][_a-zA-Z\d]*(\\[A-Z][_a-zA-Z\d]*)*`» after upgrading Magento to 2.2?

In my case, the design theme contained the following declaration:

<block class="\Magento\Framework\View\Element\Template" name="earos.pdp.after" template="Magento_Catalog::product/view/footer.phtml"/>

I has changed it to:

<block class="Magento\Framework\View\Element\Template" name="earos.pdp.after" template="Magento_Catalog::product/view/footer.phtml"/>