Remove the persist service tag

Created on 3 November 2014, over 10 years ago
Updated 4 March 2024, about 1 year ago

Problem/Motivation

The persist service tag and its associated functionality has been the source of many nasty issues. The number of persisting services has been reduced by #2190665: Remove persist flag from services that do not need it β†’ , #2277481: Remove persist flag from container.namespaces service β†’ and #2272987: Do not persist session manager β†’ and now only two of them remain (request_stack and router.request_context). Let's remove them now.

Proposed resolution

Remove support for the persist service tag and instead manually set up the request stack after a container rebuild. Also remove support for persisting synthetic services across container rebuilds because this feature is unused since the removal of the request service.

Remaining tasks

Address #68

User interface changes

None.

API changes

Removal of the persist service tag.

Beta phase evaluation

<!--Uncomment the relevant rows for the issue. -->
πŸ“Œ Task
Status

Needs work

Version

11.0 πŸ”₯

Component
BaseΒ  β†’

Last updated about 3 hours ago

Created by

πŸ‡¨πŸ‡­Switzerland znerol

Live updates comments and jobs are added and updated live.
  • Needs change record

    A change record needs to be drafted before an issue is committed. Note: Change records used to be called change notifications.

Sign in to follow issues

Merge Requests

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • πŸ‡ΊπŸ‡ΈUnited States mglaman WI, USA

    I just hit this in ✨ Make it easier for theme builders to enable Twig debugging and disable render cache Fixed . How Drupal\Core\KeyValueStore\KeyValueMemoryFactory is tried to be persisted causes tests to break because the service isn't persisted.

  • πŸ‡§πŸ‡΄Bolivia vacho Cochabamba

    Debasing patch #56

  • last update over 1 year ago
    Custom Commands Failed
  • Open in Jenkins β†’ Open on Drupal.org β†’
    Environment: PHP 8.1 & MySQL 5.7 updated deps
    last update over 1 year ago
    Custom Commands Failed
  • πŸ‡¬πŸ‡§United Kingdom longwave UK

    Given #58 should we split this into two issues? Deprecate the persist service tag in 10.3, and then remove it in 11.0?

  • Merge request !6658Remove persist tag. β†’ (Open) created by longwave
  • Status changed to Needs review over 1 year ago
  • πŸ‡¬πŸ‡§United Kingdom longwave UK

    Rebased against 11.x in a new branch on MR!6658. Locally the functional version of TwigDebugMarkupTest passes, so I removed the conversion to a kernel test here.

  • πŸ‡¬πŸ‡§United Kingdom longwave UK

    Should restoreServiceState() be decoupled from the kernel? Each persistent service could be responsible for transferring its data from the old to the new one, via an intermediate service that collects persist services tags and calls each service to do the work?

  • Status changed to Needs work over 1 year ago
  • πŸ‡ΊπŸ‡ΈUnited States smustgrave

    Hiding patches for clarity

    Added #68 to remaining tasks

    Moving to NW for change record unless you are waiting for an answer to 68 first, if that's the case can put back in review. But I didn't get that vibe that was the case.

  • πŸ‡«πŸ‡·France andypost

    andypost β†’ changed the visibility of the branch 2368263-remove-the-persist to hidden.

  • πŸ‡«πŸ‡·France andypost

    Polished a bit new code

    Re#68

    Looking at UpdateKernel and InstallerKernel I see both overriding initializeContainer but calling parent, so I think it's ok to keep it in DrupalKernel

  • Pipeline finished with Failed
    over 1 year ago
    Total: 718s
    #102589
  • Pipeline finished with Failed
    about 1 year ago
    Total: 185s
    #110818
  • Pipeline finished with Failed
    about 1 year ago
    Total: 186s
    #110856
  • Pipeline finished with Failed
    about 1 year ago
    #110860
  • Pipeline finished with Failed
    about 1 year ago
    Total: 182s
    #129003
  • Pipeline finished with Failed
    about 1 year ago
    Total: 232s
    #129908
  • Pipeline finished with Failed
    about 1 year ago
    Total: 187s
    #130052
  • Pipeline finished with Failed
    about 1 year ago
    Total: 249s
    #130070
  • Pipeline finished with Failed
    about 1 year ago
    #130078
  • Pipeline finished with Failed
    about 1 year ago
    Total: 362s
    #130089
  • Pipeline finished with Running
    about 1 year ago
    #130094
  • Pipeline finished with Failed
    about 1 year ago
    Total: 195s
    #130096
  • Pipeline finished with Failed
    about 1 year ago
    Total: 177s
    #142323
  • Pipeline finished with Failed
    8 months ago
    Total: 100s
    #299266
Production build 0.71.5 2024