Commit Graph

594 Commits

Author SHA1 Message Date
Jun Pataleta 5bb4758f77 Merge branch 'MDL-83753-main' of https://github.com/djarran/moodle 2025-02-05 18:05:40 +01:00
Sara Arjona 2f3cffd815 Merge branch 'MDL-83468-main' of https://github.com/andrewnicols/moodle 2025-01-20 16:47:56 +01:00
Andrew Nicols eb2301a76b MDL-83468 cachestore_redis: Skip tests if Redis extension not available 2025-01-20 16:47:56 +01:00
Andrew Nicols 3b1118cfd4 MDL-83468 phpunit: assertEqualsCanonicalizing now compares keys too
In previous versions of PHPUnit, the `assertEqualsCanonicalizing()`
method compared values only, ignoring the keys entirely. Since PHPUnit
10 the method now checks keys where they are non-numeric.

To solve this we call `array_values()`.
2025-01-20 16:47:56 +01:00
Andrew Nicols 118b3ccf46 MDL-83468 phpunit: Skip tests instead of data providers
Empty data providers are invalid and do not represent the state of the
test. Rather than commenting them out we should instead skip them.
2025-01-20 16:47:55 +01:00
Andrew Nicols 1f05f680cd MDL-84124 cache: Purge Redis cache between tests 2025-01-09 07:59:36 +08:00
djarrancotleanu e0a254bf19 MDL-83753 cachestore_redis: Allow for configurable connection timeout 2024-12-19 14:19:19 +10:00
Jun Pataleta 1ff50ac088 NOBUG: Bump versions for main to the current date 2024-12-18 23:53:12 +08:00
Andrew Nicols c2414e5a45 MDL-81520 core: Fix test finality 2024-12-11 12:30:23 +08:00
Helen Foster 9f1293b10d MDL-83823 lang: Import fixed English strings (en_fix) 2024-12-02 21:25:01 +01:00
Andrew Nicols a6acb015a3 MDL-81521 core: Update all possibly data providers to be static
Note: Some data providers could not be automatically be converted to
being static. These will be handled in a separate issue.
2024-11-15 12:50:55 +08:00
Huong Nguyen 29d873b02c Merge branch 'MDL-79165-main' of https://github.com/daledavies/moodle 2024-11-14 10:22:53 +07:00
Dale Davies 47ba008504 MDL-79165 cachestore_file: Add igbinary serializer option
AMOS BEGIN
 CPY [serializer_igbinary,cachestore_redis],[serializer_igbinary,cachestore_file]
 CPY [serializer_php,cachestore_redis],[serializer_php,cachestore_file]
AMOS END
2024-11-14 10:22:37 +07:00
Jun Pataleta 5b421c6db6 NOBUG: Add upgrade notes 2024-10-05 15:08:28 +08:00
Huong Nguyen 3a6640c461 NOBUG: Add upgrade notes 2024-10-04 21:06:11 +07:00
Sara Arjona d7f28e0c93 Merge branch 'MDL-83309-main' of https://github.com/junpataleta/moodle 2024-10-03 08:22:26 +02:00
Jun Pataleta f24e0ecf53 MDL-83309 versions: Bump all versions and requires near release 2024-10-02 17:04:53 +08:00
Huong Nguyen d421ca9ccd Merge branch 'mdl83176' of https://github.com/danmarsden/moodle 2024-10-02 10:00:18 +07:00
Huong Nguyen 4d1c0cb04b NOBUG: Add upgrade notes 2024-10-01 19:37:15 +07:00
Dan Marsden 1ba9fb88d9 MDL-83176 cache: Include formslib as it doesn't autoload 2024-09-30 20:39:48 +13:00
Huong Nguyen 282421ce6c NOBUG: Change upgrade notes version 2024-09-27 19:16:56 +07:00
Huong Nguyen 7b4ed9096f NOBUG: Add upgrade notes 2024-09-27 18:45:07 +07:00
Huong Nguyen df1e264d29 Merge branch 'MDL-83085-main' of https://github.com/meirzamoodle/moodle 2024-09-24 10:35:18 +07:00
Andrew Nicols b1b4dc4cc9 MDL-83209 cache: Correct class import 2024-09-20 09:47:59 +08:00
Andrew Nicols e9165e309b Merge branch 'MDL-83209-main' of https://github.com/PhMemmel/moodle 2024-09-20 09:47:10 +08:00
Philipp Memmel 47ba728eae MDL-83209 core_cache: Fix regressions by enforcing codestyle 2024-09-19 10:42:52 +02:00
Ilya Tregubov 6f9f396ec6 Merge branch 'MDL-81987_main' of https://github.com/marxjohnson/moodle 2024-09-19 12:42:50 +08:00
meirzamoodle a933455be2 MDL-83085 redis: Use named parameters if supported 2024-09-11 12:15:14 +07:00
Paul Holden 0dda0c91e1 Merge branch 'MDL-82974-main' of https://github.com/ilyatregubov/moodle into main 2024-09-04 10:32:06 +01:00
Jun Pataleta ea2d3558d9 NOBUG: Add upgrade notes 2024-09-03 20:05:49 +08:00
Trisha Milan e52fbd2f84 MDL-66151 Performance: Session Manager modularisation
Storage of session metadata has moved into the session handler class.
This allows for other classes to fully control session handling and
removes the dependancy on the core sessions database table.

