Skip to content
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

Refactor: Convert linkUrlFilter to a Twig extension class #1655

Merged
merged 2 commits into from
Aug 21, 2024

Conversation

osma
Copy link
Member

@osma osma commented Aug 20, 2024

Reasons for creating this PR

This makes the controller code a bit cleaner. It is also necessary to make it possible to extract messages from Twig templates in PR #1648 .

See #1653

Link to relevant issue(s), if any

Description of the changes in this PR

  • move linkUrlFilter from Controller to its own Twig extension class

Known problems or uncertainties in this PR

n/a

Checklist

  • phpUnit tests pass locally with my changes
  • I have added tests that show that the new code works, or tests are not relevant for this PR (e.g. only HTML/CSS changes)
  • The PR doesn't reduce accessibility of the front-end code (e.g. tab focus, scaling to different resolutions, use of .sr-only class, color contrast)
  • The PR doesn't introduce unintended code changes (e.g. empty lines or useless reindentation)

@osma osma added this to the 3.0 milestone Aug 20, 2024
@osma osma self-assigned this Aug 20, 2024
@osma osma requested a review from miguelvaara August 20, 2024 13:06
Copy link

sonarcloud bot commented Aug 20, 2024

Copy link
Contributor

@miguelvaara miguelvaara left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The tests pass, the code changes look meaningful and the final result works as desired. Ready to merge!

@miguelvaara miguelvaara merged commit e6d7dbc into main Aug 21, 2024
10 checks passed
@osma osma deleted the issue1653-twig-templates-into-their-own-classes branch October 10, 2024 13:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done (verified in test.dev.finto.fi, set Milestone 3.0 for both issue & PR)
Development

Successfully merging this pull request may close these issues.

Twig link_url filter into its own class
2 participants