Skip to content

Commit

Permalink
⬆️ upgraded dependencies
Browse files Browse the repository at this point in the history
Signed-off-by: bnomei <[email protected]>
  • Loading branch information
bnomei committed Aug 2, 2023
1 parent a64b219 commit ccf7557
Show file tree
Hide file tree
Showing 36 changed files with 450 additions and 2,963 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "bnomei/kirby3-ics",
"description": "Generate ICS Files",
"type": "kirby-plugin",
"version": "1.0.6",
"version": "1.0.7",
"license": "MIT",
"authors": [
{
Expand Down
377 changes: 146 additions & 231 deletions composer.lock

Large diffs are not rendered by default.

2 changes: 0 additions & 2 deletions vendor/composer/autoload_classmap.php
Original file line number Diff line number Diff line change
Expand Up @@ -126,12 +126,10 @@
'Kigkonsult\\Icalcreator\\Util\\DateTimeZoneFactory' => $vendorDir . '/kigkonsult/icalcreator/src/Util/DateTimeZoneFactory.php',
'Kigkonsult\\Icalcreator\\Util\\GeoFactory' => $vendorDir . '/kigkonsult/icalcreator/src/Util/GeoFactory.php',
'Kigkonsult\\Icalcreator\\Util\\HttpFactory' => $vendorDir . '/kigkonsult/icalcreator/src/Util/HttpFactory.php',
'Kigkonsult\\Icalcreator\\Util\\IcalXMLFactory' => $vendorDir . '/kigkonsult/icalcreator/src/Util/IcalXMLFactory.php',
'Kigkonsult\\Icalcreator\\Util\\IcalvCardFactory' => $vendorDir . '/kigkonsult/icalcreator/src/Util/IcalvCardFactory.php',
'Kigkonsult\\Icalcreator\\Util\\ParameterFactory' => $vendorDir . '/kigkonsult/icalcreator/src/Util/ParameterFactory.php',
'Kigkonsult\\Icalcreator\\Util\\RecurFactory' => $vendorDir . '/kigkonsult/icalcreator/src/Util/RecurFactory.php',
'Kigkonsult\\Icalcreator\\Util\\RecurFactory2' => $vendorDir . '/kigkonsult/icalcreator/src/Util/RecurFactory2.php',
'Kigkonsult\\Icalcreator\\Util\\RegulateTimezoneFactory' => $vendorDir . '/kigkonsult/icalcreator/src/Util/RegulateTimezoneFactory.php',
'Kigkonsult\\Icalcreator\\Util\\RexdateFactory' => $vendorDir . '/kigkonsult/icalcreator/src/Util/RexdateFactory.php',
'Kigkonsult\\Icalcreator\\Util\\SelectFactory' => $vendorDir . '/kigkonsult/icalcreator/src/Util/SelectFactory.php',
'Kigkonsult\\Icalcreator\\Util\\SortFactory' => $vendorDir . '/kigkonsult/icalcreator/src/Util/SortFactory.php',
Expand Down
2 changes: 0 additions & 2 deletions vendor/composer/autoload_static.php
Original file line number Diff line number Diff line change
Expand Up @@ -160,12 +160,10 @@ class ComposerStaticInit491e638a5eef9e53f1ce44550339b2cd
'Kigkonsult\\Icalcreator\\Util\\DateTimeZoneFactory' => __DIR__ . '/..' . '/kigkonsult/icalcreator/src/Util/DateTimeZoneFactory.php',
'Kigkonsult\\Icalcreator\\Util\\GeoFactory' => __DIR__ . '/..' . '/kigkonsult/icalcreator/src/Util/GeoFactory.php',
'Kigkonsult\\Icalcreator\\Util\\HttpFactory' => __DIR__ . '/..' . '/kigkonsult/icalcreator/src/Util/HttpFactory.php',
'Kigkonsult\\Icalcreator\\Util\\IcalXMLFactory' => __DIR__ . '/..' . '/kigkonsult/icalcreator/src/Util/IcalXMLFactory.php',
'Kigkonsult\\Icalcreator\\Util\\IcalvCardFactory' => __DIR__ . '/..' . '/kigkonsult/icalcreator/src/Util/IcalvCardFactory.php',
'Kigkonsult\\Icalcreator\\Util\\ParameterFactory' => __DIR__ . '/..' . '/kigkonsult/icalcreator/src/Util/ParameterFactory.php',
'Kigkonsult\\Icalcreator\\Util\\RecurFactory' => __DIR__ . '/..' . '/kigkonsult/icalcreator/src/Util/RecurFactory.php',
'Kigkonsult\\Icalcreator\\Util\\RecurFactory2' => __DIR__ . '/..' . '/kigkonsult/icalcreator/src/Util/RecurFactory2.php',
'Kigkonsult\\Icalcreator\\Util\\RegulateTimezoneFactory' => __DIR__ . '/..' . '/kigkonsult/icalcreator/src/Util/RegulateTimezoneFactory.php',
'Kigkonsult\\Icalcreator\\Util\\RexdateFactory' => __DIR__ . '/..' . '/kigkonsult/icalcreator/src/Util/RexdateFactory.php',
'Kigkonsult\\Icalcreator\\Util\\SelectFactory' => __DIR__ . '/..' . '/kigkonsult/icalcreator/src/Util/SelectFactory.php',
'Kigkonsult\\Icalcreator\\Util\\SortFactory' => __DIR__ . '/..' . '/kigkonsult/icalcreator/src/Util/SortFactory.php',
Expand Down
14 changes: 7 additions & 7 deletions vendor/composer/installed.php
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?php return array(
'root' => array(
'name' => 'bnomei/kirby3-ics',
'pretty_version' => '1.0.6',
'version' => '1.0.6.0',
'pretty_version' => '1.0.7',
'version' => '1.0.7.0',
'reference' => NULL,
'type' => 'kirby-plugin',
'install_path' => __DIR__ . '/../../',
Expand All @@ -11,8 +11,8 @@
),
'versions' => array(
'bnomei/kirby3-ics' => array(
'pretty_version' => '1.0.6',
'version' => '1.0.6.0',
'pretty_version' => '1.0.7',
'version' => '1.0.7.0',
'reference' => NULL,
'type' => 'kirby-plugin',
'install_path' => __DIR__ . '/../../',
Expand All @@ -29,9 +29,9 @@
'dev_requirement' => false,
),
'kigkonsult/icalcreator' => array(
'pretty_version' => 'v2.41.74',
'version' => '2.41.74.0',
'reference' => '35b57afc03c07ff8e213ebda7c50f37f70d54526',
'pretty_version' => 'v2.41.80',
'version' => '2.41.80.0',
'reference' => 'a15c9b48caa2b50e077f5a9595f889c965d58667',
'type' => 'library',
'install_path' => __DIR__ . '/../kigkonsult/icalcreator',
'aliases' => array(),
Expand Down
4 changes: 2 additions & 2 deletions vendor/kigkonsult/icalcreator/autoload.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,13 @@
*
* iCalcreator package autoloader
*
* @since 2.41.74 - 2023-03-15
* @since 2.41.80 - 2023-06-27
*/

/**
* Do NOT alter or remove the constant!!
*/
define( 'ICALCREATOR_VERSION', 'iCalcreator 2.41.74' );
define( 'ICALCREATOR_VERSION', 'iCalcreator 2.41.80' );

/**
* load iCalcreator src and support classes and Traits
Expand Down
2 changes: 0 additions & 2 deletions vendor/kigkonsult/icalcreator/src/CalendarComponent.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@
use Kigkonsult\Icalcreator\Parser\ComponentParser;
use Kigkonsult\Icalcreator\Util\StringFactory;
use Kigkonsult\Icalcreator\Util\Util;
use UnexpectedValueException;

use function is_array;
use function ksort;
Expand Down Expand Up @@ -131,7 +130,6 @@ public function getProperties( string $propName, array & $output ) : void
* @param null|string|string[] $unParsedText strict rfc2445 formatted, single property string or array of strings
* @return static
* @throws Exception
* @throws UnexpectedValueException;
* @since 2.41.54 - 2022-08-09
* @// todo report invalid properties, Exception.. ??
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,9 +112,9 @@ public static function format(
}

/**
* @param mixed[] $rdatePart
* @param bool $isValueDate
* @param bool $isLocalTime
* @param array $rdatePart
* @param bool $isValueDate
* @param bool $isLocalTime
* @return string
* @throws Exception
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@
final class Xproperty extends PropertyBase
{
/**
* @param mixed[] $values [ *( propname, Pc ) ]
* @param null|bool $allowEmpty
* @param array $values [ *( propname, Pc ) ]
* @param null|bool $allowEmpty
* @param null|bool|string $lang
* @return string
*/
Expand Down
31 changes: 16 additions & 15 deletions vendor/kigkonsult/icalcreator/src/IcalBase.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
* Do NOT alter or remove the constant!!
*/
if( ! defined( 'ICALCREATOR_VERSION' )) {
define( 'ICALCREATOR_VERSION', 'iCalcreator 2.41.74' );
define( 'ICALCREATOR_VERSION', 'iCalcreator 2.41.80' );
}

/**
Expand Down Expand Up @@ -131,7 +131,7 @@ public static function isTzComp( ? string $compName ) : bool
* @return bool
* @since 2.41.68 2022-10-03
*/
protected static function isCalendarSubComp( string $compName ) : bool
public static function isCalendarSubComp( string $compName ) : bool
{
static $CALCOMPS = [
self::AVAILABLE,
Expand All @@ -151,6 +151,7 @@ protected static function isCalendarSubComp( string $compName ) : bool

/**
* Return bool true if component has the UID property
*
* @param IcalBase $component
* @return bool
* @since 2.47.68 2022-10-01
Expand Down Expand Up @@ -236,7 +237,7 @@ protected static function isDateProp( string $propName ) : bool
protected array $components = [];

/**
* @var mixed[] $config configuration with defaults
* @var array $config configuration with defaults
*/
protected array $config = [
self::ALLOWEMPTY => true,
Expand Down Expand Up @@ -418,7 +419,7 @@ public function getConfig( ? string $config = null ) : mixed
/**
* Return array( propertyName => count )
*
* @return mixed[]
* @return array
* @since 2.41.51 2022-08-09
*/
protected function getpropInfo() : array
Expand Down Expand Up @@ -466,9 +467,9 @@ protected function getpropInfo() : array
/**
* Set Vcalendar/component config
*
* @param string|string[] $config
* @param null|bool|string|mixed[] $value
* @param bool $softUpdate
* @param string|string[] $config
* @param null|bool|string|array $value
* @param bool $softUpdate
* @return static
* @throws InvalidArgumentException
* @since 2.40.11 - 2022-01-25
Expand Down Expand Up @@ -663,7 +664,9 @@ public function getComponent(
++$cix1gC;
}
break;
case ( ! $argType && ( $arg1 === $this->components[$cix]->getUid())) :
case ( ! $argType &&
self::hasUid( $this->components[$cix] ) &&
( $arg1 === $this->components[$cix]->getUid())) :
if( $index === $cix1gC ) {
return clone $this->components[$cix];
}
Expand Down Expand Up @@ -705,15 +708,15 @@ protected function getCompixIndex( string $arg1, null|int|string $arg2 = null )
* @param CalendarComponent $component
* @param string[] $argList
* @return bool
* @since 2.47.68 - 2022-10-03
* @since 2.47.76 - 2023-04-29
*/
protected static function isFoundInCompsProps(
CalendarComponent $component,
array $argList
) : bool
{
foreach( $argList as $propName => $propValue ) {
if( in_array( $propName, [ self::ATTENDEE, self::CONTACT, self::ORGANIZER ], true ) ) {
if( in_array( $propName, [ self::ATTENDEE, self::CONTACT, self::ORGANIZER ], true )) {
$propValue = CalAddressFactory::conformCalAddress( $propValue );
}
switch( true ) {
Expand All @@ -737,7 +740,7 @@ protected static function isFoundInCompsProps(
if( false === ( $value = $component->{$method}())) { // single occurrence
continue; // missing/empty property
}
switch( true ) {
switch( true ) {
case ( self::SUMMARY === $propName ) : // exists in (any case)
if( false !== stripos( $value, $propValue )) {
return true;
Expand All @@ -760,10 +763,8 @@ protected static function isFoundInCompsProps(
$part = ( is_string( $part ) && ( str_contains( $part, Util::$COMMA )))
? explode( Util::$COMMA, $part )
: [ $part ];
foreach( $part as $subPart ) {
if( $propValue == $subPart ) { // note ==
return true;
}
if( in_array( $propValue, $part )) { // note no true
return true;
}
} // end foreach( $value as $part )
} // end foreach( $arg1 as $propName => $propValue )
Expand Down
14 changes: 10 additions & 4 deletions vendor/kigkonsult/icalcreator/src/Parser/ComponentParser.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
use Exception;
use Kigkonsult\Icalcreator\CalendarComponent;
use Kigkonsult\Icalcreator\Util\StringFactory;
use RuntimeException;

use function count;
use function ctype_alpha;
Expand All @@ -54,13 +55,18 @@ final class ComponentParser extends ParserBase
{
/**
* @inheritDoc
* @throws Exception
* @throws RuntimeException
*/
public function parse( null|array|string $unParsedText = null ) : CalendarComponent
{
$rows = $this->parse1prepInput( $unParsedText );
if( ! empty( $rows )) {
$this->parse2intoComps( $rows );
try {
$rows = $this->parse1prepInput( $unParsedText );
if( ! empty( $rows ) ) {
$this->parse2intoComps( $rows );
}
}
catch( Exception $e ) {
throw new RuntimeException( $e->getMessage(), $e->getCode(), $e );
}
return $this->subject;
}
Expand Down
36 changes: 8 additions & 28 deletions vendor/kigkonsult/icalcreator/src/Parser/ParserBase.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,10 @@
use Exception;
use Kigkonsult\Icalcreator\CalendarComponent;
use Kigkonsult\Icalcreator\IcalInterface;
use Kigkonsult\Icalcreator\Util\CalAddressFactory;
use Kigkonsult\Icalcreator\Util\StringFactory;
use Kigkonsult\Icalcreator\Util\Util;
use Kigkonsult\Icalcreator\Vcalendar;

use function bin2hex;
use function count;
use function ctype_digit;
Expand All @@ -44,10 +44,10 @@
use function rtrim;
use function sprintf;
use function str_replace;
use function stristr;
use function strlen;
use function strpos;
use function strstr;
use function stristr;
use function strtolower;
use function strtoupper;
use function substr;
Expand Down Expand Up @@ -83,26 +83,6 @@ abstract class ParserBase implements IcalInterface
*/
protected static string $SP0 = '';

/**
* Protocols
*
* @var string[]
*/
public static array $PROTO3 = [ 'cid:', 'sms:', 'tel:', 'urn:' ];

/**
* @var string[] dito
*/
public static array $PROTO5 = [ 'https:' ];
/**
* @var string[] dito
*/
public static array $PROTO6 = [ 'mailto:', 'telnet:' ];
/**
* @var string[] dito
*/
public static array $PROTO7 = [ 'message:' ];

/**
* @var string[] iCal component TEXT properties that may contain '\\', ',', ';'
* @usedby VcalendarParser + ComponentParser
Expand Down Expand Up @@ -387,11 +367,11 @@ public static function colonIsPrefixedByProtocol( string $line, int $cix ) : boo
static $MSTZ = [ 'utc-', 'utc+', 'gmt-', 'gmt+' ];
$line = strtolower( $line );
return ( ( in_array( substr( $line, $cix - 6, 4 ), $MSTZ )) || // ?? -6
( in_array( substr( $line, $cix - 3, 4 ), self::$PROTO3, true )) ||
( in_array( substr( $line, $cix - 4, 5 ), StringFactory::$PROTO4, true )) ||
( in_array( substr( $line, $cix - 5, 6 ), self::$PROTO5, true )) ||
( in_array( substr( $line, $cix - 6, 7 ), self::$PROTO6, true )) ||
( in_array( substr( $line, $cix - 7, 8 ), self::$PROTO7, true )));
( in_array( substr( $line, $cix - 3, 4 ), CalAddressFactory::$PROTO3, true )) ||
( in_array( substr( $line, $cix - 4, 5 ), CalAddressFactory::$PROTO4, true )) ||
( in_array( substr( $line, $cix - 5, 6 ), CalAddressFactory::$PROTO5, true )) ||
( in_array( substr( $line, $cix - 6, 7 ), CalAddressFactory::$PROTO6, true )) ||
( in_array( substr( $line, $cix - 7, 8 ), CalAddressFactory::$PROTO7, true )));
}

/**
Expand Down Expand Up @@ -480,7 +460,7 @@ public static function concatRows( array $rows ) : array
for( $i = 0; $i < $cnt; $i++ ) {
$line = rtrim( $rows[$i], Util::$CRLF );
$i1 = $i + 1;
while(( $i < $cnt ) && isset( $rows[$i1] ) &&
while( ( $i < $cnt ) &&
! empty( $rows[$i1] ) &&
in_array( $rows[$i1][0], $CHARs )) {
++$i;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,6 @@ private function parse3thisProperties() : void
self::URL,
];
if( ! isset( $this->unparsed ) ||
! is_array( $this->unparsed ) ||
( 1 > count( $this->unparsed ))) {
return;
}
Expand Down
14 changes: 9 additions & 5 deletions vendor/kigkonsult/icalcreator/src/Pc.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,15 @@ class Pc extends ArrayObject
* Class constructor
*
* @overrides
* @param array $array ignored
* @param int $flags ignored
* @param string $iteratorClass ArrayIterator
*/
public function __construct( $array = [], $flags = 0, $iteratorClass = 'ArrayIterator' )
* @param null|array $array ignored
* @param null|int $flags ignored
* @param null|string $iteratorClass ArrayIterator
*/
public function __construct(
? array $array = [],
? int $flags = 0,
? string $iteratorClass = 'ArrayIterator'
)
{
parent::__construct( self::$propTmpl, ArrayObject::ARRAY_AS_PROPS, self::$iteratorTmpl );
}
Expand Down
2 changes: 1 addition & 1 deletion vendor/kigkonsult/icalcreator/src/Traits/CALSCALEtrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ public function isCalscaleSet() : bool
*
* @param null|string $value
* @return static
* @throws InvalidArgumentException;
* @throws InvalidArgumentException
* @since 2.29.14 - 2019-09-03
*/
public function setCalscale( null|string $value = null ) : static
Expand Down
6 changes: 3 additions & 3 deletions vendor/kigkonsult/icalcreator/src/Traits/EXRULEtrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -107,14 +107,14 @@ public function isExruleSet() : bool
/**
* Set calendar component property exrule
*
* @param null|array $exruleset
* @param null|array|Pc $exruleset
* @param null|array $params
* @return static
* @throws InvalidArgumentException
* @throws Exception
* @since 2.41.36 2022-04-03
* @since 2.41.76 2023-04-29
*/
public function setExrule( ? array $exruleset = null, ? array $params = [] ) : static
public function setExrule( null|array|Pc $exruleset = null, ? array $params = [] ) : static
{
$value = ( $exruleset instanceof Pc )
? clone $exruleset
Expand Down
Loading

0 comments on commit ccf7557

Please sign in to comment.