Skip to content

Commit 16e955f

Browse files
committed
fix: missing data-* and alpine x-*:* attribute handling in twig and twig components added
1 parent 4e8063c commit 16e955f

588 files changed

Lines changed: 21828 additions & 14137 deletions

File tree

Some content is hidden

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

clover.xml

Lines changed: 2139 additions & 1840 deletions
Large diffs are not rendered by default.

docs/phpmd.md

Lines changed: 849 additions & 1504 deletions
Large diffs are not rendered by default.

ecs.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,4 @@
1616
'vendor/symplify/easy-coding-standard/config/set/psr12.php',
1717
'vendor/symplify/easy-coding-standard/config/set/symplify.php',
1818
])
19-
->withParallel(1);
19+
->withParallel(120);

src/Element/Block/Article.php

Lines changed: 40 additions & 70 deletions
Original file line numberDiff line numberDiff line change
@@ -1,49 +1,17 @@
11
<?php
2+
23
/**
34
* This file is auto-generated. Do not edit manually.
45
*
56
* @generated 2025-12-31 00:30:17
6-
* @category HTML
7-
* @package vardumper/extended-htmldocument
87
* @subpackage Html\Element\Block
98
* @link https://vardumper.github.io/extended-htmldocument/
109
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/article
1110
*/
11+
1212
namespace Html\Element\Block;
1313

1414
use Html\Element\BlockElement;
15-
use Html\Element\Block\{
16-
Aside,
17-
Audio,
18-
Blockquote,
19-
Body,
20-
DefinitionList,
21-
DeletedText,
22-
Division,
23-
Embed,
24-
Figure,
25-
Form,
26-
Heading1,
27-
Heading2,
28-
Heading3,
29-
Heading4,
30-
Heading5,
31-
Heading6,
32-
InlineFrame,
33-
InsertedText,
34-
Main,
35-
Map,
36-
Navigation,
37-
ObjectElement,
38-
OrderedList,
39-
Paragraph,
40-
Picture,
41-
PreformattedText,
42-
Section,
43-
Table,
44-
UnorderedList,
45-
Video,
46-
};
4715
use Html\Element\Inline\{
4816
Abbreviation,
4917
Anchor,
@@ -84,8 +52,9 @@
8452
AriaRelevantEnum,
8553
RoleEnum,
8654
};
87-
use Html\Trait\GlobalAttribute;
8855
use Html\Mapping\Element;
56+
use Html\Trait\GlobalAttribute;
57+
use InvalidArgumentException;
8958

9059
/**
9160
* The article element represents a self-contained composition in a document, page, application, or site, which is intended to be independently distributable or reusable.
@@ -113,6 +82,7 @@ class Article extends BlockElement
11382
use GlobalAttribute\TitleTrait;
11483
use GlobalAttribute\TranslateTrait;
11584
use GlobalAttribute\AlpineJsTrait;
85+
11686
/**
11787
* The HTML element name
11888
*/
@@ -138,7 +108,7 @@ class Article extends BlockElement
138108
* @var array<string>
139109
*/
140110
public static array $childOf = [
141-
Article::class,
111+
self::class,
142112
Aside::class,
143113
Blockquote::class,
144114
Body::class,
@@ -157,7 +127,7 @@ class Article extends BlockElement
157127
Anchor::class,
158128
Abbreviation::class,
159129
Area::class,
160-
Article::class,
130+
self::class,
161131
Audio::class,
162132
Bold::class,
163133
BidirectionalIsolation::class,
@@ -210,80 +180,74 @@ class Article extends BlockElement
210180
WordBreakOpportunity::class,
211181
];
212182

213-
214-
/**
183+
/**
215184
* Defines the semantic purpose of an element for assistive technologies.
216-
* @category HTML attribute */
185+
*/
217186
protected ?RoleEnum $role = null;
218187

219-
/**
188+
/**
220189
* Identifies the element(s) whose contents or presence are controlled by this element. Value is a list of IDs separated by a space
221-
* @category HTML attribute */
190+
*/
222191
protected ?string $ariaControls = null;
223192

224-
/**
193+
/**
225194
* Identifies the element(s) that describes the object. Value is a list of IDs separated by a space
226-
* @category HTML attribute */
195+
*/
227196
protected ?string $ariaDescribedby = null;
228197

229-
/**
198+
/**
230199
* Identifies the element(s) that labels the current element. Value is a list of IDs separated by a space
231-
* @category HTML attribute */
200+
*/
232201
protected ?string $ariaLabelledby = null;
233202

234-
/**
203+
/**
235204
* The aria-busy attribute is used to indicate whether an element is currently busy or not.
236-
* @category HTML attribute
237205
* @example false
238206
*/
239207
protected ?AriaBusyEnum $ariaBusy = null;
240208

241-
/**
209+
/**
242210
* References an element that provides additional details about the current element.
243-
* @category HTML attribute */
211+
*/
244212
protected ?string $ariaDetails = null;
245213

