diff --git a/bamboo_twig_config/src/TwigExtension/Config.php b/bamboo_twig_config/src/TwigExtension/Config.php
index 306bf83..08a9f1b 100644
--- a/bamboo_twig_config/src/TwigExtension/Config.php
+++ b/bamboo_twig_config/src/TwigExtension/Config.php
@@ -14,9 +14,9 @@ class Config extends TwigExtensionBase {
    */
   public function getFunctions() {
     return [
-      new \Twig_SimpleFunction('bamboo_settings_get', [$this, 'getSettings']),
-      new \Twig_SimpleFunction('bamboo_config_get', [$this, 'getConfig']),
-      new \Twig_SimpleFunction('bamboo_state_get', [$this, 'getState']),
+      new \Twig\TwigFunction('bamboo_settings_get', [$this, 'getSettings']),
+      new \Twig\TwigFunction('bamboo_config_get', [$this, 'getConfig']),
+      new \Twig\TwigFunction('bamboo_state_get', [$this, 'getState']),
     ];
   }
 
diff --git a/bamboo_twig_extensions/src/TwigExtension/TwigArray.php b/bamboo_twig_extensions/src/TwigExtension/TwigArray.php
index d0fb5ff..e19c3c2 100644
--- a/bamboo_twig_extensions/src/TwigExtension/TwigArray.php
+++ b/bamboo_twig_extensions/src/TwigExtension/TwigArray.php
@@ -14,7 +14,7 @@ class TwigArray extends \Twig_Extension {
    */
   public function getFilters() {
     return [
-      new \Twig_SimpleFilter('bamboo_extensions_shuffle', [$this, 'shuffle']),
+      new \Twig\TwigFilter('bamboo_extensions_shuffle', [$this, 'shuffle']),
     ];
   }
 
diff --git a/bamboo_twig_extensions/src/TwigExtension/TwigDate.php b/bamboo_twig_extensions/src/TwigExtension/TwigDate.php
index ef7224a..74dcb6e 100644
--- a/bamboo_twig_extensions/src/TwigExtension/TwigDate.php
+++ b/bamboo_twig_extensions/src/TwigExtension/TwigDate.php
@@ -27,7 +27,7 @@ class TwigDate extends \Twig_Extension {
    */
   public function getFilters() {
     return [
-      new \Twig_SimpleFilter('bamboo_extensions_time_diff', [$this, 'diff'], ['needs_environment' => TRUE]),
+      new \Twig\TwigFilter('bamboo_extensions_time_diff', [$this, 'diff'], ['needs_environment' => TRUE]),
     ];
   }
 
diff --git a/bamboo_twig_extensions/src/TwigExtension/TwigText.php b/bamboo_twig_extensions/src/TwigExtension/TwigText.php
index f6d896b..782f16d 100644
--- a/bamboo_twig_extensions/src/TwigExtension/TwigText.php
+++ b/bamboo_twig_extensions/src/TwigExtension/TwigText.php
@@ -16,7 +16,7 @@ class TwigText extends \Twig_Extension {
    */
   public function getFilters() {
     return [
-      new \Twig_SimpleFilter('bamboo_extensions_truncate', [$this, 'truncate'], ['needs_environment' => TRUE]),
+      new \Twig\TwigFilter('bamboo_extensions_truncate', [$this, 'truncate'], ['needs_environment' => TRUE]),
     ];
   }
 
diff --git a/bamboo_twig_file/src/TwigExtension/File.php b/bamboo_twig_file/src/TwigExtension/File.php
index 2169f47..1159cca 100644
--- a/bamboo_twig_file/src/TwigExtension/File.php
+++ b/bamboo_twig_file/src/TwigExtension/File.php
@@ -14,7 +14,7 @@ class File extends TwigExtensionBase {
    */
   public function getFilters() {
     return [
-      new \Twig_SimpleFilter('bamboo_file_extension_guesser', [$this, 'extensionGuesser']),
+      new \Twig\TwigFilter('bamboo_file_extension_guesser', [$this, 'extensionGuesser']),
     ];
   }
 
@@ -23,7 +23,7 @@ public function getFilters() {
    */
   public function getFunctions() {
     return [
-      new \Twig_SimpleFunction('bamboo_file_url_absolute', [$this, 'urlAbsolute']),
+      new \Twig\TwigFunction('bamboo_file_url_absolute', [$this, 'urlAbsolute']),
     ];
   }
 
@@ -40,8 +40,18 @@ public function getName() {
    * Use the internal helper "format_date" to render the date
    * using the current language for texts.
    */
+
+  /**
+   * Makes a best guess for a file extension, given a mime type.
+   *
+   * @param string $mime_type
+   *   The mime type.
+   *
+   * @return string
+   *   The guessed extension or NULL, if none could be guessed.
+   */
   public function extensionGuesser($mime_type) {
-    return $this->getExtensionGuesser()->guess($mime_type);
+    return $this->getExtensionGuesser()->getExtensions($mime_type);
   }
 
   /**
diff --git a/bamboo_twig_i18n/src/TwigExtension/I18n.php b/bamboo_twig_i18n/src/TwigExtension/I18n.php
index 621f7b5..4f4606e 100644
--- a/bamboo_twig_i18n/src/TwigExtension/I18n.php
+++ b/bamboo_twig_i18n/src/TwigExtension/I18n.php
@@ -16,8 +16,8 @@ class I18n extends TwigExtensionBase {
    */
   public function getFilters() {
     return [
-      new \Twig_SimpleFilter('bamboo_i18n_format_date', [$this, 'formatDate'], ['needs_environment' => TRUE]),
-      new \Twig_SimpleFilter('bamboo_i18n_get_translation', [$this, 'getTranslation']),
+      new \Twig\TwigFilter('bamboo_i18n_format_date', [$this, 'formatDate'], ['needs_environment' => TRUE]),
+      new \Twig\TwigFilter('bamboo_i18n_get_translation', [$this, 'getTranslation']),
     ];
   }
 
@@ -26,7 +26,7 @@ public function getFilters() {
    */
   public function getFunctions() {
     return [
-      new \Twig_SimpleFunction('bamboo_i18n_current_lang', [$this, 'getCurrentLanguage']),
+      new \Twig\TwigFunction('bamboo_i18n_current_lang', [$this, 'getCurrentLanguage']),
     ];
   }
 
diff --git a/bamboo_twig_loader/src/TwigExtension/Loader.php b/bamboo_twig_loader/src/TwigExtension/Loader.php
index ed0d526..ba7c2f0 100644
--- a/bamboo_twig_loader/src/TwigExtension/Loader.php
+++ b/bamboo_twig_loader/src/TwigExtension/Loader.php
@@ -14,10 +14,10 @@ class Loader extends TwigExtensionBase {
    */
   public function getFunctions() {
     return [
-      new \Twig_SimpleFunction('bamboo_load_entity', [$this, 'loadEntity']),
-      new \Twig_SimpleFunction('bamboo_load_field', [$this, 'loadField']),
-      new \Twig_SimpleFunction('bamboo_load_currentuser', [$this, 'loadCurrentUser']),
-      new \Twig_SimpleFunction('bamboo_load_image', [$this, 'loadImage']),
+      new \Twig\TwigFunction('bamboo_load_entity', [$this, 'loadEntity']),
+      new \Twig\TwigFunction('bamboo_load_field', [$this, 'loadField']),
+      new \Twig\TwigFunction('bamboo_load_currentuser', [$this, 'loadCurrentUser']),
+      new \Twig\TwigFunction('bamboo_load_image', [$this, 'loadImage']),
     ];
   }
 
diff --git a/bamboo_twig_loader/src/TwigExtension/Render.php b/bamboo_twig_loader/src/TwigExtension/Render.php
index 66f1d86..229fe56 100644
--- a/bamboo_twig_loader/src/TwigExtension/Render.php
+++ b/bamboo_twig_loader/src/TwigExtension/Render.php
@@ -16,15 +16,15 @@ class Render extends TwigExtensionBase {
    */
   public function getFunctions() {
     return [
-      new \Twig_SimpleFunction('bamboo_render_block', [$this, 'renderBlock'], ['is_safe' => ['html']]),
-      new \Twig_SimpleFunction('bamboo_render_form', [$this, 'renderForm'], ['is_safe' => ['html']]),
-      new \Twig_SimpleFunction('bamboo_render_entity', [$this, 'renderEntity'], ['is_safe' => ['html']]),
-      new \Twig_SimpleFunction('bamboo_render_region', [$this, 'renderRegion'], ['is_safe' => ['html']]),
-      new \Twig_SimpleFunction('bamboo_render_field', [$this, 'renderField'], ['is_safe' => ['html']]),
-      new \Twig_SimpleFunction('bamboo_render_image', [$this, 'renderImage'], ['is_safe' => ['html']]),
-      new \Twig_SimpleFunction('bamboo_render_image_style', [$this, 'renderImageStyle'], ['is_safe' => ['html']]),
-      new \Twig_SimpleFunction('bamboo_render_menu', [$this, 'renderMenu'], ['is_safe' => ['html']]),
-      new \Twig_SimpleFunction('bamboo_render_views', 'views_embed_view'),
+      new \Twig\TwigFunction('bamboo_render_block', [$this, 'renderBlock'], ['is_safe' => ['html']]),
+      new \Twig\TwigFunction('bamboo_render_form', [$this, 'renderForm'], ['is_safe' => ['html']]),
+      new \Twig\TwigFunction('bamboo_render_entity', [$this, 'renderEntity'], ['is_safe' => ['html']]),
+      new \Twig\TwigFunction('bamboo_render_region', [$this, 'renderRegion'], ['is_safe' => ['html']]),
+      new \Twig\TwigFunction('bamboo_render_field', [$this, 'renderField'], ['is_safe' => ['html']]),
+      new \Twig\TwigFunction('bamboo_render_image', [$this, 'renderImage'], ['is_safe' => ['html']]),
+      new \Twig\TwigFunction('bamboo_render_image_style', [$this, 'renderImageStyle'], ['is_safe' => ['html']]),
+      new \Twig\TwigFunction('bamboo_render_menu', [$this, 'renderMenu'], ['is_safe' => ['html']]),
+      new \Twig\TwigFunction('bamboo_render_views', 'views_embed_view'),
     ];
   }
 
diff --git a/bamboo_twig_path/src/TwigExtension/Path.php b/bamboo_twig_path/src/TwigExtension/Path.php
index 557c684..a6dbca3 100644
--- a/bamboo_twig_path/src/TwigExtension/Path.php
+++ b/bamboo_twig_path/src/TwigExtension/Path.php
@@ -12,7 +12,7 @@ class Path extends \Twig_Extension {
    */
   public function getFunctions() {
     return [
-      new \Twig_SimpleFunction('bamboo_path_system', [$this, 'getSystemPath']),
+      new \Twig\TwigFunction('bamboo_path_system', [$this, 'getSystemPath']),
     ];
   }
 
diff --git a/bamboo_twig_security/src/TwigExtension/Security.php b/bamboo_twig_security/src/TwigExtension/Security.php
index 550965c..5183522 100644
--- a/bamboo_twig_security/src/TwigExtension/Security.php
+++ b/bamboo_twig_security/src/TwigExtension/Security.php
@@ -14,10 +14,10 @@ class Security extends TwigExtensionBase {
    */
   public function getFunctions() {
     return [
-      new \Twig_SimpleFunction('bamboo_has_permission', [$this, 'hasPermission']),
-      new \Twig_SimpleFunction('bamboo_has_permissions', [$this, 'hasPermissions']),
-      new \Twig_SimpleFunction('bamboo_has_role', [$this, 'hasRole']),
-      new \Twig_SimpleFunction('bamboo_has_roles', [$this, 'hasRoles']),
+      new \Twig\TwigFunction('bamboo_has_permission', [$this, 'hasPermission']),
+      new \Twig\TwigFunction('bamboo_has_permissions', [$this, 'hasPermissions']),
+      new \Twig\TwigFunction('bamboo_has_role', [$this, 'hasRole']),
+      new \Twig\TwigFunction('bamboo_has_roles', [$this, 'hasRoles']),
     ];
   }
 
diff --git a/bamboo_twig_token/src/TwigExtension/Token.php b/bamboo_twig_token/src/TwigExtension/Token.php
index 366cb2c..3076bec 100644
--- a/bamboo_twig_token/src/TwigExtension/Token.php
+++ b/bamboo_twig_token/src/TwigExtension/Token.php
@@ -14,7 +14,7 @@ class Token extends TwigExtensionBase {
    */
   public function getFunctions() {
     return [
-      new \Twig_SimpleFunction('bamboo_token', [$this, 'substituteToken']),
+      new \Twig\TwigFunction('bamboo_token', [$this, 'substituteToken']),
     ];
   }
 
diff --git a/drupalci.yml b/drupalci.yml
new file mode 100644
index 0000000..d20f473
--- /dev/null
+++ b/drupalci.yml
@@ -0,0 +1,19 @@
+build:
+  assessment:
+    validate_codebase:
+      phplint:
+      container_composer:
+      csslint:
+      eslint:
+      phpcs:
+    testing:
+      run_tests.standard:
+        types: 'Simpletest,PHPUnit-Unit,PHPUnit-Kernel,PHPUnit-Functional'
+        # Test for Drupal 9 compatibility
+        suppress-deprecations: false
+      run_tests.js:
+        concurrency: 1
+        types: 'PHPUnit-FunctionalJavascript'
+        # Test for Drupal 9 compatibility
+        suppress-deprecations: false
+      nightwatchjs:
diff --git a/src/TwigExtension/TwigExtensionBase.php b/src/TwigExtension/TwigExtensionBase.php
index ec49922..e59306e 100644
--- a/src/TwigExtension/TwigExtensionBase.php
+++ b/src/TwigExtension/TwigExtensionBase.php
@@ -3,7 +3,7 @@
 namespace Drupal\bamboo_twig\TwigExtension;
 
 use Symfony\Component\DependencyInjection\ContainerAwareTrait;
-use Symfony\Component\HttpFoundation\File\MimeType\ExtensionGuesser;
+use Symfony\Component\Mime\MimeTypes;
 
 /**
  * Provides a Twig Extension Lazy Service Injection.
@@ -191,11 +191,11 @@ protected function getToken() {
   /**
    * Return a singleton mime type to file extension guesser.
    *
-   * @return \Symfony\Component\HttpFoundation\File\MimeType\ExtensionGuesserInterface
-   *   Return a singleton mime type to file extension guesser.
+   * @return \Symfony\Component\Mime\MimeTypesInterface
+   *   Return a MIME type object for MIME type guessing.
    */
   protected function getExtensionGuesser() {
-    return ExtensionGuesser::getInstance();
+    return new MimeTypes();
   }
 
   /**
