Closed wolfgang42 closed 7 years ago
Yes thanks, I will add it to the changelog, now you get 2 distinct methods: ->render for strings and ->renderFile for files. This is to be aligned on Pugjs.
I released 3.0.0-alpha5
that restore the ->render()
pug-php 2 method. But I recommend to use the strict mode: https://github.com/pug-php/pug/blob/3.0.0-alpha5/MIGRATION_GUIDE.md#api-changes
When strict
option is set to true
, ->renderFile()
only render files and ->render()
only render strings, this follow the pugjs API and avoid unexpected behavior and magical tricky detections.
Thanks, splitting these functions makes much more sense than the old way of auto-guessing if it was a filename.
I've upgraded to version 3 for testing, but passing file paths to
$pug->render()
seems to have stopped working. Here's a minimal test case:This worked with 2.7 but simply echoes
/var/www/html/../views//docs.pug
on version 3. I don't see anything in the changelog about this; is there something I'm doing wrong?