Skip to content

Commit

Permalink
fix: we used $this in a static context
Browse files Browse the repository at this point in the history
  • Loading branch information
Marcuzz committed Feb 8, 2023
1 parent 1817a77 commit 126c73f
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Changelog

## 1.2.1
- Fix an error where we used `$this` in a static context.

## 1.2.0
- The ISR request now uses a POST body instead of URL parameters
- Introduced a `Triggers` service
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "everyday/craft-incremental-static-regeneration",
"version": "1.2.0",
"version": "1.2.1",
"description": "A plugin that watches your entry changes and pings a URL of your choice",
"type": "craft-plugin",
"keywords": ["incremental", "static", "regeneration", "nextjs"],
Expand Down
4 changes: 2 additions & 2 deletions src/helpers/TriggerHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ private static function getRelatedUris(Element $element, Settings $settings): ar
->site('*')
->uri(':notempty:')
->relatedTo($element)
->all(), fn($entry) => !$this->entryEntryTypeDisabled($entry, $settings));
->all(), fn($entry) => !self::entryEntryTypeDisabled($entry, $settings));

return array_map(static fn($entry) => $entry->uri, $entries);
}
Expand All @@ -38,7 +38,7 @@ private static function getAllUris(Settings $settings): array
{
$entries = array_filter(Entry::find()
->uri(':notempty:')
->all(), fn($entry) => !$this->entryEntryTypeDisabled($entry, $settings));
->all(), fn($entry) => !self::entryEntryTypeDisabled($entry, $settings));

return array_map(static fn($entry) => $entry->uri, $entries);
}
Expand Down

0 comments on commit 126c73f

Please sign in to comment.