Previously, the standard method of interaction with the
session metadata was direct DB calls; this may break other plugins as there
are now proper APIs available through the session manager.

Co-authored-by: Darren Cocco <moodle@darren.cocco.id.au>
Co-authored-by: Trisha Milan <trishamilan@catalyst-au.net>
Co-authored-by: Andrew Nicols <andrew@nicols.co.uk>
2024-09-03 13:04:04 +10:00
Ilya Tregubov f23472345c MDL-82974 core_cache: Fix typo. 2024-09-02 12:57:13 +08:00
Huong Nguyen 7aef6e21cb NOBUG: Add upgrade notes 2024-08-29 18:09:49 +07:00
Huong Nguyen 4f25ac1044 Merge branch 'MDL-82158-main' of https://github.com/andrewnicols/moodle 2024-08-27 10:01:38 +07:00
Andrew Nicols c21aeeb380 MDL-82158 core: Update most uses of cache_ classes 2024-08-20 20:44:28 +08:00
Andrew Nicols b92008c92c MDL-82158 core_cache: Coding style fixes 2024-08-20 20:44:28 +08:00
Andrew Nicols f31d9ebc8c MDL-82158 core: Remove uses of cache/lib.php 2024-08-20 15:47:14 +08:00
Andrew Nicols 24a9c64cb3 MDL-82158 core_cache: Move cache forms 2024-08-20 15:27:06 +08:00
Andrew Nicols cd6501c017 MDL-82158 core_cache: Moved disabled cache infrastructure 2024-08-20 15:27:06 +08:00
Andrew Nicols 7a9f55694f MDL-82158 core_cache: Move cache_config_writer 2024-08-20 15:27:05 +08:00
Andrew Nicols a63e81bfa5 MDL-82158 core_cache: Move cache definition 2024-08-20 15:27:05 +08:00
Andrew Nicols c5ff1b053f MDL-82158 core_cache: Move cache stores 2024-08-20 15:27:05 +08:00
Andrew Nicols 4038c52928 MDL-82158 core_cache: Move interfaces 2024-08-20 15:27:04 +08:00
Mark Johnson ff31b37c78 MDL-81987 redis: Set connection and read timeouts to 10 seconds
This allows the site to continue operating in case of degraded
performance, rather than throwing exceptions.
2024-08-08 13:45:48 +01:00
Andrew Nicols 024e36be17 MDL-81634 core: Fix all implicitly defined nullables
Note: This does not impact third-party libraries.
2024-08-02 14:11:12 +08:00
Jun Pataleta 5b68ba9eee Merge branch 'MDL-75864-main' of https://github.com/meirzamoodle/moodle 2024-07-18 12:48:03 +08:00
Eloy Lafuente (stronk7) ad5fe71868 MDL-82207 phpunit: fix various @covers annotations (take#1)
This fixes various (not all) wrong @covers annotations that
are reported as warnings by PHPUnit when it's run with
code-coverage enabled.

When possible, the preferred solution is to change to
@covers at class level, that is the recommended way.

If multiple classes are involved, then a mix of @coversDefaultClass
and @covers at method level are used (always trying to use the
minimum needed patch).

This is the first of a series of issues created as sub-tasks
of MDL-82142.
2024-06-24 12:07:39 +02:00
Meirza 4fbf34b73d MDL-75864 cache: Change key prefix in cache_cron_task
Currently, the cache_cron_task is set to look for 'sess_' as a key prefix,
which is not used in any code. As a result, sessions that have exceeded the timeout are never deleted.

The proposed patch involves changing the prefix to the LASTACCESS key prefix and
fixing the return value of get_many in the Redis cache so that it can return the required keys.

Co-authored-by: Renaud Lemaire <rlemaire@cblue.be>
2024-06-19 13:41:37 +07:00
Eloy Lafuente (stronk7) 674497a12c MDL-81523 phpunit: Add all missing setUp/tearDown parent calls
All setUp(), tearDown(), setUpBeforeClass() and tearDownAfterClass()
must, always, call to parent, to ensure that everything is properly
set and cleaned.

While in a lot of situations this is not needed (parents may not
have anything to run), with PHPUnit >= 10 this can become more
important because we are going to move the reset code from current
placement @ runBare() to setUp()/tearDown().

Note that all the changes performed in this commit have been detected
and fixed by moodle-cs (ParentSetUpTearDownSniffTest).
2024-06-14 16:04:57 +02:00
Eloy Lafuente (stronk7) 4f7631113c MDL-81522 phpunit: Add missing void return type to all tests #2
This commit includes more changes, all them also adding the :void
return type to unit tests missing them.

The difference is that all these changes, while also detected
perfectly by the moodle.PHPUnit.TestReturnType sniff, were not
auto-fixed (like the previous commit ones), because all them
do include some "return" statement and, for safety, we don't
fix them.

All the cases have been visually inspected and confirmed that
the existing "return" statements always belong to anon
functions within the test body and not the test own return statement.
2024-06-11 11:55:08 +02:00