Problem/Motivation
The phpstan CI job fails on the 10.1.x and 9.2.x branches: the updated phpstan-drupal analyzers raise drupal.hookEntityOperationMissingCacheabilityParameter on the pre-existing entityOperation() hook in src/Hook/VarbaseApiHooks.php.
Steps to reproduce
Run the phpstan job on the branch pipeline.
Proposed resolution
- Add the cacheability parameter to the entity-operation hook and record the user-permissions cache context and the module settings config as cacheable dependencies.
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
- ➖ Developer Documentation
- ➖ User Guide Documentation
- ➖ Reviewed by human
- ➖ 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
- The View JSON entity operation now records its cacheability.
AI-Generated: Yes
Issue fork varbase_api-3615801
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 #6
rajab natshahComment #7
rajab natshahComment #8
rajab natshah✅ Released varbase_api-9.2.2
Comment #9
rajab natshahComment #11
rajab natshah✅ Released varbase_api-10.1.2
Comment #12
rajab natshahComment #13
rajab natshah