Problem/Motivation
NB: This module doesn't mess with cache keys. In effect, this deprecation was triggered by trying to build the cache structure exactly how core did it in order to confirm the result, which is now removed.
HOWEVER, row caching is no longer a thing at all, and the module needs to be adjusted to deal with that. We still use all the same information and end up with the same functionality in the end, but only the whole view can be invalidated now instead of an individual row. Core change here #3564937: Remove duplicative caching of views rows
Caching has changed in Drupal Core 11.4.x-dev. The CachePluginBase::getRowCacheKeys() is being deprecated without replacement.
https://www.drupal.org/node/3564958 Views CachePluginBase::getRowCacheKeys() deprecated, row-level caching removed
Alternative needed in time for Drupal 13. An alternate is not needed, tests just need to be updated to not use it.
------ -----------------------------------------------------------
Line tests/src/Kernel/ViewsRowCacheTest.php
------ -----------------------------------------------------------
177 Call to deprecated method getRowCacheKeys() of class
Drupal\views\Plugin\views\cache\CachePluginBase:
in drupal:11.4.0 and is removed from drupal:13.0.0. There
is no replacement.
🪪 method.deprecated
Steps to reproduce
Run tests on next minor eg.
https://git.drupalcode.org/project/views_advanced_cache/-/pipelines/783600
phpstan (next minor): fail
Proposed resolution
- Investigate what needs to be changed or refactored to maintain functionality of the module.
- Update tests to no longer use cache keys; they were just used in testing anyway
- Remove deprecated code
- Add tests to ensure bubbling of tags added/excluded by this module
Remaining tasks
- ✅ File an issue
- ➖ Addition/Change/Update/Fix
- ➖ Testing to ensure no regression
- ➖ Automated unit testing coverage
- ➖ Automated functional testing coverage
- ➖ UX/UI designer responsibilities
- ➖ Readability
- ➖ Accessibility
- ➖ Performance
- ➖ Security
- ➖ Documentation
- ➖ Code review by maintainers
- ➖ Full testing and approval
- ➖ Credit contributors
- ➖ Review with the product owner
- ➖ Release notes snippet
- ❌ Release
User interface changes
- N/A
API changes
- N/A
Data model changes
- N/A
Release notes snippet
- N/A
Issue fork views_advanced_cache-3582551
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
elc commentedhttps://www.drupal.org/node/3564958 Views CachePluginBase::getRowCacheKeys() deprecated, row-level caching removed.
Row level caching is no longer a thing.
Comment #3
elc commentedUpdate summary.
This update will also coincidentally add Drupal 12 support as minimum supported core will be bumped to D11.4.
Comment #5
elc commentedTests are broken due to Twig dependency #3625969: Twig's 3.30 TypeError: Twig\Runtime\EscaperRuntime::escape(): Argument #4 ($autoescape) must be of type bool, null given