-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove the "string" return type constraint from "filter" function
The filter function can actually return any data type. Because a) the signature for the base class doesn't include a return type constraint, and b) the legacy behavior for text filters is to return any argument that is not a string as-is (thus, returning the same type as the original value). Add some additional test cases to make sure we don't re-introduce the same problem in the future (assuming the base class function signature doesn't change, of course). [Fixes: #45]
- Loading branch information
Showing
4 changed files
with
61 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
# Changelog | ||
|
||
All notable changes to this project will be documented in this file. | ||
|
||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), | ||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). | ||
|
||
## [Unreleased] | ||
|
||
### Added | ||
- This CHANGELOG. | ||
|
||
### Fixed | ||
- [#45] Exception: Return value must be of type string, null returned | ||
|
||
## [2.0.0] - 2022-12-17 | ||
|
||
### Added | ||
- Early checks for "text" that cannot be filtered or is not worth filtering (e.g., non-strings, or empty strings). | ||
- [#35] Addded GitHub Actions and information in README.md, contributed by Luca Bösch. | ||
|
||
### Changed | ||
- [#32] **[BREAKING CHANGE]** Updated the unit test machinery to be compatible with Moodle 3.11 and later. The new machinery is incompatible with Moodle 3.10 and later, making this a breaking change. | ||
|
||
### Fixed | ||
- Fixed some Moodle Code Checker and Documentation Checker warnings. | ||
|
||
### Security | ||
- [#39] MDL-77525 apply multilang2 before text formatting and cleaning | ||
|
||
[UNRELEASED]: https://github.com/iarenaza/moodle-filter_multilang2/compare/2.0.0...HEAD | ||
[2.0.0]: https://github.com/iarenaza/moodle-filter_multilang2/compare/1.1.2...2.0.0 | ||
[1.1.2]: https://github.com/iarenaza/moodle-filter_multilang2/compare/1.1.1...1.1.2 | ||
[1.1.1]: https://github.com/iarenaza/moodle-filter_multilang2/compare/1.0.1...1.1.1 | ||
[1.0.5]: https://github.com/iarenaza/moodle-filter_multilang2/compare/1.0.4...1.0.5 | ||
[1.0.4]: https://github.com/iarenaza/moodle-filter_multilang2/compare/1.0.3...1.0.4 | ||
[1.0.3]: https://github.com/iarenaza/moodle-filter_multilang2/compare/1.0.2...1.0.3 | ||
[1.0.2]: https://github.com/iarenaza/moodle-filter_multilang2/compare/1.0.1...1.0.2 | ||
[1.0.1]: https://github.com/iarenaza/moodle-filter_multilang2/compare/1.0...1.0.1 | ||
[1.0]: https://github.com/iarenaza/moodle-filter_multilang2/releases/tag/1.0 | ||
[#45]: https://github.com/iarenaza/moodle-filter_multilang2/pull/45 | ||
[#39]: https://github.com/iarenaza/moodle-filter_multilang2/pull/39 | ||
[#35]: https://github.com/iarenaza/moodle-filter_multilang2/issues/35 | ||
[#32]: https://github.com/iarenaza/moodle-filter_multilang2/issues/32 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters