Client::clone() looses account configuration (thanks @netpok)ImapProtocol::readResponseClient::getFolderPath() return null if folder is not set (thanks @arnolem)Folder::status() (thanks @InterLinked1)Config::class to allow class serialization (sponsored by elb-BIT GmbH)Folder::getStatus() no longer returns the results of EXAMINE but STATUS instead. If you want to use EXAMINE you can use the Folder::examine() method instead.ClientManager::class has now longer access to all configs. Config handling has been moved to its own class Config::class. If you want to access the config you can use the retriever method ::getConfig() instead. Example: $client->getConfig() or $message->getConfig(), etc.ClientManager::get isn't available anymore. Use the regular config accessor instead. Example: $cm->getConfig()M̀essage::getConfig() now returns the client configuration instead of the fetching options configuration. Please use $message->getOptions() instead.Attachment::getConfig() now returns the client configuration instead of the fetching options configuration. Please use $attachment->getOptions() instead.Header::getConfig() now returns the client configuration instead of the fetching options configuration. Please use $header->getOptions() instead.M̀essage::setConfig now expects the client configuration instead of the fetching options configuration. Please use $message->setOptions instead.Attachment::setConfig now expects the client configuration instead of the fetching options configuration. Please use $attachment->setOptions instead.Header::setConfig now expects the client configuration instead of the fetching options configuration. Please use $header->setOptions instead.Config::class instanceClient::class constructors now require a Config::class instancePart::class constructors now require a Config::class instanceHeader::class constructors now require a Config::class instanceMessage::fromFile method now requires a Config::class instanceMessage::fromString method now requires a Config::class instanceMessage::boot method now requires a Config::class instanceImpacted are all versions below v5.3.0.
If possible, update to >= v5.3.0 as soon as possible. Impacted was the Attachment::save
method which could be used to write files to the local filesystem. The path was not
properly sanitized and could be used to write files to arbitrary locations.
However, the Attachment::save method is not used by default and has to be called
manually. If you are using this method without providing a sanitized path, you are
affected by this vulnerability.
If you are not using this method or are providing a sanitized path, you are not affected
by this vulnerability and no immediate action is required.
If you have any questions, please feel welcome to join this issue: https://github.com/Webklex/php-imap/issues/416
ImapProtocol::logout always throws 'not connected' Exception after upgraded to 4.1.2Message::setConfig() config parameter type set to arrayIMAP::FT_PEEKMessage::is() date comparison fixedMessage::$client could not be set to nullin_reply_to and references parsing fixedMessage::hasTextBody() and Message::hasHtmlBody() should return false if the body is emptyiconv_mime_decode() is now used with ICONV_MIME_DECODE_CONTINUE_ON_ERROR to prevent the decoding from failing$total attribute value set to 0 (thanks @hhniao)LIST command response to be emptyClient::clone() method added to clone a client instanceMessage::save()Message::fromFile()Protocol::getStream()Protocol::meta()ImapProtocol::reset()Response::class introduced to handle and unify all protocol requestsClientManager::getMask() addedAttribute::class instance can be treated as arrayClient::getConfig()Client::deleteFolder()Protocol::sizes() support added (fetch the message byte size via RFC822.SIZE). Accessible through Message::getSize() (thanks @didi1357)Message::hasFlag() method added to check if a message has a specific flagMessage::getConfig() method added to get the current message configurationFolder::select() method added to select a folderMessage::getAvailableFlags() method added to get all available flagsAttribute::map() method added to map all attribute valuesHeader::has() method added to check if a header attribute / value existMessage::fromString()nesbot/carbon version bumped to ^2.62.1phpunit/phpunit version bumped to ^9.5.10Header::get() always returns an Attribute::class instanceAttribute::class accessor methods renamed to shorten their names and improve the readabilityarray|bool will now always return a Response::class instance.ResponseException::class gets thrown if a response is empty or contains errorsMessage::fromFile())nullNONEXISTENT errors while selecting or examining a folderPaginatedCollection::paginate (thanks @rogerb87)Client::getFoldersWithStatus() recursive loading fixed (thanks @szymekjanaczek)Folder::appendMessage() (thanks @rskrzypczak)DONE method refactoredHasEvent::getEvent return value set to mixed to allow multiple event typesfread (stream_context timeout issue fixed)Folder::idle() method reworked and several issues fixedHasEvent::getEvent returns a mixed result. Either an Event or a class string representing the event class.empty response instead of failed to read - connection closed?.$auto_reconnect used with Folder::indle() is deprecated and doesn't serve any purpose anymore.Client::getTimeout()Folder:idle() auto modeClient::getFolder() updated to circumvent special edge casesmessage_no removed from Message::class\r\n\t (thanks @Oliver-Holz)InvalidWhereQueryCriteriaExceptionstream_set_timeout() removedFolder::idle()$message->from[0])Query::chunked(). Just in case you can't fetch all messages at onceAttribute:classUID as available search criteria (thanks @szymekjanaczek)Folder::query(["FEATURE_NAME"])WhereQuery::where() accepts now a wide range of criteria / values.\Webklex\PHPIMAP\Exceptions\MessageNotFoundException::class)Message::move() and Message::copy() no longer accept folder names as folder pathMessage::class instance might no longer have a message_no attributeboolean $uid option no longer support a boolean. Use IMAP::ST_UID or IMAP::NIL instead. If you want to use an alternative to UID just use the string instead.options.sequence changed from IMAP::ST_MSGN to IMAP::ST_UID.Folder::query() no longer accepts a charset string. It has been replaced by an extension array, which provides the ability to automatically fetch additional features.IMAP::ST_UID is setMessage::attachments() for Message::getAttachments() addedMessage::addFlag() for Message::setFlag() addedMessage::removeFlag() for Message::unsetFlag() addedMessage::flags() for Message::getFlags() addedMessageFlagException::class addedMessage::setSequenceId($id) addedÀttribute::class instance (should behave the same way as before, but might cause some problem in certain edge cases)Address::class instance (should behave the same way as before, but might cause some problem in certain edge cases)MessageFlagException::class exception can be thrown if a runtime error occursAttribute class here: www.php-imap.com/api/attributeAddress class here: www.php-imap.com/api/addressIMAP_AUTHENTICATION addedoptions.fetch set to IMAP::FT_PEEKMessage::getTextBody() fallback value fixedMessage::thread()Folder::overview() method added to fetch all headers of all messages in the current folderoptions.message_key option uid addedHeader::class attribute keys are now in a snake_format and no longer minus-separated.Message::getTextBody() no longer returns false if no text body is present. null is returned instead.in_reply_to "unified" to be always an arrayProtocol::moveMessage() instead of Protocol::copyMessage() and Message::delete()Query::paginate() ([@Max13](https://github.com/Max13))Message::getAttributes() hasn't returned all parametersStr::class dependency removed from Header::classAttachement::getExtension() fixedProtocol::moveMessage() method addedClient::getFolder($name, $deleimiter = null) to accept either a folder name or path ([@DasTobbel](https://github.com/DasTobbel))ClientManager::make() method added to support undefined accountsClient::getFolderByPath() added ([@Max13](https://github.com/Max13))Client::getFolderByName() added ([@Max13](https://github.com/Max13))Message::$in_reply_to type changed from mixed to arrayClientManager::class removed and config handling moved to depending library "webklex/php-imap" #345 #344\Webklex\IMAP\ClientManager::class no longer exists. Please use the \Webklex\IMAP\Facades\Client::class facade or \Webklex\PHPIMAP\ClientManager::class instead.webklex/php-imapIMAP to PHPIMAPnull in order to use the config default valueCUSTOM How can I help you explore Laravel packages today?