Skip to content
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
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -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) |
Expand Down
2 changes: 1 addition & 1 deletion rl_sorting.install
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
9 changes: 4 additions & 5 deletions scripts/prepare-drupal-lint.sh
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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
Loading