Adjust return type to already existing type hint
\Attachments\Model\Table\AttachmentsTable::addUpload() now always returns the attachment entity, whether the save was successful or not.
-
this makes the code consistent with the return type hint, introduced 3 months ago, which did not allow for a boolean to be returned anyway. That's also the reason why this essentially BC breaking change was still made in a patch version, as the error case returning
falsewould have triggered a TypeError. -
it enables the calling context to get any validation errors if the save failed from the returned entity instead of only getting
false