120 Commits

Author SHA1 Message Date
Andrew Nicols
192a7797ab
MDL-80072 core: Add php-di codebase 2024-02-12 11:11:15 +08:00
Andrew Nicols
12dcde3fae
MDL-80072 core: Add PSR-11 interfaces 2024-02-09 15:03:57 +08:00
raortegar
f81d6ed426 MDL-78511 lib: Include JmesPath library
JMESPath library is required by AWS SDK for PHP library
2023-12-08 15:27:05 +01:00
raortegar
9b98f78d2a MDL-78511 lib: Include aws-sdk library
Include AWS SDK for PHP library.
This library is used in SMS factor from MFA project
2023-12-08 15:27:05 +01:00
Andrew Nicols
846892ab07
MDL-79697 core: Coding style updates 2023-11-15 21:24:31 +08:00
Andrew Nicols
db556a4ce8
MDL-79697 core: PSR-4 NS can be spread across multiple dirs
The PSR-4 specification does not preclude a single namespaces from
having multiple sources. This is the case for several PSR standards
including standard packagist packages distributed by PSR:

- PSR-7 - HTTP Message Interfaces: \Psr\Http\Message
- PSR-17 - HTTP Factories: \Psr\Http\Message
- PSR-15 - http-server-handler: \Psr\Http\Server
- PSR-15 - http-server-middleware: \Psr\Http\Server
2023-11-15 21:23:27 +08:00
Petr Skoda
99a7a7c782 MDL-74954 core: add Hooks based on PSR-14 2023-05-20 11:03:46 +02:00
Andrew Nicols
31f82832b6 MDL-65471 core: Sort directories before hashing 2023-04-06 15:41:00 +08:00
Peter Burnett
027c770eab
MDL-65471 upgrade: framework to reduce maintenance mode 2023-04-06 11:38:26 +10:00
Jun Pataleta
e95e290532 MDL-77783 core: Validate sublugins.json
* Validate the decoded subplugins.json before processing it.
* Log errors if subplugins.json is invalid or if plugintypes is not
defined.
2023-03-29 09:29:36 +08:00
Jun Pataleta
cd0afd5c76 MDL-77105 core: Method to determine whether a plugin has monolog icons 2023-03-27 13:32:09 +08:00
Andrew Nicols
8ae5ebb507 MDL-77163 cachestore_mongodb: Remve from core 2023-02-28 22:24:04 +08:00
Safat
59a9987719 MDL-76135 core: Add guzzle cache middleware 2023-01-30 13:05:27 +11:00
Safat
7c5363eed3 MDL-76135 core: Implement the Guzzle library in core
This commit will implement the Guzzle library in core
to make it usable in different locations.

Co-Authored-By: Andrew Nicols <andrew@nicols.co.uk>
Co-Authored-By: Safat Shahin <safat.shahin@moodle.com>
2023-01-30 13:05:27 +11:00
Andrew Nicols
93ab932211 MDL-76362 core: plugin names must be strings to be valid 2023-01-23 09:15:55 +08:00
Marina Glancy
b0a83aa7bd MDL-76362 various: Avoid passing nulls to functions that don't allow nulls
PHP 8.1 is more strict on the parameter type. Functions such as trim(), strlen(), str_replace(), etc
show notice when null is passed as an argument
2023-01-23 09:15:54 +08:00
Meirza
3b4bc74692 MDL-76219 lib: Remove Box\Spout library 2023-01-05 16:04:37 +07:00
Meirza
b2b17b9d9b MDL-76219 lib: Add the OpenSpout 3.7.3 library 2023-01-04 09:47:06 +07:00
Eloy Lafuente (stronk7)
28937d4243 MDL-71096 core: Add meta information about APIs to core
Right now we have the information only in docs:
  - https://docs.moodle.org/dev/Core_APIs
  - https://moodledev.io/docs/apis

And, in fact, we are crawling those pages to get the information
from various tools (moodlecheck, CiBoT...). Obviously, that's far
from ideal, the source only has the current list of APIs, and
there isn't much information there but the names.

So we are moving the source of information to be in core, so it
can be modified between branches, and contains richer information:
 - The component the API belongs to, usually a subsystem or core.
 - If the API can be used as level 2 namespace.
 - If the API can be used as level 2 namespace out from its component.

Note that all that information has NO USES right now in core (and maybe
never will), but tools/checkers will benefit enormously by having that
information at hand, so we can check for namespaces, categories and
other bits way better.

Also, once we have this, the APIs dev documents linked above, surely
can be improved by being automatically generated and include all the
meta-information available.

It also includes a very basic json schema validating the basis. It can
be tried online @ https://www.jsonschemavalidator.net , or any other
tool. PHP requires extra libraries to be able to perform the validation.

