aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/sabre
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2022-10-11 18:34:03 +0000
committerMario <mario@mariovavti.com>2022-10-11 18:34:03 +0000
commit108a3efe0b6d37a7ed394a84c69b924ca727f17a (patch)
treeed9904767622d769fcee883d407310087ed7d57a /vendor/sabre
parentccd826f63a7a4c7e442fab8a70d9c4c84808b417 (diff)
downloadvolse-hubzilla-108a3efe0b6d37a7ed394a84c69b924ca727f17a.tar.gz
volse-hubzilla-108a3efe0b6d37a7ed394a84c69b924ca727f17a.tar.bz2
volse-hubzilla-108a3efe0b6d37a7ed394a84c69b924ca727f17a.zip
update composer libs
Diffstat (limited to 'vendor/sabre')
-rw-r--r--vendor/sabre/dav/README.md21
-rw-r--r--vendor/sabre/dav/lib/DAV/CorePlugin.php5
-rw-r--r--vendor/sabre/dav/lib/DAV/StringUtil.php6
-rw-r--r--vendor/sabre/dav/lib/DAV/Version.php2
-rw-r--r--vendor/sabre/http/.github/workflows/ci.yml5
-rw-r--r--vendor/sabre/http/CHANGELOG.md23
-rw-r--r--vendor/sabre/http/README.md42
-rw-r--r--vendor/sabre/http/lib/Auth/AbstractAuth.php2
-rw-r--r--vendor/sabre/http/lib/Auth/Basic.php2
-rw-r--r--vendor/sabre/http/lib/Auth/Bearer.php2
-rw-r--r--vendor/sabre/http/lib/Auth/Digest.php4
-rw-r--r--vendor/sabre/http/lib/Client.php4
-rw-r--r--vendor/sabre/http/lib/Message.php6
-rw-r--r--vendor/sabre/http/lib/MessageDecoratorTrait.php6
-rw-r--r--vendor/sabre/http/lib/MessageInterface.php10
-rw-r--r--vendor/sabre/http/lib/Request.php2
-rw-r--r--vendor/sabre/http/lib/RequestDecorator.php2
-rw-r--r--vendor/sabre/http/lib/RequestInterface.php2
-rw-r--r--vendor/sabre/http/lib/Response.php4
-rw-r--r--vendor/sabre/http/lib/ResponseDecorator.php2
-rw-r--r--vendor/sabre/http/lib/ResponseInterface.php2
-rw-r--r--vendor/sabre/http/lib/Sapi.php62
-rw-r--r--vendor/sabre/http/lib/Version.php2
-rw-r--r--vendor/sabre/http/lib/functions.php8
-rw-r--r--vendor/sabre/uri/.gitattributes4
-rw-r--r--vendor/sabre/uri/.github/workflows/ci.yml63
-rw-r--r--vendor/sabre/uri/.gitignore8
-rw-r--r--vendor/sabre/uri/.php-cs-fixer.dist.php (renamed from vendor/sabre/uri/.php_cs.dist)7
-rw-r--r--vendor/sabre/uri/composer.json8
-rw-r--r--vendor/sabre/uri/lib/Version.php2
-rw-r--r--vendor/sabre/uri/lib/functions.php37
-rw-r--r--vendor/sabre/uri/phpstan.neon2
-rw-r--r--vendor/sabre/vobject/.github/workflows/ci.yml63
-rw-r--r--vendor/sabre/vobject/lib/Cli.php2
-rw-r--r--vendor/sabre/vobject/lib/Component.php12
-rw-r--r--vendor/sabre/vobject/lib/Component/VCard.php5
-rw-r--r--vendor/sabre/vobject/lib/Parameter.php3
-rw-r--r--vendor/sabre/vobject/lib/Parser/MimeDir.php20
-rw-r--r--vendor/sabre/vobject/lib/Property.php2
-rw-r--r--vendor/sabre/vobject/lib/Property/ICalendar/CalAddress.php6
-rw-r--r--vendor/sabre/vobject/lib/Property/Text.php22
-rw-r--r--vendor/sabre/vobject/lib/Recur/RRuleIterator.php30
-rw-r--r--vendor/sabre/vobject/lib/StringUtil.php18
-rw-r--r--vendor/sabre/vobject/lib/VCardConverter.php5
-rw-r--r--vendor/sabre/vobject/lib/Version.php2
45 files changed, 238 insertions, 309 deletions
diff --git a/vendor/sabre/dav/README.md b/vendor/sabre/dav/README.md
index acdb1e03c..32ca1c3fa 100644
--- a/vendor/sabre/dav/README.md
+++ b/vendor/sabre/dav/README.md
@@ -14,16 +14,17 @@ http://sabre.io/
Build status
------------
-| branch | status | minimum PHP version |
-| ------------ | ------ | ------------------- |
-| master | [![Build Status](https://travis-ci.org/sabre-io/dav.svg?branch=master)](https://travis-ci.org/sabre-io/dav) | PHP 7.1 |
-| 3.1 | [![Build Status](https://travis-ci.org/sabre-io/dav.svg?branch=3.0)](https://travis-ci.org/sabre-io/dav) | PHP 5.5 |
-| 3.0 | [![Build Status](https://travis-ci.org/sabre-io/dav.svg?branch=3.0)](https://travis-ci.org/sabre-io/dav) | PHP 5.4 |
-| 2.1 | [![Build Status](https://travis-ci.org/sabre-io/dav.svg?branch=2.1)](https://travis-ci.org/sabre-io/dav) | PHP 5.4 |
-| 2.0 | [![Build Status](https://travis-ci.org/sabre-io/dav.svg?branch=2.0)](https://travis-ci.org/sabre-io/dav) | PHP 5.4 |
-| 1.8 | [![Build Status](https://travis-ci.org/sabre-io/dav.svg?branch=1.8)](https://travis-ci.org/sabre-io/dav) | PHP 5.3 |
-| 1.7 | [![Build Status](https://travis-ci.org/sabre-io/dav.svg?branch=1.7)](https://travis-ci.org/sabre-io/dav) | PHP 5.3 |
-| 1.6 | [![Build Status](https://travis-ci.org/sabre-io/dav.svg?branch=1.6)](https://travis-ci.org/sabre-io/dav) | PHP 5.3 |
+| branch | status | PHP version |
+|------------|---------------------------------------------------------------------------|--------------------|
+| master 4.* | ![CI](https://github.com/sabre-io/dav/actions/workflows/ci.yml/badge.svg) | PHP 7.1 up, 8.0 up |
+| 3.2 | unmaintained | PHP 5.5 to 7.1 |
+| 3.1 | unmaintained | PHP 5.5 |
+| 3.0 | unmaintained | PHP 5.4 |
+| 2.1 | unmaintained | PHP 5.4 |
+| 2.0 | unmaintained | PHP 5.4 |
+| 1.8 | unmaintained | PHP 5.3 |
+| 1.7 | unmaintained | PHP 5.3 |
+| 1.6 | unmaintained | PHP 5.3 |
Documentation
-------------
diff --git a/vendor/sabre/dav/lib/DAV/CorePlugin.php b/vendor/sabre/dav/lib/DAV/CorePlugin.php
index 74350c28d..dbd8976b1 100644
--- a/vendor/sabre/dav/lib/DAV/CorePlugin.php
+++ b/vendor/sabre/dav/lib/DAV/CorePlugin.php
@@ -645,6 +645,10 @@ class CorePlugin extends ServerPlugin
if (!$this->server->emit('beforeBind', [$copyInfo['destination']])) {
return false;
}
+ if (!$this->server->emit('beforeCopy', [$path, $copyInfo['destination']])) {
+ return false;
+ }
+
if ($copyInfo['destinationExists']) {
if (!$this->server->emit('beforeUnbind', [$copyInfo['destination']])) {
return false;
@@ -653,6 +657,7 @@ class CorePlugin extends ServerPlugin
}
$this->server->tree->copy($path, $copyInfo['destination']);
+ $this->server->emit('afterCopy', [$path, $copyInfo['destination']]);
$this->server->emit('afterBind', [$copyInfo['destination']]);
// If a resource was overwritten we should send a 204, otherwise a 201
diff --git a/vendor/sabre/dav/lib/DAV/StringUtil.php b/vendor/sabre/dav/lib/DAV/StringUtil.php
index 13a4399e3..edfb7fa5c 100644
--- a/vendor/sabre/dav/lib/DAV/StringUtil.php
+++ b/vendor/sabre/dav/lib/DAV/StringUtil.php
@@ -77,10 +77,8 @@ class StringUtil
*/
public static function ensureUTF8($input)
{
- $encoding = mb_detect_encoding($input, ['UTF-8', 'ISO-8859-1'], true);
-
- if ('ISO-8859-1' === $encoding) {
- return utf8_encode($input);
+ if (!mb_check_encoding($input, 'UTF-8') && mb_check_encoding($input, 'ISO-8859-1')) {
+ return mb_convert_encoding($input, 'UTF-8', 'ISO-8859-1');
} else {
return $input;
}
diff --git a/vendor/sabre/dav/lib/DAV/Version.php b/vendor/sabre/dav/lib/DAV/Version.php
index f8b56bb98..c6273ef72 100644
--- a/vendor/sabre/dav/lib/DAV/Version.php
+++ b/vendor/sabre/dav/lib/DAV/Version.php
@@ -16,5 +16,5 @@ class Version
/**
* Full version number.
*/
- public const VERSION = '4.3.1';
+ public const VERSION = '4.4.0';
}
diff --git a/vendor/sabre/http/.github/workflows/ci.yml b/vendor/sabre/http/.github/workflows/ci.yml
index 91b509bf0..cbb681e53 100644
--- a/vendor/sabre/http/.github/workflows/ci.yml
+++ b/vendor/sabre/http/.github/workflows/ci.yml
@@ -13,11 +13,10 @@ jobs:
fail-fast: false
matrix:
php-versions: ['7.2', '7.3', '7.4', '8.0', '8.1']
- coverage: ['pcov']
+ coverage: ['xdebug']
code-analysis: ['no']
include:
- php-versions: '7.1'
- coverage: 'none'
code-analysis: 'yes'
steps:
- name: Checkout
@@ -27,7 +26,7 @@ jobs:
uses: shivammathur/setup-php@v2 #https://github.com/shivammathur/setup-php
with:
php-version: ${{ matrix.php-versions }}
- extensions: ctype, curl, mbstring
+ extensions: ctype, curl, mbstring, xdebug
coverage: ${{ matrix.coverage }}
tools: composer
diff --git a/vendor/sabre/http/CHANGELOG.md b/vendor/sabre/http/CHANGELOG.md
index 4db8cc772..2dddce4fb 100644
--- a/vendor/sabre/http/CHANGELOG.md
+++ b/vendor/sabre/http/CHANGELOG.md
@@ -1,6 +1,23 @@
ChangeLog
=========
+5.1.6 (2022-07-15)
+------------------
+
+* #187 Allow testSendToGetLargeContent peak memory usage to be specified externally (@phil-davis)
+* #188 Fix various small typos and grammar (@phil-davis)
+* #189 Fix typo in text of status code 203 'Non-Authoritative Information' (@phil-davis)
+
+5.1.5 (2022-07-09)
+------------------
+
+* #184 Remove 4GB file size workaround for 32bit OS / Stream Videos on IOS (@schoetju)
+
+5.1.4 (2022-06-24)
+------------------
+
+* #182 Fix encoding detection on PHP 8.1 (@come-nc)
+
5.1.3 (2021-11-04)
------------------
@@ -72,7 +89,7 @@ ChangeLog
* #65: It's now possible to supply request/response bodies using a callback
functions. This allows very high-speed/low-memory responses to be created.
(@petrkotek).
-* Strict typing is used every where this is applicable.
+* Strict typing is used everywhere this is applicable.
* Removed `URLUtil` class. It was deprecated a long time ago, and most of
its functions moved to the `sabre/uri` package.
* Removed `Util` class. Most of its functions moved to the `functions.php`
@@ -91,7 +108,7 @@ ChangeLog
4.2.3 (2017-06-12)
------------------
-* #74, #77: Work around 4GB file size limit at 32 Bit systems
+* #74, #77: Work around 4GB file size limit at 32-Bit systems
4.2.2 (2017-01-02)
@@ -279,7 +296,7 @@ ChangeLog
* Changed: Response::send() is now Sapi::sendResponse($response).
* Changed: Request::createFromPHPRequest is now Sapi::getRequest().
* Changed: Message::getBodyAsStream and Message::getBodyAsString were added. The
- existing Message::getBody changed it's behavior, so be careful.
+ existing Message::getBody changed its behavior, so be careful.
2.0.0alpha5 (2013-11-07)
diff --git a/vendor/sabre/http/README.md b/vendor/sabre/http/README.md
index 8159b4d49..2f01c1448 100644
--- a/vendor/sabre/http/README.md
+++ b/vendor/sabre/http/README.md
@@ -28,11 +28,11 @@ The objects are extendable and easily mockable.
Build status
------------
-| branch | status |
-| ------ | ------ |
+| branch | status |
+|--------|---------------------------------------------------------------------------------------------------------------|
| master | [![Build Status](https://travis-ci.org/sabre-io/http.svg?branch=master)](https://travis-ci.org/sabre-io/http) |
-| 4.2 | [![Build Status](https://travis-ci.org/sabre-io/http.svg?branch=4.2)](https://travis-ci.org/sabre-io/http) |
-| 3.0 | [![Build Status](https://travis-ci.org/sabre-io/http.svg?branch=3.0)](https://travis-ci.org/sabre-io/http) |
+| 4.2 | [![Build Status](https://travis-ci.org/sabre-io/http.svg?branch=4.2)](https://travis-ci.org/sabre-io/http) |
+| 3.0 | [![Build Status](https://travis-ci.org/sabre-io/http.svg?branch=3.0)](https://travis-ci.org/sabre-io/http) |
Installation
------------
@@ -84,7 +84,7 @@ $request = HTTP\Sapi::getRequest();
This line should only happen once in your entire application. Everywhere else
you should pass this request object around using dependency injection.
-You should always typehint on it's interface:
+You should always typehint on its interface:
```php
function handleRequest(HTTP\RequestInterface $request) {
@@ -133,9 +133,9 @@ Simply extending Request and Response may pose some problems:
1. You may want to extend the objects with new behaviors differently, in
different subsystems of your application,
-2. The `Sapi::getRequest` factory always returns a instance of
+2. The `Sapi::getRequest` factory always returns an instance of
`Request` so you would have to override the factory method as well,
-3. By controlling the instantation and depend on specific `Request` and
+3. By controlling the instantiation and depend on specific `Request` and
`Response` instances in your library or application, you make it harder to
work with other applications which also use `sabre/http`.
@@ -162,7 +162,7 @@ class MyRequest extends HTTP\RequestDecorator {
Our application assumes that the true `Request` object was instantiated
somewhere else, by some other subsystem. This could simply be a call like
`$request = Sapi::getRequest()` at the top of your application,
-but could also be somewhere in a unittest.
+but could also be somewhere in a unit test.
All we know in the current subsystem, is that we received a `$request` and
that it implements `Sabre\HTTP\RequestInterface`. To decorate this object,
@@ -296,7 +296,7 @@ $remoteUrl = 'http://example.org/';
// The url we're proxying from. Please note that this must be a relative url,
// and basically acts as the base url.
//
-// If youre $remoteUrl doesn't end with a slash, this one probably shouldn't
+// If your $remoteUrl doesn't end with a slash, this one probably shouldn't
// either.
$myBaseUrl = '/reverseproxy.php';
// $myBaseUrl = '/~evert/sabre/http/examples/reverseproxy.php/';
@@ -412,10 +412,10 @@ function setBaseUrl($url);
* If the full path is equal to the base url, this method will return an
* empty string.
*
- * This method will also urldecode the path, and if the url was incoded as
+ * This method will also urldecode the path, and if the url was encoded as
* ISO-8859-1, it will convert it to UTF-8.
*
- * If the path is outside of the base url, a LogicException will be thrown.
+ * If the path is outside the base url, a LogicException will be thrown.
*
* @return string
*/
@@ -491,7 +491,7 @@ function getBodyAsStream();
function getBodyAsString();
/**
- * Returns the message body, as it's internal representation.
+ * Returns the message body, as its internal representation.
*
* This could be either a string or a stream.
*
@@ -515,7 +515,7 @@ function setBody($body);
function getHeaders();
/**
- * Returns a specific HTTP header, based on it's name.
+ * Returns a specific HTTP header, based on its name.
*
* The name must be treated as case-insensitive.
*
@@ -529,7 +529,7 @@ function getHeader($name);
/**
* Updates a HTTP header.
*
- * The case-sensitity of the name value must be retained as-is.
+ * The case-sensitivity of the name value must be retained as-is.
*
* @param string $name
* @param string $value
@@ -561,7 +561,7 @@ function addHeaders(array $headers);
/**
* Removes a HTTP header.
*
- * The specified header name must be treated as case-insenstive.
+ * The specified header name must be treated as case-insensitive.
* This method should return true if the header was successfully deleted,
* and false if the header did not exist.
*
@@ -593,7 +593,7 @@ function getHttpVersion();
/**
* Returns the current HTTP status.
*
- * This is the status-code as well as the human readable string.
+ * This is the status-code as well as the human-readable string.
*
* @return string
*/
@@ -602,7 +602,7 @@ function getStatus();
/**
* Sets the HTTP status code.
*
- * This can be either the full HTTP status code with human readable string,
+ * This can be either the full HTTP status code with human-readable string,
* for example: "403 I can't let you do that, Dave".
*
* Or just the code, in which case the appropriate default message will be
@@ -635,7 +635,7 @@ function getBodyAsStream();
function getBodyAsString();
/**
- * Returns the message body, as it's internal representation.
+ * Returns the message body, as its internal representation.
*
* This could be either a string or a stream.
*
@@ -660,7 +660,7 @@ function setBody($body);
function getHeaders();
/**
- * Returns a specific HTTP header, based on it's name.
+ * Returns a specific HTTP header, based on its name.
*
* The name must be treated as case-insensitive.
*
@@ -674,7 +674,7 @@ function getHeader($name);
/**
* Updates a HTTP header.
*
- * The case-sensitity of the name value must be retained as-is.
+ * The case-sensitivity of the name value must be retained as-is.
*
* @param string $name
* @param string $value
@@ -706,7 +706,7 @@ function addHeaders(array $headers);
/**
* Removes a HTTP header.
*
- * The specified header name must be treated as case-insenstive.
+ * The specified header name must be treated as case-insensitive.
* This method should return true if the header was successfully deleted,
* and false if the header did not exist.
*
diff --git a/vendor/sabre/http/lib/Auth/AbstractAuth.php b/vendor/sabre/http/lib/Auth/AbstractAuth.php
index 645f07edd..07f451bc0 100644
--- a/vendor/sabre/http/lib/Auth/AbstractAuth.php
+++ b/vendor/sabre/http/lib/Auth/AbstractAuth.php
@@ -50,7 +50,7 @@ abstract class AbstractAuth
}
/**
- * This method sends the needed HTTP header and statuscode (401) to force
+ * This method sends the needed HTTP header and status code (401) to force
* the user to login.
*/
abstract public function requireLogin();
diff --git a/vendor/sabre/http/lib/Auth/Basic.php b/vendor/sabre/http/lib/Auth/Basic.php
index d04b4a811..c1bad1a5b 100644
--- a/vendor/sabre/http/lib/Auth/Basic.php
+++ b/vendor/sabre/http/lib/Auth/Basic.php
@@ -49,7 +49,7 @@ class Basic extends AbstractAuth
}
/**
- * This method sends the needed HTTP header and statuscode (401) to force
+ * This method sends the needed HTTP header and status code (401) to force
* the user to login.
*/
public function requireLogin()
diff --git a/vendor/sabre/http/lib/Auth/Bearer.php b/vendor/sabre/http/lib/Auth/Bearer.php
index 988bb29d2..580e23941 100644
--- a/vendor/sabre/http/lib/Auth/Bearer.php
+++ b/vendor/sabre/http/lib/Auth/Bearer.php
@@ -42,7 +42,7 @@ class Bearer extends AbstractAuth
}
/**
- * This method sends the needed HTTP header and statuscode (401) to force
+ * This method sends the needed HTTP header and status code (401) to force
* authentication.
*/
public function requireLogin()
diff --git a/vendor/sabre/http/lib/Auth/Digest.php b/vendor/sabre/http/lib/Auth/Digest.php
index a093d8b75..e80e78305 100644
--- a/vendor/sabre/http/lib/Auth/Digest.php
+++ b/vendor/sabre/http/lib/Auth/Digest.php
@@ -133,7 +133,7 @@ class Digest extends AbstractAuth
return false;
}
// We need to add an md5 of the entire request body to the A2 part of the hash
- $body = $this->request->getBody($asString = true);
+ $body = $this->request->getBody();
$this->request->setBody($body);
$A2 .= ':'.md5($body);
} elseif (!($this->qop & self::QOP_AUTH)) {
@@ -174,7 +174,7 @@ class Digest extends AbstractAuth
/**
* This method returns the full digest string.
*
- * It should be compatibile with mod_php format and other webservers.
+ * It should be compatible with mod_php format and other webservers.
*
* If the header could not be found, null will be returned
*
diff --git a/vendor/sabre/http/lib/Client.php b/vendor/sabre/http/lib/Client.php
index 99ffcf8cb..2bc7483a7 100644
--- a/vendor/sabre/http/lib/Client.php
+++ b/vendor/sabre/http/lib/Client.php
@@ -26,7 +26,7 @@ use Sabre\Uri;
* request before it's done, such as adding authentication headers.
*
* The afterRequest event will be emitted after the request is completed
- * succesfully.
+ * successfully.
*
* If a HTTP error is returned (status code higher than 399) the error event is
* triggered. It's possible using this event to retry the request, by setting
@@ -53,7 +53,7 @@ class Client extends EventEmitter
protected $curlSettings = [];
/**
- * Wether or not exceptions should be thrown when a HTTP error is returned.
+ * Whether exceptions should be thrown when a HTTP error is returned.
*
* @var bool
*/
diff --git a/vendor/sabre/http/lib/Message.php b/vendor/sabre/http/lib/Message.php
index 6474f38d2..dc57ca903 100644
--- a/vendor/sabre/http/lib/Message.php
+++ b/vendor/sabre/http/lib/Message.php
@@ -96,7 +96,7 @@ abstract class Message implements MessageInterface
}
/**
- * Returns the message body, as it's internal representation.
+ * Returns the message body, as its internal representation.
*
* This could be either a string, a stream or a callback writing the body to php://output.
*
@@ -141,7 +141,7 @@ abstract class Message implements MessageInterface
}
/**
- * Returns a specific HTTP header, based on it's name.
+ * Returns a specific HTTP header, based on its name.
*
* The name must be treated as case-insensitive.
* If the header does not exist, this method must return null.
@@ -172,7 +172,7 @@ abstract class Message implements MessageInterface
* For every time the HTTP header appeared in the request or response, an
* item will appear in the array.
*
- * If the header did not exists, this method will return an empty array.
+ * If the header did not exist, this method will return an empty array.
*
* @return string[]
*/
diff --git a/vendor/sabre/http/lib/MessageDecoratorTrait.php b/vendor/sabre/http/lib/MessageDecoratorTrait.php
index 6f49dadfc..191ba0f74 100644
--- a/vendor/sabre/http/lib/MessageDecoratorTrait.php
+++ b/vendor/sabre/http/lib/MessageDecoratorTrait.php
@@ -51,7 +51,7 @@ trait MessageDecoratorTrait
}
/**
- * Returns the message body, as it's internal representation.
+ * Returns the message body, as its internal representation.
*
* This could be either a string or a stream.
*
@@ -91,7 +91,7 @@ trait MessageDecoratorTrait
}
/**
- * Returns a specific HTTP header, based on it's name.
+ * Returns a specific HTTP header, based on its name.
*
* The name must be treated as case-insensitive.
* If the header does not exist, this method must return null.
@@ -116,7 +116,7 @@ trait MessageDecoratorTrait
* For every time the HTTP header appeared in the request or response, an
* item will appear in the array.
*
- * If the header did not exists, this method will return an empty array.
+ * If the header did not exist, this method will return an empty array.
*/
public function getHeaderAsArray(string $name): array
{
diff --git a/vendor/sabre/http/lib/MessageInterface.php b/vendor/sabre/http/lib/MessageInterface.php
index 8504f0f59..4531654bc 100644
--- a/vendor/sabre/http/lib/MessageInterface.php
+++ b/vendor/sabre/http/lib/MessageInterface.php
@@ -33,7 +33,7 @@ interface MessageInterface
public function getBodyAsString(): string;
/**
- * Returns the message body, as it's internal representation.
+ * Returns the message body, as its internal representation.
*
* This could be either a string, a stream or a callback writing the body to php://output
*
@@ -61,7 +61,7 @@ interface MessageInterface
public function hasHeader(string $name): bool;
/**
- * Returns a specific HTTP header, based on it's name.
+ * Returns a specific HTTP header, based on its name.
*
* The name must be treated as case-insensitive.
* If the header does not exist, this method must return null.
@@ -83,7 +83,7 @@ interface MessageInterface
* For every time the HTTP header appeared in the request or response, an
* item will appear in the array.
*
- * If the header did not exists, this method will return an empty array.
+ * If the header did not exist, this method will return an empty array.
*
* @return string[]
*/
@@ -92,7 +92,7 @@ interface MessageInterface
/**
* Updates a HTTP header.
*
- * The case-sensitity of the name value must be retained as-is.
+ * The case-sensitivity of the name value must be retained as-is.
*
* If the header already existed, it will be overwritten.
*
@@ -131,7 +131,7 @@ interface MessageInterface
/**
* Removes a HTTP header.
*
- * The specified header name must be treated as case-insenstive.
+ * The specified header name must be treated as case-insensitive.
* This method should return true if the header was successfully deleted,
* and false if the header did not exist.
*/
diff --git a/vendor/sabre/http/lib/Request.php b/vendor/sabre/http/lib/Request.php
index 496629a5b..b8395ff45 100644
--- a/vendor/sabre/http/lib/Request.php
+++ b/vendor/sabre/http/lib/Request.php
@@ -155,7 +155,7 @@ class Request extends Message implements RequestInterface
* If the full path is equal to the base url, this method will return an
* empty string.
*
- * This method will also urldecode the path, and if the url was incoded as
+ * This method will also urldecode the path, and if the url was encoded as
* ISO-8859-1, it will convert it to UTF-8.
*
* If the path is outside of the base url, a LogicException will be thrown.
diff --git a/vendor/sabre/http/lib/RequestDecorator.php b/vendor/sabre/http/lib/RequestDecorator.php
index 0ad24925f..23e790e7d 100644
--- a/vendor/sabre/http/lib/RequestDecorator.php
+++ b/vendor/sabre/http/lib/RequestDecorator.php
@@ -104,7 +104,7 @@ class RequestDecorator implements RequestInterface
* If the full path is equal to the base url, this method will return an
* empty string.
*
- * This method will also urldecode the path, and if the url was incoded as
+ * This method will also urldecode the path, and if the url was encoded as
* ISO-8859-1, it will convert it to UTF-8.
*
* If the path is outside of the base url, a LogicException will be thrown.
diff --git a/vendor/sabre/http/lib/RequestInterface.php b/vendor/sabre/http/lib/RequestInterface.php
index 83fa85bdc..5ec7777c6 100644
--- a/vendor/sabre/http/lib/RequestInterface.php
+++ b/vendor/sabre/http/lib/RequestInterface.php
@@ -67,7 +67,7 @@ interface RequestInterface extends MessageInterface
* If the full path is equal to the base url, this method will return an
* empty string.
*
- * This method will also urldecode the path, and if the url was incoded as
+ * This method will also urldecode the path, and if the url was encoded as
* ISO-8859-1, it will convert it to UTF-8.
*
* If the path is outside of the base url, a LogicException will be thrown.
diff --git a/vendor/sabre/http/lib/Response.php b/vendor/sabre/http/lib/Response.php
index 2369bb41e..c06c9637e 100644
--- a/vendor/sabre/http/lib/Response.php
+++ b/vendor/sabre/http/lib/Response.php
@@ -25,7 +25,7 @@ class Response extends Message implements ResponseInterface
200 => 'OK',
201 => 'Created',
202 => 'Accepted',
- 203 => 'Non-Authorative Information',
+ 203 => 'Non-Authoritative Information',
204 => 'No Content',
205 => 'Reset Content',
206 => 'Partial Content',
@@ -137,7 +137,7 @@ class Response extends Message implements ResponseInterface
/**
* Sets the HTTP status code.
*
- * This can be either the full HTTP status code with human readable string,
+ * This can be either the full HTTP status code with human-readable string,
* for example: "403 I can't let you do that, Dave".
*
* Or just the code, in which case the appropriate default message will be
diff --git a/vendor/sabre/http/lib/ResponseDecorator.php b/vendor/sabre/http/lib/ResponseDecorator.php
index 5f9fe7c65..30b9ec0e5 100644
--- a/vendor/sabre/http/lib/ResponseDecorator.php
+++ b/vendor/sabre/http/lib/ResponseDecorator.php
@@ -47,7 +47,7 @@ class ResponseDecorator implements ResponseInterface
/**
* Sets the HTTP status code.
*
- * This can be either the full HTTP status code with human readable string,
+ * This can be either the full HTTP status code with human-readable string,
* for example: "403 I can't let you do that, Dave".
*
* Or just the code, in which case the appropriate default message will be
diff --git a/vendor/sabre/http/lib/ResponseInterface.php b/vendor/sabre/http/lib/ResponseInterface.php
index 9bd93f179..fd73d25cd 100644
--- a/vendor/sabre/http/lib/ResponseInterface.php
+++ b/vendor/sabre/http/lib/ResponseInterface.php
@@ -28,7 +28,7 @@ interface ResponseInterface extends MessageInterface
/**
* Sets the HTTP status code.
*
- * This can be either the full HTTP status code with human readable string,
+ * This can be either the full HTTP status code with human-readable string,
* for example: "403 I can't let you do that, Dave".
*
* Or just the code, in which case the appropriate default message will be
diff --git a/vendor/sabre/http/lib/Sapi.php b/vendor/sabre/http/lib/Sapi.php
index 823d5df25..f8e8397fc 100644
--- a/vendor/sabre/http/lib/Sapi.php
+++ b/vendor/sabre/http/lib/Sapi.php
@@ -26,7 +26,7 @@ use InvalidArgumentException;
* * php://output
*
* You can choose to either call all these methods statically, but you can also
- * instantiate this as an object to allow for polymorhpism.
+ * instantiate this as an object to allow for polymorphism.
*
* @copyright Copyright (C) fruux GmbH (https://fruux.com/)
* @author Evert Pot (http://evertpot.com/)
@@ -89,41 +89,33 @@ class Sapi
if (null !== $contentLength) {
$output = fopen('php://output', 'wb');
if (is_resource($body) && 'stream' == get_resource_type($body)) {
- if (PHP_INT_SIZE > 4) {
- // use the dedicated function on 64 Bit systems
- // a workaround to make PHP more possible to use mmap based copy, see https://github.com/sabre-io/http/pull/119
- $left = (int) $contentLength;
- // copy with 4MiB chunks
- $chunk_size = 4 * 1024 * 1024;
- stream_set_chunk_size($output, $chunk_size);
- // If this is a partial response, flush the beginning bytes until the first position that is a multiple of the page size.
- $contentRange = $response->getHeader('Content-Range');
- // Matching "Content-Range: bytes 1234-5678/7890"
- if (null !== $contentRange && preg_match('/^bytes\s([0-9]+)-([0-9]+)\//i', $contentRange, $matches)) {
- // 4kB should be the default page size on most architectures
- $pageSize = 4096;
- $offset = (int) $matches[1];
- $delta = ($offset % $pageSize) > 0 ? ($pageSize - $offset % $pageSize) : 0;
- if ($delta > 0) {
- $left -= stream_copy_to_stream($body, $output, min($delta, $left));
- }
+ // a workaround to make PHP more possible to use mmap based copy, see https://github.com/sabre-io/http/pull/119
+ $left = (int) $contentLength;
+ // copy with 4MiB chunks
+ $chunk_size = 4 * 1024 * 1024;
+ stream_set_chunk_size($output, $chunk_size);
+ // If this is a partial response, flush the beginning bytes until the first position that is a multiple of the page size.
+ $contentRange = $response->getHeader('Content-Range');
+ // Matching "Content-Range: bytes 1234-5678/7890"
+ if (null !== $contentRange && preg_match('/^bytes\s([0-9]+)-([0-9]+)\//i', $contentRange, $matches)) {
+ // 4kB should be the default page size on most architectures
+ $pageSize = 4096;
+ $offset = (int) $matches[1];
+ $delta = ($offset % $pageSize) > 0 ? ($pageSize - $offset % $pageSize) : 0;
+ if ($delta > 0) {
+ $left -= stream_copy_to_stream($body, $output, min($delta, $left));
}
- while ($left > 0) {
- $copied = stream_copy_to_stream($body, $output, min($left, $chunk_size));
- // stream_copy_to_stream($src, $dest, $maxLength) must return the number of bytes copied or false in case of failure
- // But when the $maxLength is greater than the total number of bytes remaining in the stream,
- // It returns the negative number of bytes copied
- // So break the loop in such cases.
- if ($copied <= 0) {
- break;
- }
- $left -= $copied;
- }
- } else {
- // workaround for 32 Bit systems to avoid stream_copy_to_stream
- while (!feof($body)) {
- fwrite($output, fread($body, 8192));
+ }
+ while ($left > 0) {
+ $copied = stream_copy_to_stream($body, $output, min($left, $chunk_size));
+ // stream_copy_to_stream($src, $dest, $maxLength) must return the number of bytes copied or false in case of failure
+ // But when the $maxLength is greater than the total number of bytes remaining in the stream,
+ // It returns the negative number of bytes copied
+ // So break the loop in such cases.
+ if ($copied <= 0) {
+ break;
}
+ $left -= $copied;
}
} else {
fwrite($output, $body, (int) $contentLength);
@@ -215,7 +207,7 @@ class Sapi
// Normalizing it to be prettier
$header = strtolower(substr($key, 5));
- // Transforming dashes into spaces, and uppercasing
+ // Transforming dashes into spaces, and upper-casing
// every first letter.
$header = ucwords(str_replace('_', ' ', $header));
diff --git a/vendor/sabre/http/lib/Version.php b/vendor/sabre/http/lib/Version.php
index f182979c6..47582f22e 100644
--- a/vendor/sabre/http/lib/Version.php
+++ b/vendor/sabre/http/lib/Version.php
@@ -16,5 +16,5 @@ class Version
/**
* Full version number.
*/
- const VERSION = '5.1.3';
+ const VERSION = '5.1.6';
}
diff --git a/vendor/sabre/http/lib/functions.php b/vendor/sabre/http/lib/functions.php
index 97673da46..d0477d943 100644
--- a/vendor/sabre/http/lib/functions.php
+++ b/vendor/sabre/http/lib/functions.php
@@ -349,7 +349,7 @@ function parseMimeType(string $str): array
// The quality parameter, if it appears, also marks the end of
// the parameter list. Anything after the q= counts as an
// 'accept extension' and could introduce new semantics in
- // content-negotation.
+ // content-negotiation.
if ('q' !== $partName) {
$parameters[$partName] = $part;
} else {
@@ -404,11 +404,9 @@ function decodePath(string $path): string
function decodePathSegment(string $path): string
{
$path = rawurldecode($path);
- $encoding = mb_detect_encoding($path, ['UTF-8', 'ISO-8859-1']);
- switch ($encoding) {
- case 'ISO-8859-1':
- $path = utf8_encode($path);
+ if (!mb_check_encoding($path, 'UTF-8') && mb_check_encoding($path, 'ISO-8859-1')) {
+ $path = mb_convert_encoding($path, 'UTF-8', 'ISO-8859-1');
}
return $path;
diff --git a/vendor/sabre/uri/.gitattributes b/vendor/sabre/uri/.gitattributes
deleted file mode 100644
index d1618f3a1..000000000
--- a/vendor/sabre/uri/.gitattributes
+++ /dev/null
@@ -1,4 +0,0 @@
-/tests export-ignore
-/.travis.yml export-ignore
-/CHANGELOG.md export-ignore
-/README.md export-ignore
diff --git a/vendor/sabre/uri/.github/workflows/ci.yml b/vendor/sabre/uri/.github/workflows/ci.yml
deleted file mode 100644
index 3473cd2de..000000000
--- a/vendor/sabre/uri/.github/workflows/ci.yml
+++ /dev/null
@@ -1,63 +0,0 @@
-name: continuous-integration
-on:
- push:
- branches:
- - master
- - release/*
- pull_request:
-jobs:
- unit-testing:
- name: PHPUnit (PHP ${{ matrix.php-versions }})
- runs-on: ubuntu-latest
- strategy:
- fail-fast: false
- matrix:
- php-versions: ['7.2', '7.3', '7.4', '8.0', '8.1']
- coverage: ['pcov']
- code-analysis: ['no']
- include:
- - php-versions: '7.1'
- coverage: 'none'
- code-analysis: 'yes'
- steps:
- - name: Checkout
- uses: actions/checkout@v2
-
- - name: Setup PHP, with composer and extensions
- uses: shivammathur/setup-php@v2 #https://github.com/shivammathur/setup-php
- with:
- php-version: ${{ matrix.php-versions }}
- extensions: mbstring, dom, fileinfo, mysql, redis, opcache
- coverage: ${{ matrix.coverage }}
- tools: composer
-
- - name: Get composer cache directory
- id: composer-cache
- run: echo "::set-output name=dir::$(composer config cache-files-dir)"
-
- - name: Cache composer dependencies
- uses: actions/cache@v2
- with:
- path: ${{ steps.composer-cache.outputs.dir }}
- # Use composer.json for key, if composer.lock is not committed.
- # key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
- key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
- restore-keys: ${{ runner.os }}-composer-
-
- - name: Install composer dependencies
- run: composer install --no-progress --prefer-dist --optimize-autoloader
-
- - name: Code Analysis (PHP CS-Fixer)
- if: matrix.code-analysis == 'yes'
- run: php vendor/bin/php-cs-fixer fix --dry-run --diff
-
- - name: Code Analysis (PHPStan)
- if: matrix.code-analysis == 'yes'
- run: composer phpstan
-
- - name: Test with phpunit
- run: vendor/bin/phpunit --configuration tests/phpunit.xml --coverage-clover clover.xml
-
- - name: Code Coverage
- uses: codecov/codecov-action@v2
- if: matrix.coverage != 'none'
diff --git a/vendor/sabre/uri/.gitignore b/vendor/sabre/uri/.gitignore
deleted file mode 100644
index a6c2b5a25..000000000
--- a/vendor/sabre/uri/.gitignore
+++ /dev/null
@@ -1,8 +0,0 @@
-# Composer
-vendor/
-composer.lock
-
-# Tests
-tests/cov/
-tests/.phpunit.result.cache
-.php_cs.cache
diff --git a/vendor/sabre/uri/.php_cs.dist b/vendor/sabre/uri/.php-cs-fixer.dist.php
index c5c78a971..87337520b 100644
--- a/vendor/sabre/uri/.php_cs.dist
+++ b/vendor/sabre/uri/.php-cs-fixer.dist.php
@@ -1,12 +1,13 @@
<?php
-$config = PhpCsFixer\Config::create();
-$config->getFinder()
+$finder = PhpCsFixer\Finder::create()
->exclude('vendor')
->in(__DIR__);
+
+$config = new PhpCsFixer\Config();
$config->setRules([
'@PSR1' => true,
'@Symfony' => true
]);
-
+$config->setFinder($finder);
return $config; \ No newline at end of file
diff --git a/vendor/sabre/uri/composer.json b/vendor/sabre/uri/composer.json
index d58fd51f7..0e0cf2d36 100644
--- a/vendor/sabre/uri/composer.json
+++ b/vendor/sabre/uri/composer.json
@@ -9,7 +9,7 @@
"homepage": "http://sabre.io/uri/",
"license": "BSD-3-Clause",
"require": {
- "php": "^7.1 || ^8.0"
+ "php": "^7.4 || ^8.0"
},
"authors": [
{
@@ -37,9 +37,9 @@
}
},
"require-dev": {
- "friendsofphp/php-cs-fixer": "~2.17.1",
- "phpstan/phpstan": "^0.12",
- "phpunit/phpunit" : "^7.5 || ^8.5 || ^9.0"
+ "friendsofphp/php-cs-fixer": "^3.9",
+ "phpstan/phpstan": "^1.8",
+ "phpunit/phpunit" : "^9.0"
},
"scripts": {
"phpstan": [
diff --git a/vendor/sabre/uri/lib/Version.php b/vendor/sabre/uri/lib/Version.php
index 4527a0d8a..e4f289e90 100644
--- a/vendor/sabre/uri/lib/Version.php
+++ b/vendor/sabre/uri/lib/Version.php
@@ -16,5 +16,5 @@ class Version
/**
* Full version number.
*/
- const VERSION = '2.2.2';
+ public const VERSION = '2.3.2';
}
diff --git a/vendor/sabre/uri/lib/functions.php b/vendor/sabre/uri/lib/functions.php
index 18a324337..64e64027f 100644
--- a/vendor/sabre/uri/lib/functions.php
+++ b/vendor/sabre/uri/lib/functions.php
@@ -54,8 +54,8 @@ function resolve(string $basePath, string $newPath): string
$path = $delta['path'];
} else {
// Removing last component from base path.
- $path = $base['path'];
- $length = strrpos((string) $path, '/');
+ $path = (string) $base['path'];
+ $length = strrpos($path, '/');
if (false !== $length) {
$path = substr($path, 0, $length);
}
@@ -69,7 +69,7 @@ function resolve(string $basePath, string $newPath): string
$newPathParts = [];
foreach ($pathParts as $pathPart) {
switch ($pathPart) {
- //case '' :
+ // case '' :
case '.':
break;
case '..':
@@ -174,13 +174,16 @@ function normalize(string $uri): string
* Unlike PHP's parse_url, it will also convert any non-ascii characters to
* percent-encoded strings. PHP's parse_url corrupts these characters on OS X.
*
- * @return array<string, string>
+ * In the return array, key "port" is an int value. Other keys have a string value.
+ * "Unused" keys have value null.
+ *
+ * @return array{scheme: string|null, host: string|null, path: string|null, port: positive-int|null, user: string|null, query: string|null, fragment: string|null}
*
* @throws InvalidUriException
*/
function parse(string $uri): array
{
- // Normally a URI must be ASCII, however. However, often it's not and
+ // Normally a URI must be ASCII. However, often it's not and
// parse_url might corrupt these strings.
//
// For that reason we take any non-ascii characters from the uri and
@@ -193,11 +196,25 @@ function parse(string $uri): array
$uri
);
+ if (null === $uri) {
+ throw new InvalidUriException('Invalid, or could not parse URI');
+ }
+
$result = parse_url($uri);
if (!$result) {
$result = _parse_fallback($uri);
}
+ /*
+ * phpstan is not able to process all the things that happen while this function
+ * constructs the result array. It only understands the $result is
+ * non-empty-array<string, mixed>
+ *
+ * But the detail of the returned array is correctly specified in the PHPdoc
+ * above the function call.
+ *
+ * @phpstan-ignore-next-line
+ */
return
$result + [
'scheme' => null,
@@ -309,6 +326,10 @@ function _parse_fallback(string $uri): array
$uri
);
+ if (null === $uri) {
+ throw new InvalidUriException('Invalid, or could not parse URI');
+ }
+
$result = [
'scheme' => null,
'host' => null,
@@ -341,15 +362,13 @@ function _parse_fallback(string $uri): array
$result['host'] = '';
} elseif ('//' === substr($uri, 0, 2)) {
// Uris that have an authority part.
- $regex = '
- %^
+ $regex = '%^
//
(?: (?<user> [^:@]+) (: (?<pass> [^@]+)) @)?
(?<host> ( [^:/]* | \[ [^\]]+ \] ))
(?: : (?<port> [0-9]+))?
(?<path> / .*)?
- $%x
- ';
+ $%x';
if (!preg_match($regex, $uri, $matches)) {
throw new InvalidUriException('Invalid, or could not parse URI');
}
diff --git a/vendor/sabre/uri/phpstan.neon b/vendor/sabre/uri/phpstan.neon
deleted file mode 100644
index 91375db8b..000000000
--- a/vendor/sabre/uri/phpstan.neon
+++ /dev/null
@@ -1,2 +0,0 @@
-parameters:
- level: 7
diff --git a/vendor/sabre/vobject/.github/workflows/ci.yml b/vendor/sabre/vobject/.github/workflows/ci.yml
deleted file mode 100644
index 3a019fe77..000000000
--- a/vendor/sabre/vobject/.github/workflows/ci.yml
+++ /dev/null
@@ -1,63 +0,0 @@
-name: continuous-integration
-on:
- push:
- branches:
- - master
- - release/*
- pull_request:
-jobs:
- unit-testing:
- name: PHPUnit (PHP ${{ matrix.php-versions }})
- runs-on: ubuntu-latest
- strategy:
- fail-fast: false
- matrix:
- php-versions: ['7.2', '7.3', '7.4', '8.0', '8.1']
- coverage: ['pcov']
- code-analysis: ['no']
- include:
- - php-versions: '7.1'
- coverage: 'none'
- code-analysis: 'yes'
- steps:
- - name: Checkout
- uses: actions/checkout@v2
-
- - name: Setup PHP, with composer and extensions
- uses: shivammathur/setup-php@v2 #https://github.com/shivammathur/setup-php
- with:
- php-version: ${{ matrix.php-versions }}
- extensions: mbstring, dom, fileinfo, mysql, redis, opcache
- coverage: ${{ matrix.coverage }}
- tools: composer
-
- - name: Get composer cache directory
- id: composer-cache
- run: echo "::set-output name=dir::$(composer config cache-files-dir)"
-
- - name: Cache composer dependencies
- uses: actions/cache@v2
- with:
- path: ${{ steps.composer-cache.outputs.dir }}
- # Use composer.json for key, if composer.lock is not committed.
- # key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
- key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
- restore-keys: ${{ runner.os }}-composer-
-
- - name: Install composer dependencies
- run: composer install --no-progress --prefer-dist --optimize-autoloader
-
- - name: Code Analysis (PHP CS-Fixer)
- if: matrix.code-analysis == 'yes'
- run: php vendor/bin/php-cs-fixer fix --dry-run --diff
-
- - name: Code Analysis (PHPStan)
- if: matrix.code-analysis == 'yes'
- run: composer phpstan
-
- - name: Test with phpunit
- run: vendor/bin/phpunit --configuration tests/phpunit.xml --coverage-clover clover.xml
-
- - name: Code Coverage
- uses: codecov/codecov-action@v2
- if: matrix.coverage != 'none'
diff --git a/vendor/sabre/vobject/lib/Cli.php b/vendor/sabre/vobject/lib/Cli.php
index 816e2cb31..3bde16f9c 100644
--- a/vendor/sabre/vobject/lib/Cli.php
+++ b/vendor/sabre/vobject/lib/Cli.php
@@ -456,7 +456,7 @@ HELP
*/
protected function color($vObj)
{
- fwrite($this->stdout, $this->serializeComponent($vObj));
+ $this->serializeComponent($vObj);
}
/**
diff --git a/vendor/sabre/vobject/lib/Component.php b/vendor/sabre/vobject/lib/Component.php
index f33b628a7..a929387a3 100644
--- a/vendor/sabre/vobject/lib/Component.php
+++ b/vendor/sabre/vobject/lib/Component.php
@@ -28,7 +28,7 @@ class Component extends Node
/**
* A list of properties and/or sub-components.
*
- * @var array
+ * @var array<string, Component|Property>
*/
protected $children = [];
@@ -43,12 +43,12 @@ class Component extends Node
* an iCalendar object, this may be something like CALSCALE:GREGORIAN. To
* ensure that this does not happen, set $defaults to false.
*
- * @param string $name such as VCALENDAR, VEVENT
- * @param bool $defaults
+ * @param string|null $name such as VCALENDAR, VEVENT
+ * @param bool $defaults
*/
public function __construct(Document $root, $name, array $children = [], $defaults = true)
{
- $this->name = strtoupper($name);
+ $this->name = isset($name) ? strtoupper($name) : '';
$this->root = $root;
if ($defaults) {
@@ -238,7 +238,7 @@ class Component extends Node
return array_filter(
$result,
function ($child) use ($group) {
- return $child instanceof Property && strtoupper($child->group) === $group;
+ return $child instanceof Property && (null !== $child->group ? strtoupper($child->group) : '') === $group;
}
);
}
@@ -249,7 +249,7 @@ class Component extends Node
$result = [];
foreach ($this->children as $childGroup) {
foreach ($childGroup as $child) {
- if ($child instanceof Property && strtoupper($child->group) === $group) {
+ if ($child instanceof Property && (null !== $child->group ? strtoupper($child->group) : '') === $group) {
$result[] = $child;
}
}
diff --git a/vendor/sabre/vobject/lib/Component/VCard.php b/vendor/sabre/vobject/lib/Component/VCard.php
index eac789842..90a6df72f 100644
--- a/vendor/sabre/vobject/lib/Component/VCard.php
+++ b/vendor/sabre/vobject/lib/Component/VCard.php
@@ -291,6 +291,11 @@ class VCard extends VObject\Document
$this->FN = (string) $this->ORG;
$repaired = true;
+ // Otherwise, the NICKNAME property may work
+ } elseif (isset($this->NICKNAME)) {
+ $this->FN = (string) $this->NICKNAME;
+ $repaired = true;
+
// Otherwise, the EMAIL property may work
} elseif (isset($this->EMAIL)) {
$this->FN = (string) $this->EMAIL;
diff --git a/vendor/sabre/vobject/lib/Parameter.php b/vendor/sabre/vobject/lib/Parameter.php
index 7e4d55743..c27b2aa47 100644
--- a/vendor/sabre/vobject/lib/Parameter.php
+++ b/vendor/sabre/vobject/lib/Parameter.php
@@ -52,11 +52,12 @@ class Parameter extends Node
*/
public function __construct(Document $root, $name, $value = null)
{
- $this->name = strtoupper($name);
$this->root = $root;
if (is_null($name)) {
$this->noName = true;
$this->name = static::guessParameterNameByValue($value);
+ } else {
+ $this->name = strtoupper($name);
}
// If guessParameterNameByValue() returns an empty string
diff --git a/vendor/sabre/vobject/lib/Parser/MimeDir.php b/vendor/sabre/vobject/lib/Parser/MimeDir.php
index db0f81531..513f7bd0c 100644
--- a/vendor/sabre/vobject/lib/Parser/MimeDir.php
+++ b/vendor/sabre/vobject/lib/Parser/MimeDir.php
@@ -167,7 +167,11 @@ class MimeDir extends Parser
while (true) {
// Reading until we hit END:
- $line = $this->readLine();
+ try {
+ $line = $this->readLine();
+ } catch (EofException $oEx) {
+ $line = 'END:'.$this->root->name;
+ }
if ('END:' === strtoupper(substr($line, 0, 4))) {
break;
}
@@ -372,12 +376,22 @@ class MimeDir extends Parser
$value = $this->unescapeParam($value);
if (is_null($lastParam)) {
+ if ($this->options & self::OPTION_IGNORE_INVALID_LINES) {
+ // When the property can't be matched and the configuration
+ // option is set to ignore invalid lines, we ignore this line
+ // This can happen when servers provide faulty data as iCloud
+ // frequently does with X-APPLE-STRUCTURED-LOCATION
+ continue;
+ }
throw new ParseException('Invalid Mimedir file. Line starting at '.$this->startLine.' did not follow iCalendar/vCard conventions');
}
if (is_null($property['parameters'][$lastParam])) {
$property['parameters'][$lastParam] = $value;
} elseif (is_array($property['parameters'][$lastParam])) {
$property['parameters'][$lastParam][] = $value;
+ } elseif ($property['parameters'][$lastParam] === $value) {
+ // When the current value of the parameter is the same as the
+ // new one, then we can leave the current parameter as it is.
} else {
$property['parameters'][$lastParam] = [
$property['parameters'][$lastParam],
@@ -450,10 +464,8 @@ class MimeDir extends Parser
switch (strtolower($charset)) {
case 'utf-8':
break;
- case 'iso-8859-1':
- $property['value'] = utf8_encode($property['value']);
- break;
case 'windows-1252':
+ case 'iso-8859-1':
$property['value'] = mb_convert_encoding($property['value'], 'UTF-8', $charset);
break;
default:
diff --git a/vendor/sabre/vobject/lib/Property.php b/vendor/sabre/vobject/lib/Property.php
index 50cda9684..56096dafe 100644
--- a/vendor/sabre/vobject/lib/Property.php
+++ b/vendor/sabre/vobject/lib/Property.php
@@ -30,7 +30,7 @@ abstract class Property extends Node
*
* This is only used in vcards
*
- * @var string
+ * @var string|null
*/
public $group;
diff --git a/vendor/sabre/vobject/lib/Property/ICalendar/CalAddress.php b/vendor/sabre/vobject/lib/Property/ICalendar/CalAddress.php
index 2dbbc6eaf..c90967d79 100644
--- a/vendor/sabre/vobject/lib/Property/ICalendar/CalAddress.php
+++ b/vendor/sabre/vobject/lib/Property/ICalendar/CalAddress.php
@@ -53,7 +53,11 @@ class CalAddress extends Text
return $input;
}
list($schema, $everythingElse) = explode(':', $input, 2);
+ $schema = strtolower($schema);
+ if ('mailto' === $schema) {
+ $everythingElse = strtolower($everythingElse);
+ }
- return strtolower($schema).':'.$everythingElse;
+ return $schema.':'.$everythingElse;
}
}
diff --git a/vendor/sabre/vobject/lib/Property/Text.php b/vendor/sabre/vobject/lib/Property/Text.php
index ac8aa066b..16d2c07f4 100644
--- a/vendor/sabre/vobject/lib/Property/Text.php
+++ b/vendor/sabre/vobject/lib/Property/Text.php
@@ -136,16 +136,18 @@ class Text extends Property
}
foreach ($item as &$subItem) {
- $subItem = strtr(
- $subItem,
- [
- '\\' => '\\\\',
- ';' => '\;',
- ',' => '\,',
- "\n" => '\n',
- "\r" => '',
- ]
- );
+ if (!is_null($subItem)) {
+ $subItem = strtr(
+ $subItem,
+ [
+ '\\' => '\\\\',
+ ';' => '\;',
+ ',' => '\,',
+ "\n" => '\n',
+ "\r" => '',
+ ]
+ );
+ }
}
$item = implode(',', $item);
}
diff --git a/vendor/sabre/vobject/lib/Recur/RRuleIterator.php b/vendor/sabre/vobject/lib/Recur/RRuleIterator.php
index d556aa6c3..4f0e9070d 100644
--- a/vendor/sabre/vobject/lib/Recur/RRuleIterator.php
+++ b/vendor/sabre/vobject/lib/Recur/RRuleIterator.php
@@ -25,6 +25,13 @@ use Sabre\VObject\Property;
class RRuleIterator implements Iterator
{
/**
+ * Constant denoting the upper limit on how long into the future
+ * we want to iterate. The value is a unix timestamp and currently
+ * corresponds to the datetime 9999-12-31 11:59:59 UTC.
+ */
+ const dateUpperLimit = 253402300799;
+
+ /**
* Creates the Iterator.
*
* @param string|array $rrule
@@ -366,6 +373,12 @@ class RRuleIterator implements Iterator
// Current hour of the day
$currentHour = $this->currentDate->format('G');
+
+ if ($this->currentDate->getTimestamp() > self::dateUpperLimit) {
+ $this->currentDate = null;
+
+ return;
+ }
} while (
($this->byDay && !in_array($currentDay, $recurrenceDays)) ||
($this->byHour && !in_array($currentHour, $recurrenceHours)) ||
@@ -486,7 +499,7 @@ class RRuleIterator implements Iterator
// To prevent running this forever (better: until we hit the max date of DateTimeImmutable) we simply
// stop at 9999-12-31. Looks like the year 10000 problem is not solved in php ....
- if ($this->currentDate->getTimestamp() > 253402300799) {
+ if ($this->currentDate->getTimestamp() > self::dateUpperLimit) {
$this->currentDate = null;
return;
@@ -589,11 +602,12 @@ class RRuleIterator implements Iterator
// loop through all YearDay and Days to check all the combinations
foreach ($this->byYearDay as $byYearDay) {
$date = clone $this->currentDate;
- $date = $date->setDate($currentYear, 1, 1);
if ($byYearDay > 0) {
- $date = $date->add(new \DateInterval('P'.$byYearDay.'D'));
+ $date = $date->setDate($currentYear, 1, 1);
+ $date = $date->add(new \DateInterval('P'.($byYearDay - 1).'D'));
} else {
- $date = $date->sub(new \DateInterval('P'.abs($byYearDay).'D'));
+ $date = $date->setDate($currentYear, 12, 31);
+ $date = $date->sub(new \DateInterval('P'.abs($byYearDay + 1).'D'));
}
if ($date > $this->currentDate && in_array($date->format('N'), $dayOffsets)) {
@@ -658,6 +672,14 @@ class RRuleIterator implements Iterator
(int) $currentMonth,
(int) $currentDayOfMonth
);
+
+ // To prevent running this forever (better: until we hit the max date of DateTimeImmutable) we simply
+ // stop at 9999-12-31. Looks like the year 10000 problem is not solved in php ....
+ if ($this->currentDate->getTimestamp() > self::dateUpperLimit) {
+ $this->currentDate = null;
+
+ return;
+ }
}
// If we made it here, it means we got a valid occurrence
diff --git a/vendor/sabre/vobject/lib/StringUtil.php b/vendor/sabre/vobject/lib/StringUtil.php
index 2333d6ab9..b04539e4a 100644
--- a/vendor/sabre/vobject/lib/StringUtil.php
+++ b/vendor/sabre/vobject/lib/StringUtil.php
@@ -40,23 +40,11 @@ class StringUtil
*/
public static function convertToUTF8($str)
{
- $encoding = mb_detect_encoding($str, ['UTF-8', 'ISO-8859-1', 'WINDOWS-1252'], true);
-
- switch ($encoding) {
- case 'ISO-8859-1':
- $newStr = utf8_encode($str);
- break;
- /* Unreachable code. Not sure yet how we can improve this
- * situation.
- case 'WINDOWS-1252' :
- $newStr = iconv('cp1252', 'UTF-8', $str);
- break;
- */
- default:
- $newStr = $str;
+ if (!mb_check_encoding($str, 'UTF-8') && mb_check_encoding($str, 'ISO-8859-1')) {
+ $str = mb_convert_encoding($str, 'UTF-8', 'ISO-8859-1');
}
// Removing any control characters
- return preg_replace('%(?:[\x00-\x08\x0B-\x0C\x0E-\x1F\x7F])%', '', $newStr);
+ return preg_replace('%(?:[\x00-\x08\x0B-\x0C\x0E-\x1F\x7F])%', '', $str);
}
}
diff --git a/vendor/sabre/vobject/lib/VCardConverter.php b/vendor/sabre/vobject/lib/VCardConverter.php
index 04932fe67..04129e355 100644
--- a/vendor/sabre/vobject/lib/VCardConverter.php
+++ b/vendor/sabre/vobject/lib/VCardConverter.php
@@ -140,6 +140,8 @@ class VCardConverter
$newProperty = $output->createProperty('X-ADDRESSBOOKSERVER-KIND', 'GROUP');
break;
}
+ } elseif ('MEMBER' === $property->name) {
+ $newProperty = $output->createProperty('X-ADDRESSBOOKSERVER-MEMBER', $property->getValue());
}
} elseif (Document::VCARD40 === $targetVersion) {
// These properties were removed in vCard 4.0
@@ -173,6 +175,9 @@ class VCardConverter
$newProperty = $output->createProperty('KIND', 'GROUP');
}
break;
+ case 'X-ADDRESSBOOKSERVER-MEMBER':
+ $newProperty = $output->createProperty('MEMBER', $property->getValue());
+ break;
case 'X-ANNIVERSARY':
$newProperty->name = 'ANNIVERSARY';
// If we already have an anniversary property with the same
diff --git a/vendor/sabre/vobject/lib/Version.php b/vendor/sabre/vobject/lib/Version.php
index 64938bf0b..92882f2f1 100644
--- a/vendor/sabre/vobject/lib/Version.php
+++ b/vendor/sabre/vobject/lib/Version.php
@@ -14,5 +14,5 @@ class Version
/**
* Full version number.
*/
- const VERSION = '4.4.1';
+ const VERSION = '4.5.1';
}