Drupal\Core\Template\Loader\StringLoader needs to implement \Twig_SourceContextLoaderInterface. This is caught by the test infra in
User interface changes
We're keeping up with the Twig API (kinda - Twig is already 2.x and cantering towards 3.x where this new interface will be removed).
Data model changes