Skip to content

Access from a non-request scope (like Commands) to values stored on request-restricted services (like assets_version) #9185

Closed
@gnutix

Description

@gnutix

Today, I needed to access the "templating.framework.assets_version" value from a Command. Here's the result: https://gist.github.com/gnutix/6775868

I don't think it's a good way to go, and after a quick talk with @lsmith77, it seems like there's a lot of similar case where you may want to access a configuration value that has been stored only on a service restricted to the request scope.

This issue's goal is to list those use cases, and try to come up with a nice solution for them (rather than entering/leaving the request scope manually).

Any input is very welcomed.

Registered use cases

  • templating.framework.assets_version

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions