diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index b84b6079c6e87f2f50b0565a6f0c5df9551bd14e..17206e9de59e0bdbb85ecca6cd1a952c82d85d22 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -30,16 +30,16 @@ variables: # _CURL_TEMPLATES_REF: 'main' # Set to 0 to opt out testing against the current Drupal core version. - OPT_IN_TEST_CURRENT: 0 + OPT_IN_TEST_CURRENT: 1 # Set to '1' to opt in testing against various additional Drupal core versions relative to the current stable version of Drupal. OPT_IN_TEST_PREVIOUS_MINOR: 0 - OPT_IN_TEST_NEXT_MINOR: 0 + OPT_IN_TEST_NEXT_MINOR: 1 OPT_IN_TEST_PREVIOUS_MAJOR: 1 OPT_IN_TEST_NEXT_MAJOR: 0 # Set to 1 to opt in testing against the maximum/latest supported version of PHP for the current stable version of Drupal. - OPT_IN_TEST_MAX_PHP: 0 + OPT_IN_TEST_MAX_PHP: 1 # Check compatibility with next major Drupal release. RUN_JOB_UPGRADE_STATUS: 0 diff --git a/src/Plugin/views/cache/AdvancedViewsCache.php b/src/Plugin/views/cache/AdvancedViewsCache.php index ebefbc6a9b555f1b158ed2b30208e585ab91f062..4e18c7f4071c4bd5885dc2a789fe5ee884d5faf2 100644 --- a/src/Plugin/views/cache/AdvancedViewsCache.php +++ b/src/Plugin/views/cache/AdvancedViewsCache.php @@ -9,8 +9,10 @@ use Drupal\Core\Cache\CacheableMetadata; use Drupal\Core\Datetime\DateFormatterInterface; use Drupal\Core\Form\FormStateInterface; use Drupal\Core\Link; +use Drupal\Core\StringTranslation\TranslatableMarkup; use Drupal\Core\Url; use Drupal\Core\Utility\Token; +use Drupal\views\Attribute\ViewsCache; use Drupal\views\Plugin\views\cache\CachePluginBase; use Drupal\views\ResultRow; use Drupal\views\Views; @@ -24,13 +26,12 @@ use Symfony\Component\DependencyInjection\ContainerInterface; * lifetime (which is used to calculate max-age). * * @ingroup views_cache_plugins - * - * @ViewsCache( - * id = "advanced_views_cache", - * title = @Translation("Advanced Caching"), - * help = @Translation("Caching based on tags, context, and max-age. Caches will persist until any related cache tags are invalidated or the max-age is reached.") - * ) */ +#[ViewsCache( + id: 'advanced_views_cache', + title: new TranslatableMarkup('Advanced Caching'), + help: new TranslatableMarkup('Caching based on tags, context, and max-age. Caches will persist until any related cache tags are invalidated or the max-age is reached.'), +)] class AdvancedViewsCache extends CachePluginBase { /** diff --git a/tests/modules/views_advanced_cache_test/config/install/views.view.views_advanced_cache_test.yml b/tests/modules/views_advanced_cache_test/config/install/views.view.views_advanced_cache_test.yml index b1adea3ce4806df0553b166620849f662e7f0b72..050b70aede0a0d1bc7c46bacb296d5f4975c27ba 100644 --- a/tests/modules/views_advanced_cache_test/config/install/views.view.views_advanced_cache_test.yml +++ b/tests/modules/views_advanced_cache_test/config/install/views.view.views_advanced_cache_test.yml @@ -235,7 +235,6 @@ display: default_argument_type: fixed default_argument_options: argument: '' - default_argument_skip_url: false summary_options: base_path: '' count: true diff --git a/views_advanced_cache.info.yml b/views_advanced_cache.info.yml index b46bf273f2701cbb6fbfeac47a6b3a89fbd58042..04da345dcc68fdb58136c8424badf10c935e2393 100644 --- a/views_advanced_cache.info.yml +++ b/views_advanced_cache.info.yml @@ -1,6 +1,6 @@ name: Views Advanced Cache type: module description: Contains an advanced views cache plugin that exposes cache tag, cache context, and output / results caching configuration. -core_version_requirement: ^8.7.7 || ^9 || ^10 +core_version_requirement: ^10.3 || ^11 dependencies: - drupal:views