246-
/**
214+
/**
247215
* Defines keyboard shortcuts available for the element.
248-
* @category HTML attribute */
216+
*/
249217
protected ?string $ariaKeyshortcuts = null;
250218

251-
/**
219+
/**
252220
* Provides a human-readable custom role description for assistive technologies.
253-
* @category HTML attribute */
221+
*/
254222
protected ?string $ariaRoledescription = null;
255223

256-
/**
224+
/**
257225
* Defines how updates to the element should be announced to screen readers.
258-
* @category HTML attribute
259226
* @example off
260227
*/
261228
protected ?AriaLiveEnum $ariaLive = null;
262229

263-
/**
230+
/**
264231
* Indicates what content changes should be announced in a live region.
265-
* @category HTML attribute
266232
* @example additions text
267233
*/
268234
protected ?AriaRelevantEnum $ariaRelevant = null;
269235

270-
/**
236+
/**
271237
* Indicates whether assistive technologies should present the entire region as a whole when changes occur.
272-
* @category HTML attribute
273238
* @example false
274239
*/
275240
protected ?AriaAtomicEnum $ariaAtomic = null;
276241

277-
/**
242+
/**
278243
* Establishes ownership relationships between elements. Value is a space-separated list of IDs.
279-
* @category HTML attribute */
244+
*/
280245
protected ?string $ariaOwns = null;
281246

282-
283247
public function setRole(string|RoleEnum $role): static
284248
{
285249
if (\is_string($role)) {
286-
$role = RoleEnum::tryFrom($role) ?? throw new \InvalidArgumentException("Invalid value for \$role.");
250+
$role = RoleEnum::tryFrom($role) ?? throw new InvalidArgumentException('Invalid value for $role.');
287251
}
288252
$this->role = $role;
289253
$this->delegated->setAttribute('role', (string) $role->value);
@@ -335,7 +299,9 @@ public function getAriaLabelledby(): ?string
335299
public function setAriaBusy(string|AriaBusyEnum $ariaBusy): static
336300
{
337301
if (\is_string($ariaBusy)) {
338-
$ariaBusy = AriaBusyEnum::tryFrom($ariaBusy) ?? throw new \InvalidArgumentException("Invalid value for \$ariaBusy.");
302+
$ariaBusy = AriaBusyEnum::tryFrom($ariaBusy) ?? throw new InvalidArgumentException(
303+
'Invalid value for $ariaBusy.'
304+
);
339305
}
340306
$this->ariaBusy = $ariaBusy;
341307
$this->delegated->setAttribute('aria-busy', (string) $ariaBusy->value);
@@ -387,7 +353,9 @@ public function getAriaRoledescription(): ?string
387353
public function setAriaLive(string|AriaLiveEnum $ariaLive): static
388354
{
389355
if (\is_string($ariaLive)) {
390-
$ariaLive = AriaLiveEnum::tryFrom($ariaLive) ?? throw new \InvalidArgumentException("Invalid value for \$ariaLive.");
356+
$ariaLive = AriaLiveEnum::tryFrom($ariaLive) ?? throw new InvalidArgumentException(
357+
'Invalid value for $ariaLive.'
358+
);
391359
}
392360
$this->ariaLive = $ariaLive;
393361
$this->delegated->setAttribute('aria-live', (string) $ariaLive->value);
@@ -403,7 +371,9 @@ public function getAriaLive(): ?AriaLiveEnum
403371
public function setAriaRelevant(string|AriaRelevantEnum $ariaRelevant): static
404372
{
405373
if (\is_string($ariaRelevant)) {
406-
$ariaRelevant = AriaRelevantEnum::tryFrom($ariaRelevant) ?? throw new \InvalidArgumentException("Invalid value for \$ariaRelevant.");
374+
$ariaRelevant = AriaRelevantEnum::tryFrom($ariaRelevant) ?? throw new InvalidArgumentException(
375+
'Invalid value for $ariaRelevant.'
376+
);
407377
}
408378
$this->ariaRelevant = $ariaRelevant;
409379
$this->delegated->setAttribute('aria-relevant', (string) $ariaRelevant->value);
@@ -419,7 +389,9 @@ public function getAriaRelevant(): ?AriaRelevantEnum
419389
public function setAriaAtomic(string|AriaAtomicEnum $ariaAtomic): static
420390
{
421391
if (\is_string($ariaAtomic)) {
422-
$ariaAtomic = AriaAtomicEnum::tryFrom($ariaAtomic) ?? throw new \InvalidArgumentException("Invalid value for \$ariaAtomic.");
392+
$ariaAtomic = AriaAtomicEnum::tryFrom($ariaAtomic) ?? throw new InvalidArgumentException(
393+
'Invalid value for $ariaAtomic.'
394+
);
423395
}
424396
$this->ariaAtomic = $ariaAtomic;
425397
$this->delegated->setAttribute('aria-atomic', (string) $ariaAtomic->value);
@@ -443,6 +415,4 @@ public function getAriaOwns(): ?string
443415
{
444416
return $this->ariaOwns;
445417
}
446-
447-
448418
}

0 commit comments

Comments
 (0)