Closed aspark21 closed 3 years ago
This specifically happens with the 3.9.4+ weekly release 20210130 but not with the 3.9.4 official release
I think it's likely due to some of the Behat changes https://moodle.org/mod/forum/discuss.php?d=417286 https://tracker.moodle.org/browse/MDL-66979
str_contains is only available in PHP 8.0 onwards. So not sure what this plugin has been relying on for it but looks like it will need to adapt
@tim1mw this one's a pretty urgent one for us at it completely breaks our ability to run PHPUnit and Behat for our builds before they go to prod
@aspark21 I'll see what I can do but Friday 5th is the earliest I can possibly look at this.
If you need a quick response, please use the MEDIAL support email, we don't use github for error reports so this isn't monitored. I should probably see if I can turn github Issues off to avoid confusion.
I have asked colleagues to log a ticket but this is useful to have a shared understanding as I wouldn't have access to log tickets & respond to them.
This method should have been prefixed helixmedia_ in the first place to avoid potential clashes, so I've taken the simple approach and renamed it. This is only used in locallib.php so only a few changes were needed. In order to make it easier to release fixes outside of the normal release cycle that might be of use to others, I've added a new branch to this git repo prerelease-fixes and committed the change there.
Just to confirm this resolves the unit test errors and we have deployed to prod, all working ok 😄
Thanks for the prompt resolution of this unexpected spanner
We've run into this problem not because we use PHP 8.0, but because we depend on symphony in our Moodle installation. When will this fix be released in a version?
It's available right now in the prerelease-fixes branch here if you need this immediately:
https://github.com/streamingltd/MEDIAL-Moodle-Activity/tree/prerelease-fixes
Fatal error: Cannot redeclare str_contains() (previously declared in /var/www/html/vendor/symfony/polyfill-php80/bootstrap.php:29) in /var/www/html/mod/helixmedia/locallib.php on line 760