-
Notifications
You must be signed in to change notification settings - Fork 14
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
issue #97: Import externallib with use statements #120
issue #97: Import externallib with use statements #120
Conversation
b6ea12e
to
b7f1674
Compare
The tests performed earlier on this unit test were not on the most recent version of Moodle 4.3. I have now updated locally and amended the commit resolving one of two problems. I'm still looking into this failing unit test.
|
This failure has been relation to my local environment. I have setup a simpler one and the tests are now all passing. This MR is ready for a review. |
Due to https://tracker.moodle.org/browse/MDL-76583 this will need a separate branch. I'll create MOODLE_402_STABLE and update the readme. |
Resolves coding_exception in MOODLE_402_STABLE and up.
b7f1674
to
234c438
Compare
Once this has been mered, I'll create merge requests into the other branches updating the readme. Once those have been merged I'll make the branch |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Functional changes here look okay.
In addition to the notes, are you able to check the CI, there seems to be some errors.
@@ -2,18 +2,18 @@ | |||
# Whenever version.php is changed, add the latest version | |||
# to the Moodle Plugins directory at https://moodle.org/plugins | |||
# | |||
name: MOODLE_310_STABLE - Releasing in the Plugins directory |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might be worth combining the release logic into ci.yml (per the latest reusable workflows docs)
@@ -17,6 +17,7 @@ This plugin currently supports Moodle: | |||
|
|||
| Moodle version | Branch | | |||
| ------------------- | -------------------- | | |||
| Moodle 4.2 and up | MOODLE_402_STABLE | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are 4.0 and 4.1 not supported, if they are, which branch should be used? Seems to be a gap here.
Could you check this please.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Due to https://tracker.moodle.org/browse/MDL-76583 Moodle 4.0 and 4.1 are not supported. I have amended the readme commit accordingly. Even though the commit introduces the namespace I have also given this a test locally. Here are the results of that.
PHPUnit tests results with changes on Moodle 4.1.8 (Build: 20231222)
root@b0ba46b747f2:/var/www/site# vendor/bin/phpunit --testsuite search_elastic_testsuite
Moodle 4.1.8 (Build: 20231222), e591ddc4e8c21df9fb5369e388ef57ef07acbb9b
Php: 8.1.24, pgsql: 14.0 (Debian 14.0-1.pgdg110+1), OS: Linux 6.4.12-060412-generic x86_64
PHPUnit 9.5.28 by Sebastian Bergmann and contributors.
...............................................EE.............. 63 / 115 ( 54%)
.................................................... 115 / 115 (100%)
Time: 02:21.574, Memory: 78.50 MB
There were 2 errors:
1) search_elastic\externallib_test::test_external_search
Error: Class "core_external\external_api" not found
/var/www/site/search/engine/elastic/externallib.php:40
/var/www/site/search/engine/elastic/tests/externallib_test.php:103
/var/www/site/lib/phpunit/classes/advanced_testcase.php:80
2) search_elastic\externallib_test::test_external_search_areas
Error: Class "search_elastic_external" not found
/var/www/site/search/engine/elastic/tests/externallib_test.php:172
/var/www/site/lib/phpunit/classes/advanced_testcase.php:80
ERRORS!
Tests: 115, Assertions: 219, Errors: 2.
75dcbe3
to
c71c371
Compare
c71c371
to
e4435ae
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, thanks Scott.
Resolves coding_exception in MOODLE_402_STABLE and up.
These tests were executed on a 4.3+ branch:
Closes #97