Skip to content

Commit ebafb53

Browse files
committed
Downgrade Markdown parser. Fix autoload of DataLiberation functions
1 parent 45d2a27 commit ebafb53

File tree

145 files changed

+920
-506
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

145 files changed

+920
-506
lines changed

components/Markdown/vendor-patched/league/commonmark/src/CommonMarkConverter.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ public function __construct(array $config = [])
3737
parent::__construct($environment);
3838
}
3939

40-
public function getEnvironment(): Environment
40+
public function getEnvironment(): \League\CommonMark\Environment\EnvironmentInterface
4141
{
4242
\assert($this->environment instanceof Environment);
4343

components/Markdown/vendor-patched/league/commonmark/src/Delimiter/Bracket.php

Lines changed: 24 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,30 @@
1717

1818
final class Bracket
1919
{
20-
private Node $node;
21-
private ?Bracket $previous;
22-
private bool $hasNext = false;
23-
private int $position;
24-
private bool $image;
25-
private bool $active = true;
20+
/**
21+
* @var \League\CommonMark\Node\Node
22+
*/
23+
private $node;
24+
/**
25+
* @var \League\CommonMark\Delimiter\Bracket|null
26+
*/
27+
private $previous;
28+
/**
29+
* @var bool
30+
*/
31+
private $hasNext = false;
32+
/**
33+
* @var int
34+
*/
35+
private $position;
36+
/**
37+
* @var bool
38+
*/
39+
private $image;
40+
/**
41+
* @var bool
42+
*/
43+
private $active = true;
2644

2745
public function __construct(Node $node, ?Bracket $previous, int $position, bool $image)
2846
{

components/Markdown/vendor-patched/league/commonmark/src/Delimiter/Delimiter.php

Lines changed: 30 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -20,35 +20,45 @@
2020

2121
final class Delimiter implements DelimiterInterface
2222
{
23-
/** @psalm-readonly */
24-
private string $char;
23+
/** @psalm-readonly
24+
* @var string */
25+
private $char;
2526

26-
/** @psalm-readonly-allow-private-mutation */
27-
private int $length;
27+
/** @psalm-readonly-allow-private-mutation
28+
* @var int */
29+
private $length;
2830

29-
/** @psalm-readonly */
30-
private int $originalLength;
31+
/** @psalm-readonly
32+
* @var int */
33+
private $originalLength;
3134

32-
/** @psalm-readonly */
33-
private AbstractStringContainer $inlineNode;
35+
/** @psalm-readonly
36+
* @var \League\CommonMark\Node\Inline\AbstractStringContainer */
37+
private $inlineNode;
3438

35-
/** @psalm-readonly-allow-private-mutation */
36-
private ?DelimiterInterface $previous = null;
39+
/** @psalm-readonly-allow-private-mutation
40+
* @var \League\CommonMark\Delimiter\DelimiterInterface|null */
41+
private $previous;
3742

38-
/** @psalm-readonly-allow-private-mutation */
39-
private ?DelimiterInterface $next = null;
43+
/** @psalm-readonly-allow-private-mutation
44+
* @var \League\CommonMark\Delimiter\DelimiterInterface|null */
45+
private $next;
4046

41-
/** @psalm-readonly */
42-
private bool $canOpen;
47+
/** @psalm-readonly
48+
* @var bool */
49+
private $canOpen;
4350

44-
/** @psalm-readonly */
45-
private bool $canClose;
51+
/** @psalm-readonly
52+
* @var bool */
53+
private $canClose;
4654

47-
/** @psalm-readonly-allow-private-mutation */
48-
private bool $active;
55+
/** @psalm-readonly-allow-private-mutation
56+
* @var bool */
57+
private $active;
4958

50-
/** @psalm-readonly */
51-
private ?int $index = null;
59+
/** @psalm-readonly
60+
* @var int|null */
61+
private $index;
5262

5363
public function __construct(string $char, int $numDelims, AbstractStringContainer $node, bool $canOpen, bool $canClose, ?int $index = null)
5464
{

components/Markdown/vendor-patched/league/commonmark/src/Delimiter/DelimiterParser.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,10 @@
1919
*/
2020
final class DelimiterParser implements InlineParserInterface
2121
{
22-
private DelimiterProcessorCollection $collection;
22+
/**
23+
* @var \League\CommonMark\Delimiter\Processor\DelimiterProcessorCollection
24+
*/
25+
private $collection;
2326

2427
public function __construct(DelimiterProcessorCollection $collection)
2528
{

components/Markdown/vendor-patched/league/commonmark/src/Delimiter/DelimiterStack.php

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,13 @@
2626

2727
final class DelimiterStack
2828
{
29-
/** @psalm-readonly-allow-private-mutation */
30-
private ?DelimiterInterface $top = null;
29+
/** @psalm-readonly-allow-private-mutation
30+
* @var \League\CommonMark\Delimiter\DelimiterInterface|null */
31+
private $top;
3132

32-
/** @psalm-readonly-allow-private-mutation */
33-
private ?Bracket $brackets = null;
33+
/** @psalm-readonly-allow-private-mutation
34+
* @var \League\CommonMark\Delimiter\Bracket|null */
35+
private $brackets;
3436

3537
/**
3638
* @deprecated This property will be removed in 3.0 once all delimiters MUST have an index/position
@@ -40,7 +42,10 @@ final class DelimiterStack
4042
private $missingIndexCache;
4143

4244

43-
private int $remainingDelimiters = 0;
45+
/**
46+
* @var int
47+
*/
48+
private $remainingDelimiters = 0;
4449

4550
public function __construct(int $maximumStackSize = PHP_INT_MAX)
4651
{

components/Markdown/vendor-patched/league/commonmark/src/Delimiter/Processor/DelimiterProcessorCollection.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ final class DelimiterProcessorCollection implements DelimiterProcessorCollection
2828
*
2929
* @psalm-readonly-allow-private-mutation
3030
*/
31-
private array $processorsByChar = [];
31+
private $processorsByChar = [];
3232

3333
public function add(DelimiterProcessorInterface $processor): void
3434
{

components/Markdown/vendor-patched/league/commonmark/src/Delimiter/Processor/StaggeredDelimiterProcessor.php

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,18 +30,20 @@
3030
*/
3131
final class StaggeredDelimiterProcessor implements DelimiterProcessorInterface
3232
{
33-
/** @psalm-readonly */
34-
private string $delimiterChar;
33+
/** @psalm-readonly
34+
* @var string */
35+
private $delimiterChar;
3536

36-
/** @psalm-readonly-allow-private-mutation */
37-
private int $minLength = 0;
37+
/** @psalm-readonly-allow-private-mutation
38+
* @var int */
39+
private $minLength = 0;
3840

3941
/**
4042
* @var array<int, DelimiterProcessorInterface>|DelimiterProcessorInterface[]
4143
*
4244
* @psalm-readonly-allow-private-mutation
4345
*/
44-
private array $processors = []; // keyed by minLength in reverse order
46+
private $processors = []; // keyed by minLength in reverse order
4547

4648
public function __construct(string $char, DelimiterProcessorInterface $processor)
4749
{

components/Markdown/vendor-patched/league/commonmark/src/Environment/Environment.php

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -51,55 +51,55 @@ final class Environment implements EnvironmentInterface, EnvironmentBuilderInter
5151
*
5252
* @psalm-readonly-allow-private-mutation
5353
*/
54-
private array $extensions = [];
54+
private $extensions = [];
5555

5656
/**
5757
* @var ExtensionInterface[]
5858
*
5959
* @psalm-readonly-allow-private-mutation
6060
*/
61-
private array $uninitializedExtensions = [];
61+
private $uninitializedExtensions = [];
6262

6363
/** @psalm-readonly-allow-private-mutation */
64-
private bool $extensionsInitialized = false;
64+
private $extensionsInitialized = false;
6565

6666
/**
6767
* @var PrioritizedList<BlockStartParserInterface>
6868
*
6969
* @psalm-readonly
7070
*/
71-
private PrioritizedList $blockStartParsers;
71+
private $blockStartParsers;
7272

7373
/**
7474
* @var PrioritizedList<InlineParserInterface>
7575
*
7676
* @psalm-readonly
7777
*/
78-
private PrioritizedList $inlineParsers;
78+
private $inlineParsers;
7979

8080
/** @psalm-readonly */
81-
private DelimiterProcessorCollection $delimiterProcessors;
81+
private $delimiterProcessors;
8282

8383
/**
8484
* @var array<string, PrioritizedList<NodeRendererInterface>>
8585
*
8686
* @psalm-readonly-allow-private-mutation
8787
*/
88-
private array $renderersByClass = [];
88+
private $renderersByClass = [];
8989

9090
/**
9191
* @var PrioritizedList<ListenerData>
9292
*
9393
* @psalm-readonly-allow-private-mutation
9494
*/
95-
private PrioritizedList $listenerData;
95+
private $listenerData;
9696

97-
private ?EventDispatcherInterface $eventDispatcher = null;
97+
private $eventDispatcher = null;
9898

9999
/** @psalm-readonly */
100-
private Configuration $config;
100+
private $config;
101101

102-
private ?TextNormalizerInterface $slugNormalizer = null;
102+
private $slugNormalizer = null;
103103

104104
/**
105105
* @param array<string, mixed> $config
@@ -217,7 +217,7 @@ public function getRenderersForClass(string $nodeClass): iterable
217217
}
218218

219219
/** @psalm-suppress TypeDoesNotContainType -- Bug: https://github.com/vimeo/psalm/issues/3332 */
220-
while (\class_exists($parent ??= $nodeClass) && $parent = \get_parent_class($parent)) {
220+
while (\class_exists($parent = $parent ?? $nodeClass) && $parent = \get_parent_class($parent)) {
221221
if (! isset($this->renderersByClass[$parent])) {
222222
continue;
223223
}

components/Markdown/vendor-patched/league/commonmark/src/Event/AbstractEvent.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,9 @@
2929
*/
3030
abstract class AbstractEvent implements StoppableEventInterface
3131
{
32-
/** @psalm-readonly-allow-private-mutation */
33-
private bool $propagationStopped = false;
32+
/** @psalm-readonly-allow-private-mutation
33+
* @var bool */
34+
private $propagationStopped = false;
3435

3536
/**
3637
* Returns whether further event listeners should be triggered.

components/Markdown/vendor-patched/league/commonmark/src/Event/DocumentParsedEvent.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,9 @@
2020
*/
2121
final class DocumentParsedEvent extends AbstractEvent
2222
{
23-
/** @psalm-readonly */
24-
private Document $document;
23+
/** @psalm-readonly
24+
* @var \League\CommonMark\Node\Block\Document */
25+
private $document;
2526

2627
public function __construct(Document $document)
2728
{

components/Markdown/vendor-patched/league/commonmark/src/Event/DocumentPreParsedEvent.php

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,14 @@
2121
*/
2222
final class DocumentPreParsedEvent extends AbstractEvent
2323
{
24-
/** @psalm-readonly */
25-
private Document $document;
26-
27-
private MarkdownInputInterface $markdown;
24+
/** @psalm-readonly
25+
* @var \League\CommonMark\Node\Block\Document */
26+
private $document;
27+
28+
/**
29+
* @var \League\CommonMark\Input\MarkdownInputInterface
30+
*/
31+
private $markdown;
2832

2933
public function __construct(Document $document, MarkdownInputInterface $markdown)
3034
{

components/Markdown/vendor-patched/league/commonmark/src/Event/DocumentPreRenderEvent.php

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,13 @@
2020
*/
2121
final class DocumentPreRenderEvent extends AbstractEvent
2222
{
23-
/** @psalm-readonly */
24-
private Document $document;
23+
/** @psalm-readonly
24+
* @var \League\CommonMark\Node\Block\Document */
25+
private $document;
2526

26-
/** @psalm-readonly */
27-
private string $format;
27+
/** @psalm-readonly
28+
* @var string */
29+
private $format;
2830

2931
public function __construct(Document $document, string $format)
3032
{

components/Markdown/vendor-patched/league/commonmark/src/Event/DocumentRenderedEvent.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,10 @@
1717

1818
final class DocumentRenderedEvent extends AbstractEvent
1919
{
20-
private RenderedContentInterface $output;
20+
/**
21+
* @var \League\CommonMark\Output\RenderedContentInterface
22+
*/
23+
private $output;
2124

2225
public function __construct(RenderedContentInterface $output)
2326
{

components/Markdown/vendor-patched/league/commonmark/src/Event/ListenerData.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
final class ListenerData
2222
{
2323
/** @var class-string */
24-
private string $event;
24+
private $event;
2525

2626
/** @var callable */
2727
private $listener;

components/Markdown/vendor-patched/league/commonmark/src/Extension/Attributes/Node/Attributes.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,12 @@ final class Attributes extends AbstractBlock
2323
public const TARGET_NEXT = 2;
2424

2525
/** @var array<string, mixed> */
26-
private array $attributes;
26+
private $attributes;
2727

28-
private int $target = self::TARGET_NEXT;
28+
/**
29+
* @var int
30+
*/
31+
private $target = self::TARGET_NEXT;
2932

3033
/**
3134
* @param array<string, mixed> $attributes

components/Markdown/vendor-patched/league/commonmark/src/Extension/Attributes/Node/AttributesInline.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,12 @@
1919
final class AttributesInline extends AbstractInline
2020
{
2121
/** @var array<string, mixed> */
22-
private array $attributes;
22+
private $attributes;
2323

24-
private bool $block;
24+
/**
25+
* @var bool
26+
*/
27+
private $block;
2528

2629
/**
2730
* @param array<string, mixed> $attributes

0 commit comments

Comments
 (0)