[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:
73
data/web/inc/lib/vendor/ddeboer/imap/.php-cs-fixer.php
vendored
Normal file
73
data/web/inc/lib/vendor/ddeboer/imap/.php-cs-fixer.php
vendored
Normal file
@@ -0,0 +1,73 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
return (new PhpCsFixer\Config())
|
||||
->setRiskyAllowed(true)
|
||||
->setRules([
|
||||
'@DoctrineAnnotation' => true,
|
||||
'@Symfony' => true,
|
||||
'@Symfony:risky' => true,
|
||||
'@PHPUnit75Migration:risky' => true,
|
||||
'@PHP71Migration' => true,
|
||||
'@PHP70Migration:risky' => true, // @TODO with next major version
|
||||
'align_multiline_comment' => ['comment_type' => 'all_multiline'],
|
||||
'array_indentation' => true,
|
||||
'array_syntax' => ['syntax' => 'short'],
|
||||
'binary_operator_spaces' => ['default' => 'align_single_space'],
|
||||
'blank_line_before_statement' => true,
|
||||
'class_definition' => ['single_item_single_line' => true],
|
||||
'compact_nullable_typehint' => true,
|
||||
'concat_space' => ['spacing' => 'one'],
|
||||
'echo_tag_syntax' => ['format' => 'long'],
|
||||
'error_suppression' => false,
|
||||
'escape_implicit_backslashes' => true,
|
||||
'explicit_indirect_variable' => true,
|
||||
'explicit_string_variable' => true,
|
||||
'fully_qualified_strict_types' => true,
|
||||
'heredoc_to_nowdoc' => true,
|
||||
'list_syntax' => ['syntax' => 'long'],
|
||||
'method_argument_space' => ['on_multiline' => 'ensure_fully_multiline'],
|
||||
'method_chaining_indentation' => true,
|
||||
'multiline_comment_opening_closing' => true,
|
||||
'multiline_whitespace_before_semicolons' => ['strategy' => 'new_line_for_chained_calls'],
|
||||
'native_constant_invocation' => true,
|
||||
'native_function_invocation' => ['include' => ['@internal']],
|
||||
'no_alternative_syntax' => true,
|
||||
'no_break_comment' => true,
|
||||
'no_extra_blank_lines' => ['tokens' => ['break', 'continue', 'extra', 'return', 'throw', 'use', 'parenthesis_brace_block', 'square_brace_block', 'curly_brace_block']],
|
||||
'no_null_property_initialization' => true,
|
||||
'no_php4_constructor' => true,
|
||||
'no_superfluous_elseif' => true,
|
||||
'no_unneeded_curly_braces' => true,
|
||||
'no_unneeded_final_method' => true,
|
||||
'no_unreachable_default_argument_value' => true,
|
||||
'no_useless_else' => true,
|
||||
'no_useless_return' => true,
|
||||
'ordered_imports' => true,
|
||||
'php_unit_method_casing' => true,
|
||||
'php_unit_set_up_tear_down_visibility' => true,
|
||||
'php_unit_strict' => true,
|
||||
'php_unit_test_annotation' => true,
|
||||
'php_unit_test_case_static_method_calls' => true,
|
||||
'php_unit_test_class_requires_covers' => false,
|
||||
'phpdoc_add_missing_param_annotation' => true,
|
||||
'phpdoc_order' => true,
|
||||
'phpdoc_order_by_value' => true,
|
||||
'phpdoc_types_order' => true,
|
||||
'random_api_migration' => true,
|
||||
'semicolon_after_instruction' => true,
|
||||
'simplified_null_return' => true,
|
||||
'single_line_comment_style' => true,
|
||||
'single_line_throw' => false,
|
||||
'space_after_semicolon' => true,
|
||||
'static_lambda' => true,
|
||||
'strict_comparison' => true,
|
||||
'string_line_ending' => true,
|
||||
])
|
||||
->setFinder(
|
||||
PhpCsFixer\Finder::create()
|
||||
->in(__DIR__ . '/src')
|
||||
->in(__DIR__ . '/tests')
|
||||
)
|
||||
;
|
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "ddeboer/imap",
|
||||
"description": "Object-oriented IMAP for PHP",
|
||||
"license": "MIT",
|
||||
"keywords": [
|
||||
"email",
|
||||
"mail",
|
||||
"imap"
|
||||
],
|
||||
"license": "MIT",
|
||||
"authors": [
|
||||
{
|
||||
"name": "David de Boer",
|
||||
@@ -22,18 +22,19 @@
|
||||
}
|
||||
],
|
||||
"require": {
|
||||
"php": "^7.4 || ^8.0",
|
||||
"php": "^8.0.1",
|
||||
"ext-iconv": "*",
|
||||
"ext-imap": "*",
|
||||
"ext-mbstring": "*"
|
||||
},
|
||||
"require-dev": {
|
||||
"friendsofphp/php-cs-fixer": "^2.18.6",
|
||||
"laminas/laminas-mail": "^2.14.0",
|
||||
"phpstan/phpstan": "^0.12.84",
|
||||
"phpstan/phpstan-phpunit": "^0.12.18",
|
||||
"phpstan/phpstan-strict-rules": "^0.12.9",
|
||||
"phpunit/phpunit": "^9.5.4"
|
||||
"friendsofphp/php-cs-fixer": "^v3.4.0",
|
||||
"laminas/laminas-mail": "^2.15.1",
|
||||
"malukenho/mcbumpface": "^1.1.5",
|
||||
"phpstan/phpstan": "^1.3.3",
|
||||
"phpstan/phpstan-phpunit": "^1.0.0",
|
||||
"phpstan/phpstan-strict-rules": "^1.1.0",
|
||||
"phpunit/phpunit": "^9.5.11"
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
@@ -44,5 +45,10 @@
|
||||
"psr-4": {
|
||||
"Ddeboer\\Imap\\Tests\\": "tests/"
|
||||
}
|
||||
},
|
||||
"config": {
|
||||
"allow-plugins": {
|
||||
"malukenho/mcbumpface": true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -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