Bootstrap: add initial state registration#21821
Conversation
4ea97c1 to
6d79509
Compare
lib/public/IInitialStateService.php
Outdated
There was a problem hiding this comment.
Do we want to deprecate the whole interface and only use InitialStateProvider?
There was a problem hiding this comment.
Providing state inline is still useful when it is not about global state but for example providing data in a controller method, so I'd prefer to keep the simple lazy approach.
There was a problem hiding this comment.
But for that we'd have OCP\AppFramework\Services\InitialStateProvider right?
Or do you have a different use case?
There was a problem hiding this comment.
Well if i need to provide some state in just one controller method (e.g. for my apps page route, i don't see why I should register a provider globally in the app bootstrap. Instead just registering it with provideLazyInitialState in the controller itself seems far more organized imo. Or am I missing something here?
There was a problem hiding this comment.
Ah sorry wrong interface OCP\AppFramework\Services\IInitialState
You can have that injected. AppID already set etc ;)
There was a problem hiding this comment.
Okay, that means then that we can deprecate the whole interface?
6d79509 to
65b1c4d
Compare
|
Rebased to resolve conflicts. |
65b1c4d to
6f23181
Compare
|
Found some time to tackle this again... lets see |
|
🤖 beep boop beep 🤖 Here are the logs for the failed build: Status of 33613: failurecheckersShow full lognodbShow full logmariadb10.4-php7.4
acceptance-login
Show full log |
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
28dc290 to
b5fd75f
Compare
Covers basically
I'm not 100% happy with the location of the base class. But I could not come up with a better name just now.