Skip to content

Commit

Permalink
Merge pull request #14634 from craftcms/bugfix/fs-events
Browse files Browse the repository at this point in the history
Trigger expected FS events
  • Loading branch information
brandonkelly authored Mar 22, 2024
2 parents af4a1b1 + 553eadd commit 9d1f891
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
- Selectize inputs no longer automatically select the hovered option on <kbd>Tab</kbd> press. ([selectize/selectize.js#2085](https://github.com/selectize/selectize.js/issues/2085))
- The `setup/cloud` command now ensures that the environment and `composer.json` are configured to use PHP 8.1+.
- Fixed a JavaScript error that could occur if another error occurred when performing an element action.
- Fixed a bug where filesystems’ `afterSave()` and `afterDelete()` methods weren’t getting called. ([#14634](https://github.com/craftcms/cms/pull/14634))

## 4.8.4 - 2024-03-19

Expand Down
4 changes: 4 additions & 0 deletions src/services/Fs.php
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,8 @@ public function saveFilesystem(FsInterface $fs, bool $runValidation = true): boo
}
}

$fs->afterSave($isNewFs);

// Clear caches
$this->_filesystems = null;

Expand Down Expand Up @@ -252,6 +254,8 @@ public function removeFilesystem(FsInterface $fs): bool
// Clear caches
$this->_filesystems = null;

$fs->afterDelete();

return true;
}
}

0 comments on commit 9d1f891

Please sign in to comment.