Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-78036

Fix small behat tool UI php81 problem (plus amend various links to docs)

XMLWordPrintable

    • MOODLE_401_STABLE, MOODLE_402_STABLE, MOODLE_403_STABLE
    • MOODLE_401_STABLE, MOODLE_402_STABLE
    • MDL-78036_401
    • Hide

      Requisites

      • Use php 81 in the web server.
      • Ensure that composer stuff is installed (composer install).
      • Purge all caches before starting testing every branch.

      Tests

      Problem 1 (php81 deprecation):

      • Log in as admin.
      • Visit the admin/tool/behat/index.php page. Note it can be slow to load depending on the system.
      • Verify that you don't get any "Deprecated: strpos(): Passing null to parameter" message neither on the web page or in web server logs.
      • Verify that a list of steps definitions is listed.

      Problem 2 (links to dev docs):

      • Execute this to check that there aren't remaining URLs pointing to the old dev docs: grep -rP 'docs.moodle.org' admin/tool/behat
      • Verify that nothing is returned.
      • Log in as admin.
      • Visit the admin/tool/behat/index.php page. Note it can be slow to load depending on the system.
      • Expand the "Info" fieldset.
      • Verify that all the links that appear in the "Info" fieldset are pointing to the new dev docs (https://moodledev.io) and that they all work ok.
      Show
      Requisites Use php 81 in the web server. Ensure that composer stuff is installed ( composer install ). Purge all caches before starting testing every branch. Tests Problem 1 (php81 deprecation): Log in as admin. Visit the admin/tool/behat/index.php page. Note it can be slow to load depending on the system. Verify that you don't get any " Deprecated: strpos(): Passing null to parameter " message neither on the web page or in web server logs. Verify that a list of steps definitions is listed. Problem 2 (links to dev docs): Execute this to check that there aren't remaining URLs pointing to the old dev docs: grep -rP 'docs.moodle.org' admin/tool/behat Verify that nothing is returned. Log in as admin. Visit the admin/tool/behat/index.php page. Note it can be slow to load depending on the system. Expand the "Info" fieldset. Verify that all the links that appear in the "Info" fieldset are pointing to the new dev docs ( https://moodledev.io ) and that they all work ok.
    • 1
    • Team Hedgehog 2023 Sprint 2.1
    • Small

      Problem 1: While working on improving how the /admin/tool/behat/index.html page behaves when the php executable cannot be found, it was detected that there is a small php81 problem that escaped to our tests.

      Deprecated: strpos(): Passing null to parameter #1 ($haystack) of type string is deprecated in lib/behat/extension/Moodle/BehatExtension/Definition/Printer/ConsoleDefinitionInformationPrinter.php on line 63
      

      Problem 2: At the same time, it called my attention that the links in that very same page are pointing to the old dev docs, and it seems that we already have new dev docs counterparts in place.

      $ ag 'docs.moodle.org' admin/tool/behat
      admin/tool/behat/renderer.php
      187:        $writetestsurl = 'https://docs.moodle.org/dev/Writing acceptance tests';
      189:        $writestepsurl = 'https://docs.moodle.org/dev/Writing_new_acceptance_test_step_definitions';
       
      admin/tool/behat/cli/util_single_run.php
      92:More info in http://docs.moodle.org/dev/Acceptance_testing#Running_tests
       
      admin/tool/behat/cli/init.php
      105:More info in http://docs.moodle.org/dev/Acceptance_testing#Running_tests
       
      admin/tool/behat/cli/run.php
      90:More info in http://docs.moodle.org/dev/Acceptance_testing#Running_tests
       
      admin/tool/behat/lang/en/tool_behat.php
      33:$string['fieldvalueargument_help'] = 'This argument should be completed by a field value. There are many field types, including simple ones like checkboxes, selects or textareas, or complex ones like date selectors. See the dev documentation <a href="https://docs.moodle.org/dev/Acceptance_testing" target="_blank">Acceptance_testing</a> for details of expected field values.';
       
      admin/tool/behat/cli/util.php
      97:More info in http://docs.moodle.org/dev/Acceptance_testing#Running_tests
      

      So this issue is about to fix the 2 commented problems above.

      Ciao

        1. MDL-78036_401_problem2-1.png
          MDL-78036_401_problem2-1.png
          15 kB
        2. MDL-78036_401_problem2-2.png
          MDL-78036_401_problem2-2.png
          85 kB
        3. MDL-78036_402_problem2-1.png
          MDL-78036_402_problem2-1.png
          15 kB
        4. MDL-78036_402_problem2-2.png
          MDL-78036_402_problem2-2.png
          84 kB
        5. MDL-78036_master_problem2-2.png
          MDL-78036_master_problem2-2.png
          79 kB
        6. MDL-78036_master_problem2.png
          MDL-78036_master_problem2.png
          13 kB
        7. MDL-78036_401_problem1.png
          MDL-78036_401_problem1.png
          154 kB
        8. MDL-78036_402_problem1.png
          MDL-78036_402_problem1.png
          127 kB
        9. MDL-78036_master_problem1.png
          MDL-78036_master_problem1.png
          117 kB

            stronk7 Eloy Lafuente (stronk7)
            stronk7 Eloy Lafuente (stronk7)
            Safat Shahin Safat Shahin
            Jun Pataleta Jun Pataleta
            Raquel Ortega Raquel Ortega
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - 0 minutes
                0m
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 3 hours, 10 minutes
                3h 10m

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