Skip to content

Documented injector configuration shorthand doesn't work, but it should #11595

Description

@beerbohmdo

Pages affected

https://docs.silverstripe.org/en/5/developer_guides/extending/injector/#service-inheritance

Description

I am not sure if this is a issue of the documentation or a bug:

The documentation says that you can use App\GZIPJSONProvider: '%$App\JSONServiceDefinition' to define an alias for another class definition. This does not work.

If I read the code of the injector class correctly, using a string is just an shortcut for the class property. So omitting the '%$' prefix works but does not copy the definition.

And the second example does not contain the namespace...

Validations

  • Check that there isn't already an issue that reports the same problem

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions