Skip to content
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

3.11 and 3.4 branches use unsupported arrow syntax #109

Open
peta3000 opened this issue Jan 16, 2023 · 6 comments
Open

3.11 and 3.4 branches use unsupported arrow syntax #109

peta3000 opened this issue Jan 16, 2023 · 6 comments

Comments

@peta3000
Copy link

Dear Devs

After updating the mod_facetoface plugin to latest upstream-commit (e9f5a14) on MOODLE_400_STABLE branch, when re-deploying the installation-process exits with the following error messages:

-->System
Default exception handler: Exception - syntax error, unexpected '$s' (T_VARIABLE), expecting ')' Debug: 
Error code: generalexceptionmessage
* line 1100 of /mod/facetoface/lib.php: ParseError thrown
* line 69 of /backup/moodle2/restore_plan_builder.class.php: call to plugin_supports()
* line 85 of /backup/util/includes/restore_includes.php: call to require_once()
* line 18 of /backup/util/helper/copy_helper.class.php: call to require_once()
* line 64 of /backup/util/includes/backup_includes.php: call to require_once()
* line 28 of /lib/classes/task/backup_cleanup_task.php: call to require_once()
* line 136 of /lib/classes/component.php: call to include_once()
* line ? of unknownfile: call to core_component::classloader()
* line ? of unknownfile: call to spl_autoload_call()
* line 347 of /lib/classes/task/manager.php: call to class_exists()
* line 70 of /lib/classes/task/manager.php: call to core\task\manager::scheduled_task_from_record()
* line 90 of /lib/classes/task/manager.php: call to core\task\manager::load_default_scheduled_tasks_for_component()
* line 1821 of /lib/upgradelib.php: call to core\task\manager::reset_scheduled_tasks_for_component()
* line 484 of /lib/installlib.php: call to install_core()
* line 186 of /admin/cli/install_database.php: call to install_cli_database()
!!! Exception - syntax error, unexpected '$s' (T_VARIABLE), expecting ')' !!!
!! 
Error code: generalexceptionmessage !!
!! Stack trace: * line 1100 of /mod/facetoface/lib.php: ParseError thrown
* line 69 of /backup/moodle2/restore_plan_builder.class.php: call to plugin_supports()
* line 85 of /backup/util/includes/restore_includes.php: call to require_once()
* line 18 of /backup/util/helper/copy_helper.class.php: call to require_once()
* line 64 of /backup/util/includes/backup_includes.php: call to require_once()
* line 28 of /lib/classes/task/backup_cleanup_task.php: call to require_once()
* line 136 of /lib/classes/component.php: call to include_once()
* line ? of unknownfile: call to core_component::classloader()
* line ? of unknownfile: call to spl_autoload_call()
* line 347 of /lib/classes/task/manager.php: call to class_exists()
* line 70 of /lib/classes/task/manager.php: call to core\task\manager::scheduled_task_from_record()
* line 90 of /lib/classes/task/manager.php: call to core\task\manager::load_default_scheduled_tasks_for_component()
* line 1821 of /lib/upgradelib.php: call to core\task\manager::reset_scheduled_tasks_for_component()
* line 484 of /lib/installlib.php: call to install_core()
* line 186 of /admin/cli/install_database.php: call to install_cli_database()
 !!
@danmarsden
Copy link
Member

@cameron1729 this looks like a regression caused by #104 - are you able to please take a look?

@dmitriim FYI ^

@cameron1729
Copy link
Contributor

Hi @peta3000 - what version of PHP are you using?

@peta3000
Copy link
Author

Hi @cameron1729 thanks for the quick reply:
It's PHP 7.3.31 from a debian package:
https://packages.debian.org/buster/php7.3

cheers
p

@cameron1729
Copy link
Contributor

Hi @peta3000 - that version of PHP is not supported in Moodle 4.0 (the branch you are using) - for a list of supported PHP versions please see here: https://moodledev.io/general/development/policies/php

However there is still a problem here in that the MOODLE_311_STABLE and MOODLE_34_STABLE branches are using the same arrow function syntax, and those branches should support PHP 7.0-7.3

I'll update the title of this issue to reflect that, thanks!

@cameron1729 cameron1729 changed the title Installation process exits with error code after updating to last commit (e9f5a14) 3.11 and 3.4 branches use unsupported arrow syntax Jan 18, 2023
@peta3000
Copy link
Author

Hi @cameron1729
Thanks for your reply!
I really appreciate it!
I'm going to update the instance to 7.4, run a trial and get back with a short update!
Cheers

@peta3000
Copy link
Author

Hi @cameron1729
Short update:
Deployment with PHP 4.7 worked fine.
Regarding my initial request this ticket can be regarded as closed :).
Thanks a lot for your quick and professional support!

Cheers
p

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants