To be integrated as part of MDL-81266
When running PHPUnit 9.6 we get the following deprecation warnings:
"assertObjectHasAttribute() is deprecated and will be removed in PHPUnit
10. Refactor your test to use assertObjectHasProperty() instead."
So we replace all instances of assertObjectHasAttribute with
assertObjectHasProperty.
PHPUnit justifies the change with:
> PHPUnit currently refers to "fields" (see above) as "attributes". This
> is (or will become) confusing considering the introduction of
> attributes in PHP 8 and their support in PHPUnit. PHPUnit will be
> changed to use the term "property" instead of "attribute" where "field"
> is meant.
Signed-off-by: Daniel Ziegenberg <daniel@ziegenberg.at>
The curent patch revealed a bug inside set_matrix_power_levels
where returned user power levels contained an array of objects.
Other methods were failing and giving incorrect responses
as they were expecting arrays.
Previously, we replaced information in the same communication record
in the database, now there will be a unique record per provider.
This ensures when switching between different providers, the correct
actions such as room member management can be actioned for the correct
provider.
This also includes the required updates for the instances to no
longer assume a provider must be enabled to be relevant. Specifying a
provider is optional to fetch a specific provider instance, the default
will use the currently enabled provider.
The API was incorrectly assuming that all uses of the API were for a
course, and that the instanceid of the communication instance was a
course id. These assumptions are both entirely wrong.
The API is intended to support a range of uses including use at the
site, user, and activity levels.
Furthermore, if a group were to be used, then the instanceid should be
of that group's id, and therefore the contextid would need to be fetched
or that group's course instead.
The only solution here is to add a new contextid field to the table, and
implement it all parts of the API.
This change requires a change in the mock server which we don't have
time to do before Beta. This will be done in the coming days and this
commit content reverted.
This one will be re-introduced in MDL-79460
This change requires a change in the mock server which we don't have
time to do before Beta. This will be done in the coming days and this
commit content reverted.
This is a brand new subsystem, plugin-type, and plugin. They are written
from the ground up by us. They should not contain any coding style
violations.
This change requires a change in the mock server which we don't have
time to do before Beta. This will be done in the coming days and this
commit content reverted.
This change introduces a new API call to fetch the current power levels.
The result of this are used to fetch current admin users so as not to
remove them.
The update of existing users is simplified to only set users who do not
have the default level.
No need to sync users for role changes.
Power level changes do not need to happen after being added to a room.
They can happen in any order and persist after a user is removed.