Covered with unit tests, both api-related functions and structure validation.
2022-12-09 10:49:12 +01:00
Eloy Lafuente (stronk7)
a0d916bc86 MDL-76055 libraries: Autoload phpxmlrpc and verify it works
Also, we can now safely remove Autoloader.php, because
Moodle PSR-4 autoloader has taken control, so document
and test it too.
2022-11-02 15:56:38 +01:00
Simey Lameze
b20cca2690 MDL-72292 core: add param type and polishing 2022-06-17 09:50:38 +08:00
Alexander Bias
8583feb724 MDL-72292 core: Check if fulldir is set when loading renamed classes 2022-06-17 09:41:07 +08:00
Jake Dallimore
6c0ffde138 MDL-69542 libraries: Add the LTI 1.3 library 2022-02-11 10:07:39 +08:00
Adam Pawełczak
f4783dbb0a MDL-69061 core: Fix admin path replacement with path to $CFG->admin 2022-01-11 11:32:26 +08:00
Sara Arjona
7045dd1948 MDL-71473 lib: Remove XMPPHP (Jabber) third-party lib
As the message_jabber notification plugin has been removed from core,
the XMPPHP library (aka Jabber) is not required any more so it has
been completely removed from Moodle core too.
2021-09-13 08:33:15 +02:00
Simey Lameze
1c0baed969 MDL-65743 lib: add XMPPHP namespace and update calls 2020-10-05 13:37:51 +08:00
David Mudrák
801ee23427 MDL-69050 lang: Improve the wording of the comments
Stop using the terms whitelist/blacklist when used to allow/deny things.
2020-09-24 19:41:58 +02:00
Michael Hawkins
5dc3df0e0c MDL-69548 core: Adding the http-message library
This is a dependency of ZipStream
2020-09-18 10:01:09 +08:00
Michael Hawkins
8eee0f5e26 MDL-69548 core: Adding the php-enum library
This is a dependency of ZipStream
2020-09-17 14:16:59 +08:00
Michael Hawkins
6d3c27fe7f MDL-69548 core: Adding the ZipStream library
This allows downloading of zip files as a stream, and will be used by
the Download course content project (MDL-69540).
2020-09-17 14:16:59 +08:00
Andrew Madden
3df8492132 MDL-67850 lib: add new plist library
Co-authored-by: Nicholas Hoobin <nicholashoobin@catalyst-au.net>
Co-authored-by: Dmitrii Metelkin <dmitriim@catalyst-au.net>
2020-04-29 14:10:22 +10:00
David Mudrák
3f82b17927 MDL-67768 core: Add some common dirs to core_component::$ignoreddirs
The core_component::$ignoreddirs lists all directories that are reserved
and cannot be used as valid plugin names. This is particularly important
for some plugin types such as 'webservice' that share the same root
location as the core subsystem of the same name.
2020-01-28 10:18:25 +01:00
Mathew May
f619e305a0 MDL-65761 lib: Update scssphp to 1.0.0 2019-07-16 09:16:44 +08:00
Eloy Lafuente (stronk7)
3a1522b1a4 MDL-65995 components: Too early to use debugging()
components are loaded very early in Moodle bootstrap/warmup
process. So, basically, core_component must be vanilla php
and moodlelib/weblib facilitites are not available yet.

So, changing debugging() call to error_log(), to make it
consistent with the rest of the calls in the method.
2019-06-22 12:06:25 +02:00
Andrew Nicols
29c442c558 MDL-65646 core: Move component storage to json 2019-06-13 12:26:00 +08:00
Andrew Nicols
b8b6bd7530 MDL-65536 mod_lti: JWT should use the class loader 2019-05-14 11:27:26 +08:00
Tom Dickman
0d6a45d2fe MDL-64284 core: improved performance of component class searching
Added static caching of classes to reduce load times and reduce calls to `get_component_classes`
by altering to accept a null component value to search classmap only once.
2019-03-29 11:44:43 +11:00
Víctor Déniz Falcón
2a944b5b41 MDL-54592 cachestore_mongodb: MongoDB cache store use new driver.
The scope of this change is limited to modifying the MongoDB cache
plugin to use the new version of the driver that accepts PHP 7.x
versions. Following the instructions in the official MongoDB
documentation, https://docs.mongodb.com/php-library/current/, the
MongoDB PHP Library was included and used.
2019-03-15 13:50:51 +00:00
David Monllaó
e4453adc55 MDL-60944 tool_analytics: Adding create and delete features
Extra modifications to refine the preexisting patch.
2019-02-25 09:54:07 +01:00
Daniel Neis Araujo
01c1095954 MDL-57898 core_customfield: Custom fields API
This commit is part of work on Custom fields API,
to minimize commit history in moodle core the work of a team of developers was split
into several commits with different authors but the authorship of individual
lines of code may be different from the commit author.
2019-01-18 14:28:17 +01:00
Jake Dallimore
3a1ece149f MDL-63658 core: new method get_component_names() added to core 2018-10-18 08:22:07 +08:00
Jake Dallimore
4fca5dabb2 MDL-63658 core_favourites: introduce the favourites subsystem to core 2018-10-17 10:16:18 +08:00
Andrew Nicols
39b17e9933 Merge branch 'wip-MDL-62138-master' of git://github.com/marinaglancy/moodle 2018-05-01 11:46:27 +08:00
Bas Brands
c8cc25caba MDL-61657 block_myoverview: implement course images for the myoverview block 2018-04-23 23:21:06 +02:00
Marina Glancy
dde3d58eb1 MDL-62138 core: remove core_register and core_publish
These components have no classes and no strings and have no purspose. Component core_hub is responsible
for storing data, defining classes and strings for site registration and course publishing

This also reverts MDL-61945
2018-04-23 13:17:12 +08:00
Andrew Nicols
81626948c7 MDL-62047 core_userkey: Define component path 2018-04-19 12:46:52 +08:00
Jake Dallimore
5749f8a4f7 MDL-61875 core_component: new method to get full components list 2018-04-10 08:44:40 +08:00
Andrew Nicols
dcc16e155d MDL-61307 core: Define a new privacy component 2018-03-09 09:59:36 +08:00
Jun Pataleta
4f53f3f571 Merge branch 'MDL-58713-master' of git://github.com/jleyva/moodle 2017-10-17 09:03:08 +08:00
Juan Leyva
dc78f150fa MDL-58713 filters: Support auto-loading in the filters component 2017-10-16 10:25:17 +02:00