protected static function createFromObject(SymfonyUploadedFile $file) { $staplerFile = new StaplerUploadedFile($file); $staplerFile->validate(); return $staplerFile; }