From fafa097dd2a1a1ba926338a52d280a5ce8b5380a Mon Sep 17 00:00:00 2001 From: cescobedo Date: Mon, 17 Jan 2022 12:43:03 +0100 Subject: [PATCH] MDL-71713 auth_cas: Set Moodle files after phpCAS upgrade --- auth/cas/CAS/readme_moodle.txt | 24 ++++++++++++++++++++++++ auth/cas/auth.php | 3 ++- auth/cas/thirdpartylibs.xml | 2 +- 3 files changed, 27 insertions(+), 2 deletions(-) create mode 100644 auth/cas/CAS/readme_moodle.txt diff --git a/auth/cas/CAS/readme_moodle.txt b/auth/cas/CAS/readme_moodle.txt new file mode 100644 index 00000000000..40408648c06 --- /dev/null +++ b/auth/cas/CAS/readme_moodle.txt @@ -0,0 +1,24 @@ +Description of phpCAS 1.4.0 import into Moodle + +Last release package can be found in hhttps://github.com/apereo/phpCAS/releases + +NOTICE: + * Before running composer command, make sure you have the composer version updated. + * Composer version 2.2.4 2022-01-08 12:30:42 + +STEPS: + * Create a temporary folder outside your moodle installation + * Execute `composer require apereo/phpcas:VERSION` + * Check any new libraries that have been added and make sure they do not exist in Moodle already. + * Remove the old 'vendor' directory in auth/cas/CAS/ + * Copy contents of 'vendor' directory + * Create a commit with only the library changes + * Update auth/cas/thirdpartylibs.xml + * Apply the modifications described in the CHANGES section + * Create another commit with the previous two steps of changes + +CHANGES: + * Remove all the hidden folders and files in vendor/apereo/phpcas/ (find . -name ".*"): + - .codecov.yml + - .gitattributes + - .github diff --git a/auth/cas/auth.php b/auth/cas/auth.php index c29c9205e81..33b303a0349 100644 --- a/auth/cas/auth.php +++ b/auth/cas/auth.php @@ -29,7 +29,8 @@ defined('MOODLE_INTERNAL') || die(); require_once($CFG->dirroot.'/auth/ldap/auth.php'); -require_once($CFG->dirroot.'/auth/cas/CAS/CAS.php'); +require_once($CFG->dirroot.'/auth/cas/CAS/vendor/autoload.php'); +require_once($CFG->dirroot.'/auth/cas/CAS/vendor/apereo/phpcas/source/CAS.php'); /** * CAS authentication plugin. diff --git a/auth/cas/thirdpartylibs.xml b/auth/cas/thirdpartylibs.xml index 2316d3914ac..8a0579cd424 100644 --- a/auth/cas/thirdpartylibs.xml +++ b/auth/cas/thirdpartylibs.xml @@ -4,7 +4,7 @@ CAS CAS Apache - 1.3.8 + 1.4.0 2.0