Install

Works with Drupal: ^10.3 || ^11

Using Composer to manage Drupal site dependencies

Alternative installation files

Download tar.gz 89.48 KB
MD5: 3da23170b692fcd20d0a47d2f63b536d
SHA-1: 638543e602d7ad44ccc44779bf1fa275dff49d67
SHA-256: 9c04552dc8ba3c500ab3bf4c59a10277df7b0164c77c93dc1ad35b7ec944f676
Download zip 149.29 KB
MD5: 3dc9754d4bcb1a0a2d1b6db9c8f59498
SHA-1: 0e579c252b2cdc9bd3a42473a5c494abd9071644
SHA-256: 17011c7feca5e92230202c9e538806f8692ea7c95ea1af730c356df64dba24b8

Release notes

Notable changes

Updating to CAS 3.0

  1. While still on Drupal 10, update your site to CAS 2.3.2. This is very important because starting with CAS 3.0.0, old (post)update functions are removed.
  2. Require drupal/cas:^3.0 with Composer
  3. If you have custom code that interacts with the CAS module, you may need to make some updates. There are some tiny backwards compatibility breaking changes that require your attention:
    • The type of value returned by CasLoginException::getCode() was changed from integer to enum of type CasLoginExceptionType. If your code calls this method, you should adapt. If you still need the integer value, you can do something like
      $codes = CasLoginExceptionType::cases();
      $code = array_search($exception->getCode(), $codes, TRUE);
      
    • The parameter of CasUserManager::getCasUsernameForAccount() is now strict typed as integer. Make sure you cast the parameter to an integer before is passed to the method:
      $account = ...;
      $uid = (int) $account->id();
      $name = \Drupal::service('cas.user_manager')->getCasUsernameForAccount($uid);
      
    • The CasServerConfig::setProtocolVersion() setter accepts now a CasProtocolVersion enum case as parameter instead of a string. Same, the CasServerConfig::getProtocolVersion() getter returns now a CasProtocolVersion enum case instead of a string. If needed, get the server version as a legacy string: CasServerConfig::getProtocolVersion()->value.
    • The CasServerConfig::setHttpScheme() setter accepts now a HttpScheme enum case as parameter instead of a string. Same, the CasServerConfig::getHttpScheme() getter returns now a HttpScheme enum case instead of a string. If needed, get the HTTP scheme as a legacy string: CasServerConfig:: getHttpScheme()->value.
    • The CasServerConfig::setVerify() setter accepts now a SslCertificateVerification enum case as parameter instead of an integer. Same, the CasServerConfig::getVerify() getter returns now a SslCertificateVerification enum case instead of an integer. If needed, get the certificate verification scheme as a legacy integer: CasServerConfig:: getVerify()->value.
  4. You can now update your site to Drupal 11.
  5. After updating to CAS 3.0, prepare for the next CAS version by replacing the deprecated code. Check #3462792: Some constants were deprecated and replaced with enums to learn what is deprecated in CAS 3.0 and adapt your code.

Issues in this release (compared from version 2.3.2):

Created by: bkosborne
Created on: 23 Oct 2024 at 12:55 UTC
Last updated: 23 Oct 2024 at 12:56 UTC

Other releases