Skip to content
Snippets Groups Projects

Deprecate calling addCacheableDependency() with a non CacheableDependencyInterface object

Open Alex Tkachev requested to merge issue/drupal-3232018:11.x into 11.x
3 unresolved threads

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
20 20 }
21 21 else {
22 22 // Not a cacheable dependency, this can not be cached.
23 @trigger_error(sprintf("Calling %s() with an object that doesn't implement %s is deprecated in drupal:11.0.0 and is required in drupal:12.0.0. See https://www.drupal.org/node/3232020", __METHOD__, CacheableDependencyInterface::class), E_USER_DEPRECATED);
  • Alex Tkachev added 2 commits

    added 2 commits

    Compare with previous version

  • Alex Tkachev added 1 commit

    added 1 commit

    Compare with previous version

  • 7 use Drupal\Core\Cache\RefinableCacheableDependencyTrait;
    8 use Drupal\Tests\UnitTestCase;
    9
    10 /**
    11 * Tests the cache RefinableCacheableDependencyTrait.
    12 *
    13 * @group Cache
    14 */
    15 class RefinableCacheableDependencyTraitTest extends UnitTestCase {
    16
    17 use RefinableCacheableDependencyTrait;
    18
    19 /**
    20 * @group legacy
    21 */
    22 public function testNonCacheableDependencyAddDeprecation() {
  • Alex Tkachev added 1 commit

    added 1 commit

    Compare with previous version

  • Alex Tkachev added 358 commits

    added 358 commits

    • 4d6efb44...01da0fd9 - 348 commits from branch project:11.x
    • 0549fa7d - Deprecate calling addCacheableDependency() with a non CacheableDependencyInterface object
    • f44b7f36 - Make LocalActionInterface extend CacheableDependencyInterface
    • 4448d5dd - Consider non cacheable dependencies in HttpExceptionNormalizer
    • 34230b25 - :warning:️ Suppress the error in field_ui
    • a7cf254d - :warning:️ Add a doubtful condition to layout_builder
    • 85546c14 - Remove an outdated test case
    • ab2dc995 - Adjust logic of AccessResult::inheritCacheability
    • f361241b - Deprecate in Drupal 10.3
    • 3c908f61 - Add a deprecation test
    • a3273f20 - Link follow-up issues

    Compare with previous version

  • added 1 commit

    • d2be2016 - Apply 1 suggestion(s) to 1 file(s)

    Compare with previous version

  • catch @catch started a thread on the diff
  • 2 2
    3 3 namespace Drupal\Core\Menu;
    4 4
    5 use Drupal\Core\Cache\CacheableDependencyInterface;
    5 6 use Drupal\Core\Routing\RouteMatchInterface;
    6 7
    7 8 /**
    8 9 * Defines an interface for menu local actions.
    9 10 */
    10 interface LocalActionInterface {
    11 interface LocalActionInterface extends CacheableDependencyInterface {
    11 12
    Please register or sign in to reply
    Loading