fix: Deprecate OC_Template, add proper template manager instead#51029
fix: Deprecate OC_Template, add proper template manager instead#51029
Conversation
0573048 to
ddc5106
Compare
8d9a88c to
960b2b5
Compare
|
CI failure unrelated |
|
Eh I started commenting on the first commit, but then saw you cleaned up stuff in the other commits. Would it be better to just review the entire diff at once instead of commit-by-commit? |
Hum, maybe use the range commit feature to still review the change to API first, and the call changes and templatelayout changes on their own after? |
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
It is not needed anymore since OCP\Util::addScript is used directly now, and not the function "script" from template functions. Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
bc37c9b to
b086f10
Compare
| * | ||
| * @param IUser $user | ||
| * @return Template | ||
| * @since 32.0.0 Broader return type ITemplate instead of \OCP\Template. |
There was a problem hiding this comment.
That's a nice way forward without breakage 👏
| interface ITemplate { | ||
| /** | ||
| * Process the template | ||
| * @since 32.0.0 |
There was a problem hiding this comment.
nit: return value could be documented. I'm assuming it's the template HTML
susnux
left a comment
There was a problem hiding this comment.
that is so much cleaner 🚀
Summary
Adds a proper manager with an interface for templates.
Deprecate legacy
OC_Templateas well as\OCP\Templateclass which was used as a public constructor.TODO
Checklist