diff --git a/ludwig.json b/ludwig.json new file mode 100644 index 0000000..2439b23 --- /dev/null +++ b/ludwig.json @@ -0,0 +1,20 @@ +{ + "require": { + "voku/portable-ascii": { + "version": "v1.5.6", + "url": "https://github.com/voku/portable-ascii/archive/1.5.6.zip" + }, + "voku/portable-utf8": { + "version": "v5.4.51", + "url": "https://github.com/voku/portable-utf8/archive/5.4.51.zip" + }, + "symfony/polyfill-intl-grapheme": { + "version": "v1.22.1", + "url": "https://github.com/symfony/polyfill-intl-grapheme/archive/v1.22.1.zip" + }, + "wamania/php-stemmer": { + "version": "v2.2.0", + "url": "https://github.com/wamania/php-stemmer/archive/v2.2.0.zip" + } + } +} diff --git a/snowball_stemmer.module b/snowball_stemmer.module index 5cecad7..ce2ef14 100644 --- a/snowball_stemmer.module +++ b/snowball_stemmer.module @@ -7,6 +7,14 @@ use Drupal\Core\Routing\RouteMatchInterface; +// Ludwig integration for 'files' and 'classmap' autoload resources. +if (\Drupal::hasService('ludwig.require_once')) { + $ludwig_require_once = \Drupal::service('ludwig.require_once'); + $ludwig_require_once->requireOnce('voku/portable-utf8', 'bootstrap.php', dirname(__FILE__)); + $ludwig_require_once->requireOnce('symfony/polyfill-intl-grapheme', 'bootstrap.php', dirname(__FILE__)); +} + + /** * Implements hook_help(). */