diff --git a/README.md b/README.md index 0945aa9..0f46457 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,7 @@ > **RL Sorting** is a Drupal module by [DXPR](https://dxpr.com) that applies -> Thompson Sampling reinforcement learning to Views sort orders, automatically -> surfacing high-performing content variants without manual A/B test configuration. +> Thompson Sampling reinforcement learning to Views sort orders, +> automatically surfacing high-performing content variants without manual A/B +> test configuration. > > [Getting Started](https://dxpr.com/c/marketing-cms) | > [Pricing](https://dxpr.com/pricing) | diff --git a/rl_sorting.install b/rl_sorting.install index fefa1ab..3144e0c 100644 --- a/rl_sorting.install +++ b/rl_sorting.install @@ -73,7 +73,7 @@ function rl_sorting_install() { continue; } $modified = FALSE; - foreach ($displays as $display_id => &$display) { + foreach ($displays as &$display) { if (!isset($display['display_options']['sorts']['ai_sorting'])) { continue; } diff --git a/scripts/prepare-drupal-lint.sh b/scripts/prepare-drupal-lint.sh index 7f2592a..654e12a 100755 --- a/scripts/prepare-drupal-lint.sh +++ b/scripts/prepare-drupal-lint.sh @@ -1,5 +1,4 @@ #!/bin/bash -set -e if [ -z "$TARGET_DRUPAL_CORE_VERSION" ]; then # default to target Drupal 11, you can override this by setting the secrets value on your github repo @@ -17,17 +16,17 @@ echo "TARGET_DRUPAL_CORE_VERSION: $TARGET_DRUPAL_CORE_VERSION" # Add this line to avoid the plugin prompt composer config --global allow-plugins.dealerdirect/phpcodesniffer-composer-installer true -composer global require drupal/coder --dev -composer global require phpcompatibility/php-compatibility --dev +# Solve phpcs 3 with coder 8.3 and PHPCompatibility 9 together; coder 9 needs phpcs 4. +composer global require drupal/coder:^8.3 phpcompatibility/php-compatibility:^9.3 squizlabs/php_codesniffer:^3.13 --dev || exit 1 export PATH="$PATH:$COMPOSER_HOME/vendor/bin" -composer global require dealerdirect/phpcodesniffer-composer-installer --dev +composer global require dealerdirect/phpcodesniffer-composer-installer --dev || exit 1 composer global show -P phpcs -i phpcs --config-set colors 1 -phpcs --config-set drupal_core_version 11$TARGET_DRUPAL_CORE_VERSION +phpcs --config-set drupal_core_version "$TARGET_DRUPAL_CORE_VERSION" phpcs --config-show \ No newline at end of file