Do not work app.
Replacing line 47 with:
$loader = new \Twig\Loader\FilesystemLoader(dirname(__DIR__) . '/App/Views');
should get everything working for you. Issue is caused by Filesystemloader needing to be FilesystemLoader
Thank you for your example.
The currect are FilesystemLoader and not Filesystemloader.
Most helpful comment
Replacing line 47 with:
$loader = new \Twig\Loader\FilesystemLoader(dirname(__DIR__) . '/App/Views');
should get everything working for you. Issue is caused by Filesystemloader needing to be FilesystemLoader