Closed dadajuice closed 4 years ago
Yes this method is required in PHP 7.4 and I implemented it in Pug-php 3: https://github.com/phug-php/renderer/commit/5b27d5f9140a97db6338a135cecb73eb8c58bbcd
You can open a pull-request to add it in Pug-php 2 too. But it needs to keep the actual compatibility so don't put the type hints that are not supported in PHP 5.
Thank you for your prompt answer! I did a quick PR following your contribute documentation. I sent it into the version-2.next branch as it seems the best and the most logical one for my merge.
Have a nice day!
Thanks. Version 2.7.6 released.
Hello,
I recently updated PHP to 7.4 for one of my project which runs on Pug 2.7.5 and everything seems to work fine except a minor thing. It triggers the following warning:
Once the page is cached, the warning no longer appears.
Looking at the code I tracked down the origin of the problem which is, I think, in Template.php class (/Jade/Stream/Template.php). It seems this class is used as a "streamWrapper" and maybe PHP 7.4 is now enforcing all interface methods to be implemented and its missing the
stream_set_option
method as stated in the warning.So, as a test, I just went on and added the method (based on the PHP.net documentation https://www.php.net/manual/en/streamwrapper.stream-set-option) in the Template.php class simply returning true and it silenced the warning and all went well.
So I don't know if there's more than meets the eye to this apparently easy issue, but if you can simply add this to the build it would be very appreciated :) I know I could just configure my .htaccess to silence warnings, but I'm testing my luck here and see if you have time to check this :)
Thank you very much for your time!