Uploaded image for project: 'Moodle app'
  1. Moodle app
  2. MOBILE-4694

App Behat tests no longer compatible with PHP 7.4

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • None
    • 4.1.0
    • Behat
    • Moodle Apps - 2024 i4.1, Moodle Apps - 2024 i4.2, Moodle Apps - 2024 i4.3

      Hi,

      moodle-plugin-ci now fails to install when using MOODLE_401_STABLE and PHP 7.4 and env variable MOODLE_APP: true.

       

      Output:                                                                      
      69  ================                                                             
      70  Creating Behat configuration ...!!! Exception - syntax error, unexpected '|  
      71  ', expecting ';' or '{' !!!                                                  
      72  !!                                                                           
      73  Error code: generalexceptionmessage !!                                       
      74  !! Stack trace: * line 743 of /local/moodleappbehat/tests/behat/behat_app_h  
      75  elper.php: ParseError thrown                                                 
      76  * line 1544 of /lib/behat/classes/behat_config_util.php: call to require_on  
      77  ce()                                                                         
      78  * line 1206 of /lib/behat/classes/behat_config_util.php: call to behat_conf  
      79  ig_util->get_behat_contexts_for_theme()                                   
      80  * line 520 of /lib/behat/classes/behat_config_util.php: call to behat_confi  
      81  g_util->get_behat_suites()                                                
      82  * line 405 of /lib/behat/classes/behat_config_util.php: call to behat_confi  
      83  g_util->build_config()                                                    
      84  * line 129 of /lib/behat/classes/behat_config_manager.php: call to behat_co  
      85  nfig_util->get_config_file_contents()                                     
      86  * line 308 of /lib/behat/classes/util.php: call to behat_config_manager::up  
      87  date_config_file()                                                           
      88  * line 195 of /admin/tool/behat/cli/util_single_run.php: call to behat_util  
      89  ::start_test_mode()                                                          
      90   !!                   

      There's a union type in local_moodleappbehat/tests/behat/behat_app_helper.php that requires PHP 8.0

       

      https://github.com/moodlehq/moodleapp/blob/d0a89e0424a60421c8a8330f18dd126e7e939bee/local_moodleappbehat/tests/behat/behat_app_helper.php#L743

      No worries if this is now a requirement. Thanks for taking a look.

      All the best,

      Edmund

            pferre22 Pau Ferrer
            edmundfarrow Edmund Farrow
            Dani Palou Dani Palou
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.