diff --git a/.travis.yml b/.travis.yml index 94427c39..1404a76e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,8 +7,9 @@ php: - 7.2 env: - - SOLR_VERSION=7.5.0 SOLR_CORE=d8 SEARCH_API_SOLR_CONF=7.x DRUPAL_BRANCH=8.7.x DRUSH_VERSION=~9.4.0 - - SOLR_VERSION=7.5.0 SOLR_CORE=d8 SEARCH_API_SOLR_CONF=7.x DRUPAL_BRANCH=8.6.x DRUSH_VERSION=~9.4.0 + - SOLR_VERSION=7.6.0 SOLR_CORE=d8 SEARCH_API_SOLR_CONF=7.x DRUPAL_BRANCH=8.7.x DRUSH_VERSION=~9.4.0 + - SOLR_VERSION=7.6.0 SOLR_CORE=d8 SEARCH_API_SOLR_CONF=7.x DRUPAL_BRANCH=8.6.x DRUSH_VERSION=~9.4.0 + - SOLR_VERSION=7.6.0 SOLR_CORE=d8 SEARCH_API_SOLR_CONF=7.x DRUPAL_BRANCH=8.5.x DRUSH_VERSION=~9.4.0 - SOLR_VERSION=6.6.5 SOLR_CORE=d8 SEARCH_API_SOLR_CONF=6.x DRUPAL_BRANCH=8.6.x DRUSH_VERSION=~9.4.0 notifications: @@ -30,6 +31,8 @@ services: - mysql before_install: + # Disable xdebug. + - cp $HOME/.phpenv/versions/$(phpenv global)/etc/conf.d/xdebug.ini /tmp - phpenv config-rm xdebug.ini - composer global require "hirak/prestissimo:^0.3" - mysql -e 'CREATE DATABASE drupal;' @@ -58,8 +61,8 @@ install: # Patch template. ######################################### # to be removed once #2824932 is resolved - #- cd modules/search_api - #- curl https://www.drupal.org/files/issues/2824932.patch | patch -p1 + #- cd modules/contrib/search_api + #- curl https://www.drupal.org/files/issues/2018-12-20/3021717.patch | patch -p1 #- cd $TRAVIS_BUILD_DIR/../drupal ######################################### @@ -74,7 +77,6 @@ before_script: # Install the site. - ./vendor/bin/drush -v site-install minimal --db-url=mysql://root:@localhost/drupal --yes - ./vendor/bin/drush en --yes drush_language - - ./vendor/bin/drush language-add en - ./vendor/bin/drush language-add de # Let dev versions fullfill module version dependencies. - ./vendor/bin/drush en composer_deploy --yes @@ -96,14 +98,16 @@ before_script: - $TRAVIS_BUILD_DIR/solr-${SOLR_VERSION}/bin/solr create -c d8 -d $TRAVIS_BUILD_DIR/solr-${SOLR_VERSION}/server/solr/d8/conf script: + # Re-enable xdebug to support code coverage. + - phpenv config-add /tmp/xdebug.ini # Run the tests within the drupal directory. - cd $TRAVIS_BUILD_DIR/../drupal - - ./vendor/bin/phpunit -c core --group search_api_solr --verbose --debug modules/contrib/search_api_solr/tests/src + - travis_wait 45 ./vendor/bin/phpunit -c core --group search_api_solr --verbose --debug modules/contrib/search_api_solr/tests/src matrix: exclude: - php: 7.0 - env: SOLR_VERSION=7.5.0 SOLR_CORE=d8 SEARCH_API_SOLR_CONF=7.x DRUPAL_BRANCH=8.7.x DRUSH_VERSION=~9.4.0 + env: SOLR_VERSION=7.6.0 SOLR_CORE=d8 SEARCH_API_SOLR_CONF=7.x DRUPAL_BRANCH=8.7.x DRUSH_VERSION=~9.4.0 allow_failures: - php: 7.2 - env: SOLR_VERSION=7.5.0 SOLR_CORE=d8 SEARCH_API_SOLR_CONF=7.x DRUPAL_BRANCH=8.7.x DRUSH_VERSION=~9.4.0 + env: SOLR_VERSION=7.6.0 SOLR_CORE=d8 SEARCH_API_SOLR_CONF=7.x DRUPAL_BRANCH=8.7.x DRUSH_VERSION=~9.4.0 diff --git a/composer.json b/composer.json index 0f2b8ff1..aec011a6 100644 --- a/composer.json +++ b/composer.json @@ -35,7 +35,7 @@ }, "conflict": { "drupal/search_api_solr_multilingual": "*", - "drupal/core": "<8.6" + "drupal/core": "<8.5" }, "suggest": { "drupal/facets": "Provides facetted search.", diff --git a/config/optional/search_api_solr.solr_field_type.text_zh_hans_6_0_0.yml b/config/optional/search_api_solr.solr_field_type.text_zh-hans_6_0_0.yml similarity index 100% rename from config/optional/search_api_solr.solr_field_type.text_zh_hans_6_0_0.yml rename to config/optional/search_api_solr.solr_field_type.text_zh-hans_6_0_0.yml diff --git a/src/Plugin/search_api/backend/SearchApiSolrAnySchemaBackend.php b/src/Plugin/search_api/backend/SearchApiSolrAnySchemaBackend.php index 5ed31e99..c3005c0c 100644 --- a/src/Plugin/search_api/backend/SearchApiSolrAnySchemaBackend.php +++ b/src/Plugin/search_api/backend/SearchApiSolrAnySchemaBackend.php @@ -206,7 +206,7 @@ public function getSolrFieldNames(IndexInterface $index, $reset = FALSE) { } // Let modules adjust the field mappings. - $this->moduleHandler->alter('search_api_solr_field_mapping', $index, $ret); + $this->moduleHandler->alter('search_api_solr_field_mapping', $index, $this->fieldNames[$index->id()]); return $this->fieldNames[$index->id()]; }