Merge branch 'MDL-81127-main' of https://github.com/izendegi/moodle
[moodle.git] / lib / ltiprovider / readme_moodle.txt
blobd3b6dee15ad31902916f2368a7d8b36091dbcbf1
1 LTI Tool Provider Library PHP
2 =============================
4 Some changes from the upstream version have been made:
5 * Define consumer profile member variable for ToolConsumer class
6 * Added context type property for Context class
7 * Set context type if 'context_type' parameter was submitted through POST
8 * Do not require tool_consumer_instance_guid
9 * Prevent modification of the request to the provider
10 These changes can be reverted once the following pull requests have been integrated upstream:
11 * https://github.com/1EdTech/LTI-Tool-Provider-Library-PHP/pull/10
12 * https://github.com/1EdTech/LTI-Tool-Provider-Library-PHP/pull/11
13 * https://github.com/1EdTech/LTI-Tool-Provider-Library-PHP/pull/47
14 * https://github.com/1EdTech/LTI-Tool-Provider-Library-PHP/pull/48
16 This local changes can be reverted once it's checked that they are present upstream (note the
17 LTI-Tool-Provider-Library-PHP repo has been archived so it doesn't accept pull requests anymore):
18 * MDL-67034 php74 compliance fixes
19 * MDL-71920: Migrated from curl_exec and friends to use our Moodle curl wrapper,
20 so we can better handle site security settings
22 This local change has been made without the accompanying pull request as the upstream library is archived:
23 * $FULLME is used as the URL for OAuth, to fix reverse proxy support (see MDL-64152)
25 It is recommended by upstream to install depdencies via composer - but the composer installation is bundled
26 with an autoloader so it's better to do it manually.
28 Information
29 -----------
31 URL: https://github.com/1EdTech/LTI-Tool-Provider-Library-PHP/wiki
32 License: Apache License, Version 2.0
34 Installation
35 ------------
37 1) Download the latest version of the provider library
38 wget https://github.com/1EdTech/LTI-Tool-Provider-Library-PHP/archive/3.0.3.zip
40 2) Unzip the archive
41 unzip 3.0.3.zip
43 3) Move the source code directory into place
44 mv LTI-Tool-Provider-Library-PHP-3.0.3/* lib/ltiprovider/
46 4) Updates
47 Check that the following pull request is included in the release.
48 Then remove this step from this file.
49 https://github.com/1EdTech/LTI-Tool-Provider-Library-PHP/pull/13
50 If not, apply manually.
52 5) Run unit tests on enrol_lti_testsuite
54 Upgrading Notes
55 ---------------
57 Check if there are any new changes to the database schema. To do this, view the logs
58 since the last release for the data connector base class and the mysql data connector.
60 https://github.com/1EdTech/LTI-Tool-Provider-Library-PHP/compare/3.0.2...3.0.3
62 src/ToolProvider/DataConnector/DataConnector.php
63 src/ToolProvider/DataConnector/DataConnector_mysql.php
65 In case of any changes we may need to update
67 enrol/lti/classes/data_connector.php
68 enrol/lti/db/install.xml
69 enrol/lti/db/upgrade.php
71 * MDL-78144 PHP 8.2 compliance.
72   To temporarily prevent the PHP 8.2 warning about the deprecation of dynamic properties,
73   the #[\AllowDynamicProperties] attribute was added on top of the classes.
74   Below is a handy command to add the attribute above the class line:
75   ```
76   cd lib/ltiprovider/src
77   for file in `find . -name '*.php' `; do sed -i '/^class /i #[\\AllowDynamicProperties]' $file; done
78   ```