litespeedtech / lscache-drupal

LSCache Plugin for Drupal
GNU General Public License v3.0
14 stars 15 forks source link

Patch for Drupal 9 #16

Closed saschaeggi closed 4 years ago

saschaeggi commented 4 years ago

Patched the deprecated functions to make it work with Drupal 9

leymannx commented 4 years ago

Shouldn't the core key be left there to also make it work with older Drupal versions? Thought it might only be removed when you have the core_version_requirement to ^8.8 || ^9. https://www.drupal.org/node/3070687

saschaeggi commented 4 years ago

That's right, that was my fault. It's updated now. Thanks!

newtimber commented 4 years ago

This gives an error message when clearing the cache:-

Error: Non-static method Drupal\Core\Messenger\MessengerInterface::addMessage() cannot be called statically in Drupal\lite_speed_cache\Form\LSCacheForm->submitThisCache()

leymannx commented 4 years ago

Ah yeah, right! It must be \Drupal::messenger()->addMessage($message); at this point.

Woet commented 4 years ago

Thank you for this! I'll push a commit with the MessengerInterface fix shortly.