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

Simplify Template API #13717

Merged
merged 1 commit into from Oct 3, 2017

Conversation

Projects
None yet
2 participants
@nijel
Member

nijel commented Oct 2, 2017

Remove some features we do not seem to use:

  • helper functions (this never worked with Twig)
  • per class context, it now has to be passed to render
  • this avoids need of array_merge call on every render

Signed-off-by: Michal Čihař michal@cihar.com

Before submitting pull request, please check that every commit:

  • Has proper Signed-Off-By
  • Has commit message which describes it
  • Is needed on it's own, if you have just minor fixes to previous commits, you can squash them
  • Any new functionality is covered by tests
Simplify Template API
Remove some features we do not seem to use:

- helper functions (this never worked with Twig)
- per class context, it now has to be passed to render
- this avoids need of array_merge call on every render

Signed-off-by: Michal Čihař <michal@cihar.com>
@mauriciofauth

The helper functions are not being used in phtml templates if I'm not mistaken and in Twig we use the extensions, so it's safe to remove this functionality.
And passing the data directly to the render makes more sense.

@codecov

This comment has been minimized.

Show comment
Hide comment
@codecov

codecov bot Oct 2, 2017

Codecov Report

Merging #13717 into master will decrease coverage by 0.02%.
The diff coverage is 100%.

@@            Coverage Diff             @@
##           master   #13717      +/-   ##
==========================================
- Coverage   53.75%   53.73%   -0.03%     
==========================================
  Files         481      481              
  Lines       82190    82150      -40     
==========================================
- Hits        44179    44141      -38     
+ Misses      38011    38009       -2

codecov bot commented Oct 2, 2017

Codecov Report

Merging #13717 into master will decrease coverage by 0.02%.
The diff coverage is 100%.

@@            Coverage Diff             @@
##           master   #13717      +/-   ##
==========================================
- Coverage   53.75%   53.73%   -0.03%     
==========================================
  Files         481      481              
  Lines       82190    82150      -40     
==========================================
- Hits        44179    44141      -38     
+ Misses      38011    38009       -2

@nijel nijel self-assigned this Oct 3, 2017

@nijel nijel merged commit 44bed27 into phpmyadmin:master Oct 3, 2017

6 checks passed

DCO All commits have a DCO sign-off from the author
Scrutinizer Analysis: 1 new issues – Tests: passed
Details
codacy/pr Good work! A positive pull request.
Details
codecov/patch 100% of diff hit (target 53.75%)
Details
codecov/project Absolute coverage decreased by -0.02% but relative coverage increased by +46.24% compared to d7d3b57
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

@nijel nijel deleted the nijel:template-cleanup branch Oct 3, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment