Skip to content

Commit

Permalink
MDL-57632 core_media: final deprecation core_media_manager::setup
Browse files Browse the repository at this point in the history
  • Loading branch information
sarjona committed Jun 21, 2019
1 parent f1a8db6 commit c2c5f08
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 13 deletions.
15 changes: 3 additions & 12 deletions media/classes/manager.php
Original file line number Diff line number Diff line change
Expand Up @@ -138,19 +138,10 @@ private function __construct($page) {
}

/**
* Setup page requirements.
*
* This should must only be called once per page request.
*
* @deprecated Moodle 3.3, The setup is now done in ::instance() so there is no need to call this
* @param moodle_page $page The page we are going to add requirements to.
* @see core_media_manager::instance()
* @todo MDL-57632 final deprecation
* @deprecated since Moodle 3.3. The setup is now done in ::instance() so there is no need to call this.
*/
public function setup($page) {
debugging('core_media_manager::setup() is deprecated.' .
'You only need to call core_media_manager::instance() now', DEBUG_DEVELOPER);
// No need to call ::instance from here, because the instance has already be set up.
public function setup() {
throw new coding_exception('core_media_manager::setup() can not be used any more because it is done in ::instance()');
}

/**
Expand Down
5 changes: 4 additions & 1 deletion media/upgrade.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
This files describes API changes in /media/ plugins,
information provided here is intended especially for developers.

=== 3.6 ===
=== 3.8 ===
* The final deprecation of core_media_manager::setup() means that this function will no longer be called.
The setup is now done in ::instance() so there is no need to call this.

=== 3.6 ===
* The following functions have been finally deprecated and can not be used anymore:
* core_media_player::is_enabled()
* core_media_player::compare_by_rank()
Expand Down

0 comments on commit c2c5f08

Please sign in to comment.