Hi, sorry about the delay. To answer your question directly: Piwik\Container\StaticContainer is less deprecated than the Registry
To expand, yes we want to use dependency injection everywhere because it’s a much better pattern. However using dependency injection means changing a lot of things in Piwik, so in order to move towards that goal we consider acceptable to use the StaticContainer.
StaticContainer is marked as deprecated because it might be removed in 3.0 or later, and that deprecation means “it’s better to use dependency injection if you can”. However if you can’t use dependency injection right now, then use the StaticContainer.
Given all that, can you use dependency injection? That depends. Where are you calling the StaticContainer? Is it in a controller, in an API class?
Also what methods are you calling? Only “get()”? Or also “set()”?
If your plugin code is open source please give me a link I might be able to help more. Or else paste a bit of code here.