-
Notifications
You must be signed in to change notification settings - Fork 128
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
Replace str_contains() call on moodle branch with PHP 7.4-compatible equivalent #194
Comments
I have the same issue while upgrading. Hope for a quick merge. |
Please note that while older Moodle versions still support PHP 7, PHP 7 reached its end of life in November 2021 and has not received security updates for almost 2 years. So, while I fully understand why people want this to run (and the change is really marginal, of course), I wonder if indirectly supporting to further delay the migration to PHP 8 would be the right signal. |
Ubuntu (and Debian) continues to provide security updates for PHP 7.4 through its long-term support system, even though official PHP support ended. This LTS ensures that security patches are backported. However, these updates do not include new features or non-essential bug fixes. https://changelogs.ubuntu.com/changelogs/pool/main/p/php7.4/ |
That's good for Ubuntu and Debian. |
I don't actually have an opinion on if H5P should support PHP 7 or not, but that if the decision is made that it no longer should, the plugin needs to be updated to indicate that it no longer supports older Moodle versions. Currently mod_hvp claims it supports every Moodle version from 2.5; requiring PHP 8.0+ would change that to, at most, 4.0 and up--and I would argue, should really only be 4.2, 4.3, and 4.4. |
@Limekiller You're right, I know about that compatibility claim. It's up to H5P Group either way. It's just my personal view that I'd rather encourage people to migrate to PHP 8, and I merely wondered what opinion I might face here. |
Recently a change was made to the library included in the Moodle plugin mod_hvp that introduces a function call to str_contains(), which is only compatible with PHP 8.0 and higher. However, the plugin claims to support Moodle versions that do not support PHP 8.0, as well as Moodle 4.1, which is still actively supported by Moodle and is fully compatible with PHP 7.4.
Moodle sites on the actively-supported Moodle 4.1 that are running on PHP 7.4, or older sites that do not support PHP 8.0 but are claimed to be supported by mod_hvp, will encounter errors until the function call is removed. I have created a pull request to do so here.
The text was updated successfully, but these errors were encountered: