[Web] Update composer libs
- Removing symfony/deprecation-contracts (v2.4.0) - Upgrading ddeboer/imap (1.12.1 => 1.13.1) - Upgrading directorytree/ldaprecord (v2.6.3 => v2.10.1) - Upgrading illuminate/contracts (v8.53.1 => v9.3.0) - Upgrading nesbot/carbon (2.51.1 => 2.57.0) - Upgrading phpmailer/phpmailer (v6.5.0 => v6.6.0) - Upgrading psr/container (1.1.1 => 2.0.2) - Upgrading psr/log (1.1.4 => 3.0.0) - Upgrading psr/simple-cache (1.0.1 => 2.0.0) - Upgrading robthree/twofactorauth (1.8.0 => 1.8.1) - Upgrading symfony/polyfill-ctype (v1.23.0 => v1.24.0) - Upgrading symfony/polyfill-mbstring (v1.23.1 => v1.24.0) - Upgrading symfony/polyfill-php80 (v1.23.1 => v1.24.0) - Upgrading symfony/translation (v5.3.4 => v6.0.5) - Upgrading symfony/translation-contracts (v2.4.0 => v3.0.0) - Upgrading symfony/var-dumper (v5.3.6 => v6.0.5) - Upgrading tightenco/collect (v8.34.0 => v8.83.2) - Upgrading twig/twig (v3.3.2 => v3.3.8)
This commit is contained in:
@@ -117,6 +117,7 @@ final class Connection implements ConnectionInterface
|
||||
return new Mailbox($this->resource, $name, $this->mailboxNames[$name]);
|
||||
}
|
||||
|
||||
#[\ReturnTypeWillChange]
|
||||
public function count()
|
||||
{
|
||||
$return = \imap_num_msg($this->resource->getStream());
|
||||
|
@@ -6,6 +6,7 @@ namespace Ddeboer\Imap;
|
||||
|
||||
use Ddeboer\Imap\Exception\InvalidResourceException;
|
||||
use Ddeboer\Imap\Exception\ReopenMailboxException;
|
||||
use IMAP\Connection;
|
||||
|
||||
/**
|
||||
* An imap resource stream.
|
||||
@@ -22,7 +23,7 @@ final class ImapResource implements ImapResourceInterface
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @param resource $resource
|
||||
* @param Connection|resource $resource
|
||||
*/
|
||||
public function __construct($resource, MailboxInterface $mailbox = null)
|
||||
{
|
||||
@@ -32,7 +33,10 @@ final class ImapResource implements ImapResourceInterface
|
||||
|
||||
public function getStream()
|
||||
{
|
||||
if (false === \is_resource($this->resource) || 'imap' !== \get_resource_type($this->resource)) {
|
||||
if (
|
||||
!$this->resource instanceof Connection
|
||||
&& (false === \is_resource($this->resource) || 'imap' !== \get_resource_type($this->resource))
|
||||
) {
|
||||
throw new InvalidResourceException('Supplied resource is not a valid imap resource');
|
||||
}
|
||||
|
||||
@@ -55,8 +59,14 @@ final class ImapResource implements ImapResourceInterface
|
||||
return;
|
||||
}
|
||||
|
||||
\set_error_handler(static function (): bool {
|
||||
return true;
|
||||
});
|
||||
|
||||
\imap_reopen($this->resource, $this->mailbox->getFullEncodedName());
|
||||
|
||||
\restore_error_handler();
|
||||
|
||||
if (self::isMailboxOpen($this->mailbox, $this->resource)) {
|
||||
return;
|
||||
}
|
||||
|
@@ -64,6 +64,7 @@ final class Mailbox implements MailboxInterface
|
||||
return $this->info->delimiter;
|
||||
}
|
||||
|
||||
#[\ReturnTypeWillChange]
|
||||
public function count()
|
||||
{
|
||||
$return = \imap_num_msg($this->resource->getStream());
|
||||
|
@@ -268,6 +268,7 @@ abstract class AbstractPart implements PartInterface
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
#[\ReturnTypeWillChange]
|
||||
final public function current()
|
||||
{
|
||||
$this->lazyParseStructure();
|
||||
@@ -275,11 +276,13 @@ abstract class AbstractPart implements PartInterface
|
||||
return $this->parts[$this->key];
|
||||
}
|
||||
|
||||
#[\ReturnTypeWillChange]
|
||||
final public function getChildren()
|
||||
{
|
||||
return $this->current();
|
||||
}
|
||||
|
||||
#[\ReturnTypeWillChange]
|
||||
final public function hasChildren()
|
||||
{
|
||||
$this->lazyParseStructure();
|
||||
@@ -290,21 +293,25 @@ abstract class AbstractPart implements PartInterface
|
||||
/**
|
||||
* @return int
|
||||
*/
|
||||
#[\ReturnTypeWillChange]
|
||||
final public function key()
|
||||
{
|
||||
return $this->key;
|
||||
}
|
||||
|
||||
#[\ReturnTypeWillChange]
|
||||
final public function next()
|
||||
{
|
||||
++$this->key;
|
||||
}
|
||||
|
||||
#[\ReturnTypeWillChange]
|
||||
final public function rewind()
|
||||
{
|
||||
$this->key = 0;
|
||||
}
|
||||
|
||||
#[\ReturnTypeWillChange]
|
||||
final public function valid()
|
||||
{
|
||||
$this->lazyParseStructure();
|
||||
|
@@ -19,6 +19,7 @@ final class EmailAddress
|
||||
$this->mailbox = $mailbox;
|
||||
$this->hostname = $hostname;
|
||||
$this->name = $name;
|
||||
$this->address = null;
|
||||
|
||||
if (null !== $hostname) {
|
||||
$this->address = $mailbox . '@' . $hostname;
|
||||
|
@@ -9,7 +9,7 @@ use Ddeboer\Imap\Message\PartInterface;
|
||||
/**
|
||||
* @extends \Iterator<MessageInterface>
|
||||
*/
|
||||
interface MessageIteratorInterface extends \Iterator
|
||||
interface MessageIteratorInterface extends \Iterator, \Countable
|
||||
{
|
||||
/**
|
||||
* Get current message.
|
||||
|
Reference in New Issue
Block a user