-
Bug
-
Resolution: Unresolved
-
Critical
-
None
-
5.0
-
MOODLE_500_STABLE
This undocumented change to the base provider class API contract (e.g. from a concrete to a static method) in MDL-82977 (5.0):
- abstract public function get_action_list(): array;
|
+ abstract public static function get_action_list(): array;
|
Means that any sites with custom enabled AI providers will be broken upon upgrade to 5.0 - when editing a course settings page (or anywhere that uses an editor with AI prompt), for example, we get:
Edit course settings
|
|
Fatal error: Cannot make static method core_ai\provider::get_action_list() non static in class aiprovider_jokes\provider in /opt/moodle/master/src/ai/provider/jokes/classes/provider.php on line 38
|
This is a non-backwards compatible/breaking API change, and also means that AI providers that work on 5.0 can never work on 4.5, because we get the inverse error to that above:
Fatal error: Cannot make non static method core_ai\provider::get_action_list() static in class aiprovider_jokes\provider in /opt/moodle/45/src/ai/provider/jokes/classes/provider.php on line 38
|
This is perhaps less of a concern than those sites upgrading from 4.5 that will be broken until their AI providers are updated/fixed. We should ensure the API doesn't explode so dramatically, and ensure a smoother upgrade experience for our AI users
- is a regression caused by
-
MDL-82977 AI: Provider instances
-
- Closed
-