-
Task
-
Resolution: Fixed
-
Minor
-
None
-
2.6
-
MOODLE_26_STABLE
We come to the point when we need to get rid of some Behat step definitions.
Examples:
- Step is not named correctly and needs renaming
- Step is too particular and should basically do the same just have one more argument.
- There are already two steps doing almost the same and one can easily be substituted with another.
We should apply the same rules for deprecation (add @deprecated since tag in phpdocs, remove after 2 releases) but we can't display debugging messages from inside of behat features.
Policy:
When step definition needs to be deprecated, do the following:
- Move the deprecated step definition to lib/tests/behat/behat_deprecated.php (this file was created as part of
MDL-42627) - In the beginning of deprecated function make sure to call $this->deprecated_message($alternatives). DO NOT throw exception or display debugging notices.
- Add @deprecated since, @see tags to this function phpdocs and create issue to remove this function after 2 major releases as usual, see http://docs.moodle.org/dev/Deprecation (not necessary to create more than one issue per major version)