As MDL-73016 set the minimum supported PHP version for Moodle 4.4 and up
to PHP 8.1 we can now safely remove this check. It was introduced with
MDL-73523 because of deprecated openssl_x509_free(), openssl_pkey_free()
and openssl_free_key() functions.
Signed-off-by: Daniel Ziegenberg <daniel@ziegenberg.at>
As MDL-73016 set the minimum supported PHP version for Moodle 4.4 and up
to PHP 8.1 we can now safely remove this check.
Signed-off-by: Daniel Ziegenberg <daniel@ziegenberg.at>
As MDL-73016 set the minimum supported PHP version for Moodle 4.4 and up
to PHP 8.1 we can now remove the check PHP version 7.2 in combination
with the igbinary extension version.
Signed-off-by: Daniel Ziegenberg <daniel@ziegenberg.at>
As MDL-73016 set the minimum supported PHP version for Moodle 4.4 and up
to PHP 8.1 we can now safely switch to php_serialize as the serialize
handler.
Signed-off-by: Daniel Ziegenberg <daniel@ziegenberg.at>
As MDL-73016 set the minimum supported PHP version for Moodle 4.4 and up
to PHP 8.1 we can now safely remove this check. As the lang string
`errorphp7required` is particular to mlbackend php plugin we are going
for direct deletion instead of regular deprecation.
Signed-off-by: Daniel Ziegenberg <daniel@ziegenberg.at>
Because of PHP bug #70322 two different behaviours were tested (see
MDL-51863). Since those 10 year old PHP versions are way outdated there
is no reason to test for them any longer.
Signed-off-by: Daniel Ziegenberg <daniel@ziegenberg.at>
While searching for no longer needed PHP 5.x & 7.0 checks, the
`phpversionhelp` lang string and, subsequently, the `memorylimithelp`
lang string and the `install_helpbutton()` and
`install_print_help_page()` functions were discovered. According to
comments on MDL-2787 and MDL-64482 they are no longer in use since
Moodle 1.x (approximately), neither reachable since some good versions
ago. With MDL-17458 (commit 3b09331066),
the function `print_compatibility_row()` was gone, and it seems like it
was the only place calling `install_helpbutton()`. And
`install_helpbutton()` was the only place where a link to the help mode
(e.g. `install.php?help=$helpfield`) ever surfaced. As both lang
strings and functions are particular to the installer and never could
have been used outside of it, we are going for direct deletion instead
of regular deprecation.
Signed-off-by: Daniel Ziegenberg <daniel@ziegenberg.at>
As MDL-73016 set the minimum supported PHP version for Moodle 4.4 and up
to PHP 8.1 we can now safely write this as a one-liner.
Signed-off-by: Daniel Ziegenberg <daniel@ziegenberg.at>
As MDL-73016 set the minimum supported PHP version for Moodle 4.4 and up
to PHP 8.1 we can now safely remove this check.
As it was decided that we will not upgrade this library from upstream
any more (see MDL-52465) we can probably safely remove this. This change
is one of a long series of earlier changes. See readme_moodle.txt.
Signed-off-by: Daniel Ziegenberg <daniel@ziegenberg.at>
As MDL-73016 set the minimum supported PHP version for Moodle 4.4 and up
to PHP 8.1 we can now safely remove this check. It was introduced with
MDL-75945 because a new signature was introduced to ImagePolygon
functions from PHP 8.1 with the previous signature deprecated in 8.1.
Signed-off-by: Daniel Ziegenberg <daniel@ziegenberg.at>
As MDL-73016 set the minimum supported PHP version for Moodle 4.4 and up
to PHP 8.1 we can now safely remove this check. It was introduced with
MDL-73523 because of deprecated openssl_x509_free(), openssl_pkey_free()
and openssl_free_key() functions.
Signed-off-by: Daniel Ziegenberg <daniel@ziegenberg.at>
As MDL-73016 set the minimum supported PHP version for Moodle 4.4 and up
to PHP 8.1 we can now safely remove this check. It was introduced with
MDL-73523 because of deprecated openssl_x509_free(), openssl_pkey_free()
and openssl_free_key() functions.
Signed-off-by: Daniel Ziegenberg <daniel@ziegenberg.at>
As MDL-73016 set the minimum supported PHP version for Moodle 4.4 and up
to PHP 8.1 we can now safely remove this check. It was introduced with
MDL-73523 because of deprecated openssl_x509_free(), openssl_pkey_free()
and openssl_free_key() functions.
Signed-off-by: Daniel Ziegenberg <daniel@ziegenberg.at>
This fixes various external methods that initialize page output
manually, e.g. `core_get_fragment`, which can mess with third party
proxies that modify data in transit because of the current default
response type header (text/html).
Co-authored-by: Mario Torres
This just asserts that web services provided by deprecated plugins can
still be used (similar to how their APIs can still be used during the
deprecation period).
Presets are stored in the DB and may contain config for plugins which
have since been deprecated. This just makes sure these are skipped when
trying to apply the preset.
This ensures:
- existing adhoc tasks will run and be cleared from the queue
- new adhoc tasks cannot be scheduled
- scheduled tasks cannot be listed or fetched via scheduling
Given the nature of the task API, since all tasks are just objects,
a manually created task can still be run via its ::execute() method.
This change:
- reports deprecated plugins during upgrade (informational only)
- reports deprecated plugins via site admin, permitting uninstall
- adds env check to block site install/upgrade when phase 2 deprecated
(deleted) plugins are detected. They must be uninstalled to continue.
This change also includes a small extension to testable_plugin_manager,
allowing it to load a fixture plugininfo class for mock plugintypes from
the respective mock type directory root instead of requiring the
plugininfo be located in lib/classes/plugininfo. This prevents debugging
calls during mock use in tests.
This change:
- Adds param to plugin_manager::get_plugins() to permit return of
plugininfo for deprecated/deleted plugins, defaulting to false for
b/c.
- ensures plugininfo represents the deprecation state, via:
-- base::is_deprecated() and
-- base::is_deleted()
- ensures plugin_manager supports deprecated/deleted plugins in the
following APIs:
-- plugin_manager::get_present_plugins()
-- plugin_manager::get_installed_plugins()
-- plugin_manager::get_plugin_info()
-- plugin_manager::get_plugintype_root()
-- plugin_manager::can_uninstall_plugin()
-- plugin_manager::get_uninstall_url()
The above changes facilitate listing/reporting on deprecated or deleted
plugins in install, upgrade or site admin views.
This change adds the following fake plugintype+plugins for testing
\core\component:
- mock plugintype 'fake'
- mock plugin 'fake_fullfeatured'
- mock subplugintype for the 'fake' plugintype, 'fullsubtype'
- mock subplugintype for the 'fake' plugintype, 'fulldeprecatedsubtype'
- mock subplugintype for the 'fake' plugintype, 'fulldeletedsubtype'
- various mock implementations for APIs like access, events,
web services, hooks, legacy callbacks and class callbacks.
This adds support to the existing, shallow fakeplugin mocks provided by:
- advanced_testcase::add_mocked_plugintype() and
- advanced_testcase::add_mocked_plugin()
and adds new methods for deep mocking fakeplugins:
- advanced_testcase::add_full_mocked_plugintype()
- advanced_testcase::deprecate_full_mocked_plugintype()
- advanced_testcase::delete_full_mock_plugintype()
Deep mocking is required to test \core\component itself.
This allows filter fields to use client-side form validation attributes to check for valid values,
and adds a validation() method for filters to implement custom validation conditions.
In the event of a validation failure, the invalid filters will not be applied, and the URL will
not be updated to avoid user sharing a URL that will generate an error. Filter conditions should
still implement server-side validation and throw exceptions to avoid erroneous values being
manually inserted into the URL.
Previously it was not possible to manually specify the modified time for
a question in the test generator. This extends to the mechanism allowing
the modifying user to be specified (rather than using the current user)
to also allow the timemodified to be specified.
This adds a new datafilter Javascript class for a
datetime filter. This supports filtering by dates before,
after or between the selected value(s).
The fields for selecting datetimes in the filter use
<input type="datetime-local">, so this commit also adds
support for filling reading and writing those fields in
behat tests.
The endorsement has been removed from the JSON because, according to
the OBv2.0specification, it must not be included in either the badge
or the assertion.
Including it results in a format error, rendering the badge invalid.