aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/sabre/vobject
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/sabre/vobject')
-rw-r--r--vendor/sabre/vobject/composer.json4
-rw-r--r--vendor/sabre/vobject/lib/Component/VCalendar.php2
-rw-r--r--vendor/sabre/vobject/lib/DateTimeParser.php4
-rw-r--r--vendor/sabre/vobject/lib/Document.php4
-rw-r--r--vendor/sabre/vobject/lib/FreeBusyGenerator.php4
-rw-r--r--vendor/sabre/vobject/lib/ITip/Broker.php19
-rw-r--r--vendor/sabre/vobject/lib/Property.php2
-rw-r--r--vendor/sabre/vobject/lib/Property/ICalendar/DateTime.php4
-rw-r--r--vendor/sabre/vobject/lib/Property/ICalendar/Recur.php10
-rw-r--r--vendor/sabre/vobject/lib/Recur/EventIterator.php2
-rw-r--r--vendor/sabre/vobject/lib/TimeZoneUtil.php4
-rw-r--r--vendor/sabre/vobject/lib/Version.php2
12 files changed, 35 insertions, 26 deletions
diff --git a/vendor/sabre/vobject/composer.json b/vendor/sabre/vobject/composer.json
index b08684bce..df0261feb 100644
--- a/vendor/sabre/vobject/composer.json
+++ b/vendor/sabre/vobject/composer.json
@@ -38,9 +38,9 @@
},
"require-dev" : {
"friendsofphp/php-cs-fixer": "~2.17.1",
- "phpunit/phpunit" : "^7.5 || ^8.5 || ^9.0",
+ "phpunit/phpunit" : "^7.5 || ^8.5 || ^9.6",
"phpunit/php-invoker" : "^2.0 || ^3.1",
- "phpstan/phpstan": "^0.12"
+ "phpstan/phpstan": "^0.12 || ^1.11"
},
"suggest" : {
"hoa/bench" : "If you would like to run the benchmark scripts"
diff --git a/vendor/sabre/vobject/lib/Component/VCalendar.php b/vendor/sabre/vobject/lib/Component/VCalendar.php
index 4db318135..017aed70c 100644
--- a/vendor/sabre/vobject/lib/Component/VCalendar.php
+++ b/vendor/sabre/vobject/lib/Component/VCalendar.php
@@ -281,7 +281,7 @@ class VCalendar extends VObject\Document
*
* @return VCalendar
*/
- public function expand(DateTimeInterface $start, DateTimeInterface $end, DateTimeZone $timeZone = null)
+ public function expand(DateTimeInterface $start, DateTimeInterface $end, ?DateTimeZone $timeZone = null)
{
$newChildren = [];
$recurringEvents = [];
diff --git a/vendor/sabre/vobject/lib/DateTimeParser.php b/vendor/sabre/vobject/lib/DateTimeParser.php
index c5dbac97d..69072ef8c 100644
--- a/vendor/sabre/vobject/lib/DateTimeParser.php
+++ b/vendor/sabre/vobject/lib/DateTimeParser.php
@@ -31,7 +31,7 @@ class DateTimeParser
*
* @return DateTimeImmutable
*/
- public static function parseDateTime($dt, DateTimeZone $tz = null)
+ public static function parseDateTime($dt, ?DateTimeZone $tz = null)
{
// Format is YYYYMMDD + "T" + hhmmss
$result = preg_match('/^([0-9]{4})([0-1][0-9])([0-3][0-9])T([0-2][0-9])([0-5][0-9])([0-5][0-9])([Z]?)$/', $dt, $matches);
@@ -61,7 +61,7 @@ class DateTimeParser
*
* @return DateTimeImmutable
*/
- public static function parseDate($date, DateTimeZone $tz = null)
+ public static function parseDate($date, ?DateTimeZone $tz = null)
{
// Format is YYYYMMDD
$result = preg_match('/^([0-9]{4})([0-1][0-9])([0-3][0-9])$/', $date, $matches);
diff --git a/vendor/sabre/vobject/lib/Document.php b/vendor/sabre/vobject/lib/Document.php
index 6b908c70e..d2131f479 100644
--- a/vendor/sabre/vobject/lib/Document.php
+++ b/vendor/sabre/vobject/lib/Document.php
@@ -157,7 +157,7 @@ abstract class Document extends Component
*
* @return Component
*/
- public function createComponent($name, array $children = null, $defaults = true)
+ public function createComponent($name, ?array $children = null, $defaults = true)
{
$name = strtoupper($name);
$class = Component::class;
@@ -187,7 +187,7 @@ abstract class Document extends Component
* @param array $parameters
* @param string $valueType Force a specific valuetype, such as URI or TEXT
*/
- public function createProperty($name, $value = null, array $parameters = null, $valueType = null, int $lineIndex = null, string $lineString = null): Property
+ public function createProperty($name, $value = null, ?array $parameters = null, $valueType = null, ?int $lineIndex = null, ?string $lineString = null): Property
{
// If there's a . in the name, it means it's prefixed by a groupname.
if (false !== ($i = strpos($name, '.'))) {
diff --git a/vendor/sabre/vobject/lib/FreeBusyGenerator.php b/vendor/sabre/vobject/lib/FreeBusyGenerator.php
index 81b8126d5..56ae166fa 100644
--- a/vendor/sabre/vobject/lib/FreeBusyGenerator.php
+++ b/vendor/sabre/vobject/lib/FreeBusyGenerator.php
@@ -89,7 +89,7 @@ class FreeBusyGenerator
* @param mixed $objects
* @param DateTimeZone $timeZone
*/
- public function __construct(DateTimeInterface $start = null, DateTimeInterface $end = null, $objects = null, DateTimeZone $timeZone = null)
+ public function __construct(?DateTimeInterface $start = null, ?DateTimeInterface $end = null, $objects = null, ?DateTimeZone $timeZone = null)
{
$this->setTimeRange($start, $end);
@@ -158,7 +158,7 @@ class FreeBusyGenerator
* @param DateTimeInterface $start
* @param DateTimeInterface $end
*/
- public function setTimeRange(DateTimeInterface $start = null, DateTimeInterface $end = null)
+ public function setTimeRange(?DateTimeInterface $start = null, ?DateTimeInterface $end = null)
{
if (!$start) {
$start = new DateTimeImmutable(Settings::$minDate);
diff --git a/vendor/sabre/vobject/lib/ITip/Broker.php b/vendor/sabre/vobject/lib/ITip/Broker.php
index dbdd80b78..9d68fc4c6 100644
--- a/vendor/sabre/vobject/lib/ITip/Broker.php
+++ b/vendor/sabre/vobject/lib/ITip/Broker.php
@@ -108,7 +108,7 @@ class Broker
*
* @return VCalendar|null
*/
- public function processMessage(Message $itipMessage, VCalendar $existingObject = null)
+ public function processMessage(Message $itipMessage, ?VCalendar $existingObject = null)
{
// We only support events at the moment.
if ('VEVENT' !== $itipMessage->component) {
@@ -266,7 +266,7 @@ class Broker
*
* @return VCalendar|null
*/
- protected function processMessageRequest(Message $itipMessage, VCalendar $existingObject = null)
+ protected function processMessageRequest(Message $itipMessage, ?VCalendar $existingObject = null)
{
if (!$existingObject) {
// This is a new invite, and we're just going to copy over
@@ -301,7 +301,7 @@ class Broker
*
* @return VCalendar|null
*/
- protected function processMessageCancel(Message $itipMessage, VCalendar $existingObject = null)
+ protected function processMessageCancel(Message $itipMessage, ?VCalendar $existingObject = null)
{
if (!$existingObject) {
// The event didn't exist in the first place, so we're just
@@ -326,7 +326,7 @@ class Broker
*
* @return VCalendar|null
*/
- protected function processMessageReply(Message $itipMessage, VCalendar $existingObject = null)
+ protected function processMessageReply(Message $itipMessage, ?VCalendar $existingObject = null)
{
// A reply can only be processed based on an existing object.
// If the object is not available, the reply is ignored.
@@ -510,10 +510,11 @@ class Broker
$icalMsg->add(clone $timezone);
}
- if (!$attendee['newInstances']) {
- // If there are no instances the attendee is a part of, it
- // means the attendee was removed and we need to send him a
- // CANCEL.
+ if (!$attendee['newInstances'] || 'CANCELLED' === $eventInfo['status']) {
+ // If there are no instances the attendee is a part of, it means
+ // the attendee was removed and we need to send them a CANCEL message.
+ // Also If the meeting STATUS property was changed to CANCELLED
+ // we need to send the attendee a CANCEL message.
$message->method = 'CANCEL';
$icalMsg->METHOD = $message->method;
@@ -807,7 +808,7 @@ class Broker
*
* @return array
*/
- protected function parseEventInfo(VCalendar $calendar = null)
+ protected function parseEventInfo(?VCalendar $calendar = null)
{
$uid = null;
$organizer = null;
diff --git a/vendor/sabre/vobject/lib/Property.php b/vendor/sabre/vobject/lib/Property.php
index 0805c139a..f52760f9c 100644
--- a/vendor/sabre/vobject/lib/Property.php
+++ b/vendor/sabre/vobject/lib/Property.php
@@ -81,7 +81,7 @@ abstract class Property extends Node
* @param array $parameters List of parameters
* @param string $group The vcard property group
*/
- public function __construct(Component $root, $name, $value = null, array $parameters = [], $group = null, int $lineIndex = null, string $lineString = null)
+ public function __construct(Component $root, $name, $value = null, array $parameters = [], $group = null, ?int $lineIndex = null, ?string $lineString = null)
{
$this->name = $name;
$this->group = $group;
diff --git a/vendor/sabre/vobject/lib/Property/ICalendar/DateTime.php b/vendor/sabre/vobject/lib/Property/ICalendar/DateTime.php
index ca71633b9..3ea21e2ec 100644
--- a/vendor/sabre/vobject/lib/Property/ICalendar/DateTime.php
+++ b/vendor/sabre/vobject/lib/Property/ICalendar/DateTime.php
@@ -131,7 +131,7 @@ class DateTime extends Property
*
* @return \DateTimeImmutable
*/
- public function getDateTime(DateTimeZone $timeZone = null)
+ public function getDateTime(?DateTimeZone $timeZone = null)
{
$dt = $this->getDateTimes($timeZone);
if (!$dt) {
@@ -153,7 +153,7 @@ class DateTime extends Property
* @return \DateTimeImmutable[]
* @return \DateTime[]
*/
- public function getDateTimes(DateTimeZone $timeZone = null)
+ public function getDateTimes(?DateTimeZone $timeZone = null)
{
// Does the property have a TZID?
$tzid = $this['TZID'];
diff --git a/vendor/sabre/vobject/lib/Property/ICalendar/Recur.php b/vendor/sabre/vobject/lib/Property/ICalendar/Recur.php
index 3d632fec1..cd3d7a5e4 100644
--- a/vendor/sabre/vobject/lib/Property/ICalendar/Recur.php
+++ b/vendor/sabre/vobject/lib/Property/ICalendar/Recur.php
@@ -2,6 +2,7 @@
namespace Sabre\VObject\Property\ICalendar;
+use Sabre\VObject\InvalidDataException;
use Sabre\VObject\Property;
use Sabre\Xml;
@@ -198,7 +199,14 @@ class Recur extends Property
if (empty($part)) {
continue;
}
- list($partName, $partValue) = explode('=', $part);
+
+ $parts = explode('=', $part);
+
+ if (2 !== count($parts)) {
+ throw new InvalidDataException('The supplied iCalendar RRULE part is incorrect: '.$part);
+ }
+
+ list($partName, $partValue) = $parts;
// The value itself had multiple values..
if (false !== strpos($partValue, ',')) {
diff --git a/vendor/sabre/vobject/lib/Recur/EventIterator.php b/vendor/sabre/vobject/lib/Recur/EventIterator.php
index 61f05d7de..55d6e4779 100644
--- a/vendor/sabre/vobject/lib/Recur/EventIterator.php
+++ b/vendor/sabre/vobject/lib/Recur/EventIterator.php
@@ -93,7 +93,7 @@ class EventIterator implements \Iterator
* @param DateTimeZone $timeZone reference timezone for floating dates and
* times
*/
- public function __construct($input, $uid = null, DateTimeZone $timeZone = null)
+ public function __construct($input, $uid = null, ?DateTimeZone $timeZone = null)
{
if (is_null($timeZone)) {
$timeZone = new DateTimeZone('UTC');
diff --git a/vendor/sabre/vobject/lib/TimeZoneUtil.php b/vendor/sabre/vobject/lib/TimeZoneUtil.php
index 6422c0930..0d77e71ed 100644
--- a/vendor/sabre/vobject/lib/TimeZoneUtil.php
+++ b/vendor/sabre/vobject/lib/TimeZoneUtil.php
@@ -75,7 +75,7 @@ class TimeZoneUtil
* Alternatively, if $failIfUncertain is set to true, it will throw an
* exception if we cannot accurately determine the timezone.
*/
- private function findTimeZone(string $tzid, Component $vcalendar = null, bool $failIfUncertain = false): DateTimeZone
+ private function findTimeZone(string $tzid, ?Component $vcalendar = null, bool $failIfUncertain = false): DateTimeZone
{
foreach ($this->timezoneFinders as $timezoneFinder) {
$timezone = $timezoneFinder->find($tzid, $failIfUncertain);
@@ -126,7 +126,7 @@ class TimeZoneUtil
*
* @return DateTimeZone
*/
- public static function getTimeZone($tzid, Component $vcalendar = null, $failIfUncertain = false)
+ public static function getTimeZone($tzid, ?Component $vcalendar = null, $failIfUncertain = false)
{
return self::getInstance()->findTimeZone($tzid, $vcalendar, $failIfUncertain);
}
diff --git a/vendor/sabre/vobject/lib/Version.php b/vendor/sabre/vobject/lib/Version.php
index 309b995cf..060c69a30 100644
--- a/vendor/sabre/vobject/lib/Version.php
+++ b/vendor/sabre/vobject/lib/Version.php
@@ -14,5 +14,5 @@ class Version
/**
* Full version number.
*/
- public const VERSION = '4.5.5';
+ public const VERSION = '4.5.6';
}