10.3.0 core state services changed

Created on 21 June 2024, 7 months ago
Updated 17 July 2024, 6 months ago

Problem/Motivation

I've got an error after d10.3.0 update.
Fatal error: Uncaught TypeError: Drupal\eca\EcaState::__construct(): Argument #4 ($time) must be of type Drupal\Component\Datetime\TimeInterface, Drupal\Core\Cache\DatabaseBackend given,

services.yml changed in d10.3.0

from (10.2.7)

  state:
    class: Drupal\Core\State\State
    arguments: ['@keyvalue']

to (10.3.0)

state:
    class: Drupal\Core\State\State
    arguments: ['@keyvalue', '@cache.bootstrap', '@lock']
    tags:
      - { name: needs_destruction }

Proposed resolution

We need to change the eca.services.yml

  eca.state:
    class: Drupal\eca\EcaState
    parent: state
-    arguments: ['@cache.bootstrap', '@lock', '@datetime.time']
+    arguments: ['@datetime.time']
🐛 Bug report
Status

Fixed

Version

1.1

Component

Code

Created by

🇭🇺Hungary kecsot Hungary

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

  • Issue created by @kecsot
  • 🇭🇺Hungary kecsot Hungary
  • 🇭🇺Hungary kecsot Hungary
  • 🇭🇺Hungary kecsot Hungary

    I see it's fixed in v2.0.0.
    I've updated.

    The problem is v1.1.6 was compatible with 10.3 drupal.
    Than my patch is not a solution.
    We need to deny d10.3.0 from v1.x with composer.

  • 🇩🇪Germany jurgenhaas Gottmadingen

    We need a solution that works for both, 10.2 and 10.3 - I thought we had addressed that, but maybe forgot for the 1.1 branch. I'll have a look.

  • 🇩🇪Germany jurgenhaas Gottmadingen

    For reference, this is the issue where we were supposed to have fixed that for 1.1 already: 📌 Add support for cache collector for state in core Active

    Not sure why that didn't really work out as intended.

  • Status changed to Needs review 7 months ago
  • 🇩🇪Germany jurgenhaas Gottmadingen

    Please have a look into the MR!432 whether that fixes the issue for you. Ideally, if you could test this for both Drupal core 10.2 and 10.3?

    This is trying to declare ECA's state service independently instead ob using the core state service as a parent.

  • 🇩🇪Germany jurgenhaas Gottmadingen

    Hiding the patch.

  • Pipeline finished with Failed
    7 months ago
    #204539
  • 🇭🇺Hungary kecsot Hungary

    Great idea.

    I've tested and works well with 10.2.7 and 10.3

    Thank you!

  • Pipeline finished with Success
    7 months ago
    Total: 520s
    #204558
  • Pipeline finished with Skipped
    7 months ago
    #204568
    • jurgenhaas committed 962bfaac on 1.1.x
      Issue #3456136 by jurgenhaas, kecsot: 10.3.0 core state services changed
      
  • Status changed to Fixed 7 months ago
  • 🇩🇪Germany jurgenhaas Gottmadingen

    Thanks for quick testing. Tests are passing too.

    Just about pushing 1.1.7

  • Automatically closed - issue fixed for 2 weeks with no activity.

  • 🇵🇹Portugal sazevedo@ua.pt

    Hello,

    I've done the upgrade to 10.3.1 drupal core and ECA 2.0 and the error is persisting.
    I've applied the patch but it doesn't work.

    can you help me?
    Thank you

  • 🇩🇪Germany danielspeicher Steisslingen

    @ sazevedo@ua.pt

    I have version 10.3.1 and ECA 2.0 and the error is gone. For 10.3.1 (and for 1.1.7) you do not need to apply the patc anymore.

  • 🇵🇹Portugal sazevedo@ua.pt

    Thank you Daniel, at the end of the day we manage to do the upgrade without any error.

  • 🇩🇪Germany danielspeicher Steisslingen

    That's great.

  • Pipeline finished with Success
    about 2 months ago
    Total: 794s
    #351404
  • Pipeline finished with Canceled
    about 2 months ago
    Total: 429s
    #352658
  • Pipeline finished with Failed
    about 2 months ago
    Total: 695s
    #352663
  • Pipeline finished with Failed
    about 2 months ago
    Total: 1110s
    #352695
  • Pipeline finished with Failed
    about 2 months ago
    Total: 592s
    #352702
  • Pipeline finished with Failed
    about 2 months ago
    Total: 529s
    #352721
  • Pipeline finished with Success
    about 2 months ago
    Total: 807s
    #352729
  • Pipeline finished with Failed
    about 2 months ago
    Total: 866s
    #353754
  • Pipeline finished with Failed
    about 2 months ago
    Total: 794s
    #353834
  • Pipeline finished with Failed
    about 2 months ago
    Total: 643s
    #353872
  • Pipeline finished with Canceled
    about 2 months ago
    Total: 171s
    #353887
  • Pipeline finished with Failed
    about 2 months ago
    Total: 884s
    #353893
  • Pipeline finished with Success
    about 2 months ago
    Total: 840s
    #357016
  • Pipeline finished with Failed
    about 2 months ago
    Total: 618s
    #357692
  • Pipeline finished with Failed
    about 2 months ago
    Total: 614s
    #357717
  • Pipeline finished with Success
    about 2 months ago
    Total: 690s
    #357930
  • Pipeline finished with Failed
    about 2 months ago
    Total: 630s
    #358152
  • Pipeline finished with Failed
    about 2 months ago
    Total: 718s
    #358179
  • Pipeline finished with Failed
    about 1 month ago
    Total: 608s
    #363652
  • Pipeline finished with Success
    about 1 month ago
    Total: 618s
    #363656
  • Pipeline finished with Failed
    about 1 month ago
    Total: 1066s
    #363668
  • Pipeline finished with Failed
    about 1 month ago
    Total: 39799s
    #363845
  • Pipeline finished with Failed
    about 1 month ago
    Total: 665s
    #365657
  • Pipeline finished with Failed
    about 1 month ago
    Total: 663s
    #365689
Production build 0.71.5 2024