Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Re-enable xdebug to support code coverage #22

Open
wants to merge 8 commits into
base: 4.x
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 12 additions & 8 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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;'
Expand Down Expand Up @@ -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
#########################################

Expand All @@ -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
Expand All @@ -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
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
},
"conflict": {
"drupal/search_api_solr_multilingual": "*",
"drupal/core": "<8.6"
"drupal/core": "<8.5"
},
"suggest": {
"drupal/facets": "Provides facetted search.",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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()];
}
Expand Down