Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

PHP Building Websites with PHP Slim Basics & Twig Templates Layouts with Twig

Josh Foster
Josh Foster
8,896 Points

When I render 'about.twig', the page loads but I get a warning about Twig compatibility issue.

I get the following error:

"Warning: Declaration of Slim\Views\Twig::render($template) should be compatible with Slim\View::render($template, $data = NULL) in /home/treehouse/workspace/vendor/slim/views/Slim/Views/Twig.php on line 45"

at the top of the main page after it has been set up according to the lesson. I have $app->render('about.twig'); etc., basically everything identical to Hampton's code, but I still get this warning.

*My only guess is it may have something to do with the version of Twig I was forced to download. When given the choice to load the latest version of any package using composer, it would almost invariably "kill" the download for no reason after going to the automatic download phase. My only way around this was to choose the versions Hampton was choosing when the video was made (slightly earlier versions). These seemed to be acceptable to composer and the downloads were not "killed".