[CORE][Event] Make all events return \EventResult, enforced at container build time
This commit is contained in:
@@ -37,6 +37,7 @@ use Component\Attachment\Entity\AttachmentThumbnail;
|
||||
use Component\Attachment\Entity\AttachmentToLink;
|
||||
use Component\Attachment\Entity\AttachmentToNote;
|
||||
use Component\Link\Entity\Link;
|
||||
use EventResult;
|
||||
use Symfony\Contracts\HttpClient\Exception\ClientExceptionInterface;
|
||||
use Symfony\Contracts\HttpClient\Exception\RedirectionExceptionInterface;
|
||||
use Symfony\Contracts\HttpClient\Exception\ServerExceptionInterface;
|
||||
@@ -95,7 +96,7 @@ class StoreRemoteMedia extends Plugin
|
||||
* @throws ServerException
|
||||
* @throws TemporaryFileException
|
||||
*/
|
||||
public function onNewLinkFromNote(Link $link, Note $note): bool
|
||||
public function onNewLinkFromNote(Link $link, Note $note): EventResult
|
||||
{
|
||||
// Embed is the plugin to handle these
|
||||
if ($link->getMimetypeMajor() === 'text') {
|
||||
@@ -236,7 +237,7 @@ class StoreRemoteMedia extends Plugin
|
||||
*
|
||||
* @return bool true hook value
|
||||
*/
|
||||
public function onPluginVersion(array &$versions): bool
|
||||
public function onPluginVersion(array &$versions): EventResult
|
||||
{
|
||||
$versions[] = [
|
||||
'name' => 'StoreRemoteMedia',
|
||||
|
Reference in New Issue
Block a user