-
Notifications
You must be signed in to change notification settings - Fork 9.4k
Description
This issue is automatically created based on existing pull request: #36754: Replace {YYYY} in the copyright line by the current year
Follow up for #5004
Description (*)
So many people spend time updating the copyright in their Magento installations every year. We want to save this time by introducing a simple solution - add a variable that will be automatically replaced with a current year.
Related Pull Requests
Manual testing scenarios (*)
- Set copyright string to Copyright 2013-{YYYY} in the design config
- Clear caches
- Check the frontend
- It displays (in this year) Copyright 2013-2023
Questions or comments
A note about caching: The currrent year is evaluated when the page is rendered. As pages might be in the full page cache, the year will not immediately update in midnight Jan 01st 0:00. Mitigating this would cause a lot of problems and complicate the solution. For example we might not want to clear the full page cache automatically as this will slow down the page.
When a page is invalidated by other reasons (for example a product update), the copyright year will update as well.
So in the end of the day, the copyright year is current when a page was recently changed which is just what a copyright year is supposed to be. If a page is not updated for a long time, it's believed to be okay to have an older copyright year.
We also added a note to hint users who want a consistent up-to-date copyright year to clear the full cache.
Contribution checklist (*)
- Pull request has a meaningful description of its purpose
- All commits are accompanied by meaningful commit messages
- All new or changed code is covered with unit/integration tests (if applicable)
- README.md files for modified modules are updated and included in the pull request if any README.md predefined sections require an update
- All automated tests passed successfully (all builds are green)
Metadata
Metadata
Assignees
Labels
Type
Projects
Status