-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
fix: Deprecate OC_Template, add proper template manager instead #51029
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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 <[email protected]>
Signed-off-by: Côme Chilliet <[email protected]>
Signed-off-by: Côme Chilliet <[email protected]>
Signed-off-by: Côme Chilliet <[email protected]>
Signed-off-by: Côme Chilliet <[email protected]>
Signed-off-by: Côme Chilliet <[email protected]>
Signed-off-by: Côme Chilliet <[email protected]>
Signed-off-by: Côme Chilliet <[email protected]>
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 <[email protected]>
Signed-off-by: Côme Chilliet <[email protected]>
bc37c9b to
b086f10
Compare
ChristophWurst
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very nice!
| * | ||
| * @param IUser $user | ||
| * @return Template | ||
| * @since 32.0.0 Broader return type ITemplate instead of \OCP\Template. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's a nice way forward without breakage 👏
| interface ITemplate { | ||
| /** | ||
| * Process the template | ||
| * @since 32.0.0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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