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

[FAU-441] Inclusion of Timestamps in Existing Degree Program API Responses #16

Merged
merged 6 commits into from
Sep 4, 2024

Conversation

shvlv
Copy link
Collaborator

@shvlv shvlv commented Sep 4, 2024

Please check if the PR fulfills these requirements

  • The commit message follows our guidelines
  • Tests for the changes have been added (for bug fixes/features)
  • Docs have been added/updated (for bug fixes/features)

What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)
Feature.

What is the current behavior? (You can also link to an open issue here)
https://inpsyde.atlassian.net/browse/FAU-441

What is the new behavior (if this is a feature change)?
date and modified fields were added to the fau/v1/degree-program and fau/v1/degree-program/{$id} endpoints.
date is a formatted WordPress core value, and modified is a custom meta value updated on any core or shared degree program properties changes.

The CacheInvalidated event was extended to add information about the reason why the cache was invalidated:

  • enforced is a default value and used when cache invalidation happens with the admin bar or CLI
  • data_changed points that cache invalidation is caused by any of the degree program data changes

View and Timestamp repositories work even if we have no date and modified cached values. In theory, we could provide a migration to set up those values after the plugin upgrade, but I think it's unnecessary, and the current implementation is more robust. Also, timestamps are not used for revision calculation, so nothing breaks.

Does this PR introduce a breaking change? (What changes might users need to make in their application due to this PR?)

Other information:

@shvlv shvlv requested review from tyrann0us, zhyian and amiut September 4, 2024 08:07
Copy link
Collaborator

@amiut amiut left a comment

Choose a reason for hiding this comment

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

LGTM, thanks a lot for taking care of it.

Copy link
Collaborator

@tyrann0us tyrann0us left a comment

Choose a reason for hiding this comment

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

Thank you! Left a minor comment that doesn't stop me from approving.

src/Infrastructure/Repository/TimestampRepository.php Outdated Show resolved Hide resolved
@shvlv shvlv merged commit bb91508 into dev Sep 4, 2024
8 checks passed
@shvlv shvlv deleted the FAU-441 branch September 4, 2024 10:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants