-
-
Notifications
You must be signed in to change notification settings - Fork 42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PHP 7.4 with Pug 2.7.5 minor correction #232
Comments
Yes this method is required in PHP 7.4 and I implemented it in Pug-php 3: 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! |
#232 Fix by adding missing StreamWrapper interface method
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!
The text was updated successfully, but these errors were encountered: