It could be nice to have possibility to make this kind of requirement: ``` php ->setAllowedTypes('attachments', '\Swift_Attachment[]') ``` Basically, for this case, an array of `Swift_Attachment` objects. It could be a good beginning waiting #4833.