Open rustamwin opened 1 year ago
Q | A |
---|---|
Is bugfix? | ✔️/❌ |
New feature? | ✔️/❌ |
Breaks BC? | ✔️/❌ |
Fixed issues | comma-separated list of tickets # fixed by the PR, if any |
Introduction of New 'Template' Class A new file, 'Template.php', was introduced. This file defines a 'Template' class, a useful tool for rendering a view. It takes in a path, parameters, a view instance, and an optional view context instance then holds them for easy access. Moreover, this class comes with getter methods to fetch this information back.
Changes in 'TemplateRendererInterface' Interface
The render
method signature within the 'TemplateRendererInterface' interface has been updated to accept a newly defined 'Template' object instead of individual parameters. This streamlines the method's usage by requiring only one object argument rather than a series of parameters.
Changes in 'PhpTemplateRenderer' Class
Similarly, changes have been made in the 'PhpTemplateRenderer' class. The render
method signature now accepts a 'Template' object, providing a consolidated and standardized way for the method to draw data. It uses the getter methods from the 'Template' object to acquire its necessary parameters.
Removal of 'render' Method from 'ViewTrait'
The 'render' method from the 'ViewTrait' has been removed. Instead, its function was replaced by the render
method of the renderer, utilizing a 'Template' object for its parameters.
Introduction of 'TemplateTest.php' File A new testing file, 'TemplateTest.php' is added to ensure the functionality of the newly added 'Template' class. The file aims to assess and validate the reliability and effectiveness of this class.
Patch coverage: 100.00
% and no project coverage change.
Comparison is base (
d211ca6
) 99.74% compared to head (84223fd
) 99.75%.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.
Good refactoring but doesn't solve any current issues and is backwards incompatible. Will hold it for now.