aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/sabre
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2022-10-11 18:29:06 +0000
committerMario <mario@mariovavti.com>2022-10-11 18:29:06 +0000
commitccd826f63a7a4c7e442fab8a70d9c4c84808b417 (patch)
treefbbde69114acba764cf6b735433c53e099fd19c5 /vendor/sabre
parent5e5f0aa955d86743a14531bed98501b59140ab1f (diff)
downloadvolse-hubzilla-ccd826f63a7a4c7e442fab8a70d9c4c84808b417.tar.gz
volse-hubzilla-ccd826f63a7a4c7e442fab8a70d9c4c84808b417.tar.bz2
volse-hubzilla-ccd826f63a7a4c7e442fab8a70d9c4c84808b417.zip
Revert "update composer libs"
This reverts commit 5e5f0aa955d86743a14531bed98501b59140ab1f.
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.dist (renamed from vendor/sabre/uri/.php-cs-fixer.dist.php)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, 309 insertions, 238 deletions
diff --git a/vendor/sabre/dav/README.md b/vendor/sabre/dav/README.md
index 32ca1c3fa..acdb1e03c 100644
--- a/vendor/sabre/dav/README.md
+++ b/vendor/sabre/dav/README.md
@@ -14,17 +14,16 @@ http://sabre.io/
Build status
------------
-| 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 |
+| 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 |
Documentation
-------------
diff --git a/vendor/sabre/dav/lib/DAV/CorePlugin.php b/vendor/sabre/dav/lib/DAV/CorePlugin.php
index dbd8976b1..74350c28d 100644
--- a/vendor/sabre/dav/lib/DAV/CorePlugin.php
+++ b/vendor/sabre/dav/lib/DAV/CorePlugin.php
@@ -645,10 +645,6 @@ 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;
@@ -657,7 +653,6 @@ 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 edfb7fa5c..13a4399e3 100644
--- a/vendor/sabre/dav/lib/DAV/StringUtil.php
+++ b/vendor/sabre/dav/lib/DAV/StringUtil.php
@@ -77,8 +77,10 @@ class StringUtil
*/
public static function ensureUTF8($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');
+ $encoding = mb_detect_encoding($input, ['UTF-8', 'ISO-8859-1'], true);
+
+ if ('ISO-8859-1' === $encoding) {
+ return utf8_encode($input);
} else {
return $input;
}
diff --git a/vendor/sabre/dav/lib/DAV/Version.php b/vendor/sabre/dav/lib/DAV/Version.php
index c6273ef72..f8b56bb98 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.4.0';
+ public const VERSION = '4.3.1';
}
diff --git a/vendor/sabre/http/.github/workflows/ci.yml b/vendor/sabre/http/.github/workflows/ci.yml
index cbb681e53..91b509bf0 100644
--- a/vendor/sabre/http/.github/workflows/ci.yml
+++ b/vendor/sabre/http/.github/workflows/ci.yml
@@ -13,10 +13,11 @@ jobs:
fail-fast: false
matrix:
php-versions: ['7.2', '7.3', '7.4', '8.0', '8.1']
- coverage: ['xdebug']
+ coverage: ['pcov']
code-analysis: ['no']
include:
- php-versions: '7.1'
+ coverage: 'none'
code-analysis: 'yes'
steps:
- name: Checkout
@@ -26,7 +27,7 @@ jobs:
uses: shivammathur/setup-php@v2 #https://github.com/shivammathur/setup-php
with:
php-version: ${{ matrix.php-versions }}
- extensions: ctype, curl, mbstring, xdebug
+ extensions: ctype, curl, mbstring
coverage: ${{ matrix.coverage }}
tools: composer
diff --git a/vendor/sabre/http/CHANGELOG.md b/vendor/sabre/http/CHANGELOG.md
index 2dddce4fb..4db8cc772 100644
--- a/vendor/sabre/http/CHANGELOG.md
+++ b/vendor/sabre/http/CHANGELOG.md
@@ -1,23 +1,6 @@
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)
------------------
@@ -89,7 +72,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 everywhere this is applicable.
+* Strict typing is used every where 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`
@@ -108,7 +91,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)
@@ -296,7 +279,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 its behavior, so be careful.
+ existing Message::getBody changed it's 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 2f01c1448..8159b4d49 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 its interface:
+You should always typehint on it's 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 an instance of
+2. The `Sapi::getRequest` factory always returns a instance of
`Request` so you would have to override the factory method as well,
-3. By controlling the instantiation and depend on specific `Request` and
+3. By controlling the instantation 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 unit test.
+but could also be somewhere in a unittest.
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 your $remoteUrl doesn't end with a slash, this one probably shouldn't
+// If youre $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 encoded as
+ * This method will also urldecode the path, and if the url was incoded as
* ISO-8859-1, it will convert it to UTF-8.
*
- * If the path is outside the base url, a LogicException will be thrown.
+ * If the path is outside of the base url, a LogicException will be thrown.
*
* @return string
*/
@@ -491,7 +491,7 @@ function getBodyAsStream();
function getBodyAsString();
/**
- * Returns the message body, as its internal representation.
+ * Returns the message body, as it's 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 its name.
+ * Returns a specific HTTP header, based on it's name.
*
* The name must be treated as case-insensitive.
*
@@ -529,7 +529,7 @@ function getHeader($name);
/**
* Updates a HTTP header.
*
- * The case-sensitivity of the name value must be retained as-is.
+ * The case-sensitity 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-insensitive.
+ * The specified header name must be treated as case-insenstive.
* 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 its internal representation.
+ * Returns the message body, as it's 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 its name.
+ * Returns a specific HTTP header, based on it's name.
*
* The name must be treated as case-insensitive.
*
@@ -674,7 +674,7 @@ function getHeader($name);
/**
* Updates a HTTP header.
*
- * The case-sensitivity of the name value must be retained as-is.
+ * The case-sensitity 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-insensitive.
+ * The specified header name must be treated as case-insenstive.
* 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 07f451bc0..645f07edd 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 status code (401) to force
+ * This method sends the needed HTTP header and statuscode (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 c1bad1a5b..d04b4a811 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 status code (401) to force
+ * This method sends the needed HTTP header and statuscode (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 580e23941..988bb29d2 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 status code (401) to force
+ * This method sends the needed HTTP header and statuscode (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 e80e78305..a093d8b75 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();
+ $body = $this->request->getBody($asString = true);
$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 compatible with mod_php format and other webservers.
+ * It should be compatibile 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 2bc7483a7..99ffcf8cb 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
- * successfully.
+ * succesfully.
*
* 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 = [];
/**
- * Whether exceptions should be thrown when a HTTP error is returned.
+ * Wether or not 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 dc57ca903..6474f38d2 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 its internal representation.
+ * Returns the message body, as it's 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 its name.
+ * Returns a specific HTTP header, based on it's 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 exist, this method will return an empty array.
+ * If the header did not exists, 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 191ba0f74..6f49dadfc 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 its internal representation.
+ * Returns the message body, as it's internal representation.
*
* This could be either a string or a stream.
*
@@ -91,7 +91,7 @@ trait MessageDecoratorTrait
}
/**
- * Returns a specific HTTP header, based on its name.
+ * Returns a specific HTTP header, based on it's 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 exist, this method will return an empty array.
+ * If the header did not exists, 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 4531654bc..8504f0f59 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 its internal representation.
+ * Returns the message body, as it's 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 its name.
+ * Returns a specific HTTP header, based on it's 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 exist, this method will return an empty array.
+ * If the header did not exists, this method will return an empty array.
*
* @return string[]
*/
@@ -92,7 +92,7 @@ interface MessageInterface
/**
* Updates a HTTP header.
*
- * The case-sensitivity of the name value must be retained as-is.
+ * The case-sensitity 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-insensitive.
+ * The specified header name must be treated as case-insenstive.
* 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 b8395ff45..496629a5b 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 encoded as
+ * This method will also urldecode the path, and if the url was incoded 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 23e790e7d..0ad24925f 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 encoded as
+ * This method will also urldecode the path, and if the url was incoded 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 5ec7777c6..83fa85bdc 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 encoded as
+ * This method will also urldecode the path, and if the url was incoded 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 c06c9637e..2369bb41e 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-Authoritative Information',
+ 203 => 'Non-Authorative 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 30b9ec0e5..5f9fe7c65 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 fd73d25cd..9bd93f179 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 f8e8397fc..823d5df25 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 polymorphism.
+ * instantiate this as an object to allow for polymorhpism.
*
* @copyright Copyright (C) fruux GmbH (https://fruux.com/)
* @author Evert Pot (http://evertpot.com/)
@@ -89,33 +89,41 @@ class Sapi
if (null !== $contentLength) {
$output = fopen('php://output', 'wb');
if (is_resource($body) && 'stream' == get_resource_type($body)) {
- // 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));
+ 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));
+ }
}
- }
- 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;
+ 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));
}
- $left -= $copied;
}
} else {
fwrite($output, $body, (int) $contentLength);
@@ -207,7 +215,7 @@ class Sapi
// Normalizing it to be prettier
$header = strtolower(substr($key, 5));
- // Transforming dashes into spaces, and upper-casing
+ // Transforming dashes into spaces, and uppercasing
// 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 47582f22e..f182979c6 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.6';
+ const VERSION = '5.1.3';
}
diff --git a/vendor/sabre/http/lib/functions.php b/vendor/sabre/http/lib/functions.php
index d0477d943..97673da46 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-negotiation.
+ // content-negotation.
if ('q' !== $partName) {
$parameters[$partName] = $part;
} else {
@@ -404,9 +404,11 @@ function decodePath(string $path): string
function decodePathSegment(string $path): string
{
$path = rawurldecode($path);
+ $encoding = mb_detect_encoding($path, ['UTF-8', 'ISO-8859-1']);
- if (!mb_check_encoding($path, 'UTF-8') && mb_check_encoding($path, 'ISO-8859-1')) {
- $path = mb_convert_encoding($path, 'UTF-8', 'ISO-8859-1');
+ switch ($encoding) {
+ case 'ISO-8859-1':
+ $path = utf8_encode($path);
}
return $path;
diff --git a/vendor/sabre/uri/.gitattributes b/vendor/sabre/uri/.gitattributes
new file mode 100644
index 000000000..d1618f3a1
--- /dev/null
+++ b/vendor/sabre/uri/.gitattributes
@@ -0,0 +1,4 @@
+/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
new file mode 100644
index 000000000..3473cd2de
--- /dev/null
+++ b/vendor/sabre/uri/.github/workflows/ci.yml
@@ -0,0 +1,63 @@
+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
new file mode 100644
index 000000000..a6c2b5a25
--- /dev/null
+++ b/vendor/sabre/uri/.gitignore
@@ -0,0 +1,8 @@
+# Composer
+vendor/
+composer.lock
+
+# Tests
+tests/cov/
+tests/.phpunit.result.cache
+.php_cs.cache
diff --git a/vendor/sabre/uri/.php-cs-fixer.dist.php b/vendor/sabre/uri/.php_cs.dist
index 87337520b..c5c78a971 100644
--- a/vendor/sabre/uri/.php-cs-fixer.dist.php
+++ b/vendor/sabre/uri/.php_cs.dist
@@ -1,13 +1,12 @@
<?php
-$finder = PhpCsFixer\Finder::create()
+$config = PhpCsFixer\Config::create();
+$config->getFinder()
->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 0e0cf2d36..d58fd51f7 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.4 || ^8.0"
+ "php": "^7.1 || ^8.0"
},
"authors": [
{
@@ -37,9 +37,9 @@
}
},
"require-dev": {
- "friendsofphp/php-cs-fixer": "^3.9",
- "phpstan/phpstan": "^1.8",
- "phpunit/phpunit" : "^9.0"
+ "friendsofphp/php-cs-fixer": "~2.17.1",
+ "phpstan/phpstan": "^0.12",
+ "phpunit/phpunit" : "^7.5 || ^8.5 || ^9.0"
},
"scripts": {
"phpstan": [
diff --git a/vendor/sabre/uri/lib/Version.php b/vendor/sabre/uri/lib/Version.php
index e4f289e90..4527a0d8a 100644
--- a/vendor/sabre/uri/lib/Version.php
+++ b/vendor/sabre/uri/lib/Version.php
@@ -16,5 +16,5 @@ class Version
/**
* Full version number.
*/
- public const VERSION = '2.3.2';
+ const VERSION = '2.2.2';
}
diff --git a/vendor/sabre/uri/lib/functions.php b/vendor/sabre/uri/lib/functions.php
index 64e64027f..18a324337 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 = (string) $base['path'];
- $length = strrpos($path, '/');
+ $path = $base['path'];
+ $length = strrpos((string) $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,16 +174,13 @@ 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.
*
- * 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}
+ * @return array<string, string>
*
* @throws InvalidUriException
*/
function parse(string $uri): array
{
- // Normally a URI must be ASCII. However, often it's not and
+ // Normally a URI must be ASCII, however. 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
@@ -196,25 +193,11 @@ 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,
@@ -326,10 +309,6 @@ function _parse_fallback(string $uri): array
$uri
);
- if (null === $uri) {
- throw new InvalidUriException('Invalid, or could not parse URI');
- }
-
$result = [
'scheme' => null,
'host' => null,
@@ -362,13 +341,15 @@ 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
new file mode 100644
index 000000000..91375db8b
--- /dev/null
+++ b/vendor/sabre/uri/phpstan.neon
@@ -0,0 +1,2 @@
+parameters:
+ level: 7
diff --git a/vendor/sabre/vobject/.github/workflows/ci.yml b/vendor/sabre/vobject/.github/workflows/ci.yml
new file mode 100644
index 000000000..3a019fe77
--- /dev/null
+++ b/vendor/sabre/vobject/.github/workflows/ci.yml
@@ -0,0 +1,63 @@
+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 3bde16f9c..816e2cb31 100644
--- a/vendor/sabre/vobject/lib/Cli.php
+++ b/vendor/sabre/vobject/lib/Cli.php
@@ -456,7 +456,7 @@ HELP
*/
protected function color($vObj)
{
- $this->serializeComponent($vObj);
+ fwrite($this->stdout, $this->serializeComponent($vObj));
}
/**
diff --git a/vendor/sabre/vobject/lib/Component.php b/vendor/sabre/vobject/lib/Component.php
index a929387a3..f33b628a7 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<string, Component|Property>
+ * @var array
*/
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|null $name such as VCALENDAR, VEVENT
- * @param bool $defaults
+ * @param string $name such as VCALENDAR, VEVENT
+ * @param bool $defaults
*/
public function __construct(Document $root, $name, array $children = [], $defaults = true)
{
- $this->name = isset($name) ? strtoupper($name) : '';
+ $this->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 && (null !== $child->group ? strtoupper($child->group) : '') === $group;
+ return $child instanceof Property && 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 && (null !== $child->group ? strtoupper($child->group) : '') === $group) {
+ if ($child instanceof Property && 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 90a6df72f..eac789842 100644
--- a/vendor/sabre/vobject/lib/Component/VCard.php
+++ b/vendor/sabre/vobject/lib/Component/VCard.php
@@ -291,11 +291,6 @@ 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 c27b2aa47..7e4d55743 100644
--- a/vendor/sabre/vobject/lib/Parameter.php
+++ b/vendor/sabre/vobject/lib/Parameter.php
@@ -52,12 +52,11 @@ 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 513f7bd0c..db0f81531 100644
--- a/vendor/sabre/vobject/lib/Parser/MimeDir.php
+++ b/vendor/sabre/vobject/lib/Parser/MimeDir.php
@@ -167,11 +167,7 @@ class MimeDir extends Parser
while (true) {
// Reading until we hit END:
- try {
- $line = $this->readLine();
- } catch (EofException $oEx) {
- $line = 'END:'.$this->root->name;
- }
+ $line = $this->readLine();
if ('END:' === strtoupper(substr($line, 0, 4))) {
break;
}
@@ -376,22 +372,12 @@ 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],
@@ -464,8 +450,10 @@ class MimeDir extends Parser
switch (strtolower($charset)) {
case 'utf-8':
break;
- case 'windows-1252':
case 'iso-8859-1':
+ $property['value'] = utf8_encode($property['value']);
+ break;
+ case 'windows-1252':
$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 56096dafe..50cda9684 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|null
+ * @var string
*/
public $group;
diff --git a/vendor/sabre/vobject/lib/Property/ICalendar/CalAddress.php b/vendor/sabre/vobject/lib/Property/ICalendar/CalAddress.php
index c90967d79..2dbbc6eaf 100644
--- a/vendor/sabre/vobject/lib/Property/ICalendar/CalAddress.php
+++ b/vendor/sabre/vobject/lib/Property/ICalendar/CalAddress.php
@@ -53,11 +53,7 @@ class CalAddress extends Text
return $input;
}
list($schema, $everythingElse) = explode(':', $input, 2);
- $schema = strtolower($schema);
- if ('mailto' === $schema) {
- $everythingElse = strtolower($everythingElse);
- }
- return $schema.':'.$everythingElse;
+ return strtolower($schema).':'.$everythingElse;
}
}
diff --git a/vendor/sabre/vobject/lib/Property/Text.php b/vendor/sabre/vobject/lib/Property/Text.php
index 16d2c07f4..ac8aa066b 100644
--- a/vendor/sabre/vobject/lib/Property/Text.php
+++ b/vendor/sabre/vobject/lib/Property/Text.php
@@ -136,18 +136,16 @@ class Text extends Property
}
foreach ($item as &$subItem) {
- if (!is_null($subItem)) {
- $subItem = strtr(
- $subItem,
- [
- '\\' => '\\\\',
- ';' => '\;',
- ',' => '\,',
- "\n" => '\n',
- "\r" => '',
- ]
- );
- }
+ $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 4f0e9070d..d556aa6c3 100644
--- a/vendor/sabre/vobject/lib/Recur/RRuleIterator.php
+++ b/vendor/sabre/vobject/lib/Recur/RRuleIterator.php
@@ -25,13 +25,6 @@ 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
@@ -373,12 +366,6 @@ 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)) ||
@@ -499,7 +486,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() > self::dateUpperLimit) {
+ if ($this->currentDate->getTimestamp() > 253402300799) {
$this->currentDate = null;
return;
@@ -602,12 +589,11 @@ 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->setDate($currentYear, 1, 1);
- $date = $date->add(new \DateInterval('P'.($byYearDay - 1).'D'));
+ $date = $date->add(new \DateInterval('P'.$byYearDay.'D'));
} else {
- $date = $date->setDate($currentYear, 12, 31);
- $date = $date->sub(new \DateInterval('P'.abs($byYearDay + 1).'D'));
+ $date = $date->sub(new \DateInterval('P'.abs($byYearDay).'D'));
}
if ($date > $this->currentDate && in_array($date->format('N'), $dayOffsets)) {
@@ -672,14 +658,6 @@ 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 b04539e4a..2333d6ab9 100644
--- a/vendor/sabre/vobject/lib/StringUtil.php
+++ b/vendor/sabre/vobject/lib/StringUtil.php
@@ -40,11 +40,23 @@ class StringUtil
*/
public static function convertToUTF8($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');
+ $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;
}
// Removing any control characters
- return preg_replace('%(?:[\x00-\x08\x0B-\x0C\x0E-\x1F\x7F])%', '', $str);
+ return preg_replace('%(?:[\x00-\x08\x0B-\x0C\x0E-\x1F\x7F])%', '', $newStr);
}
}
diff --git a/vendor/sabre/vobject/lib/VCardConverter.php b/vendor/sabre/vobject/lib/VCardConverter.php
index 04129e355..04932fe67 100644
--- a/vendor/sabre/vobject/lib/VCardConverter.php
+++ b/vendor/sabre/vobject/lib/VCardConverter.php
@@ -140,8 +140,6 @@ 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
@@ -175,9 +173,6 @@ 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 92882f2f1..64938bf0b 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.5.1';
+ const VERSION = '4.4.1';
}