From bdf6270d8c3597a91fa5cbf722ca70303c159c3d Mon Sep 17 00:00:00 2001 From: David Ward Date: Tue, 29 Jul 2025 10:08:05 -0700 Subject: [PATCH] [ux-icons] Fix value of xmlns attribute for imported svg icons --- src/Icons/src/Iconify.php | 2 +- src/Icons/tests/Integration/RenderIconsInTwigTest.php | 6 +++--- src/Icons/tests/Unit/IconifyTest.php | 4 ++-- ...h data set Kit shadcn, component Alert, code 1__1.html | 2 +- ...h data set Kit shadcn, component Alert, code 2__1.html | 2 +- ...h data set Kit shadcn, component Alert, code 3__1.html | 2 +- ...h data set Kit shadcn, component Badge, code 6__1.html | 2 +- ...a set Kit shadcn, component Breadcrumb, code 1__1.html | 6 +++--- ...a set Kit shadcn, component Breadcrumb, code 2__1.html | 6 +++--- ...a set Kit shadcn, component Breadcrumb, code 3__1.html | 6 +++--- ...data set Kit shadcn, component Button, code 10__1.html | 2 +- ...data set Kit shadcn, component Button, code 11__1.html | 2 +- ... data set Kit shadcn, component Button, code 9__1.html | 2 +- ...th data set Kit shadcn, component Card, code 3__1.html | 2 +- ...a set Kit shadcn, component Pagination, code 1__1.html | 6 +++--- ...a set Kit shadcn, component Pagination, code 2__1.html | 6 +++--- ...a set Kit shadcn, component Pagination, code 3__1.html | 8 ++++---- 17 files changed, 33 insertions(+), 33 deletions(-) diff --git a/src/Icons/src/Iconify.php b/src/Icons/src/Iconify.php index 7f7db1ea552..dbc0cb3d236 100644 --- a/src/Icons/src/Iconify.php +++ b/src/Icons/src/Iconify.php @@ -27,7 +27,7 @@ final class Iconify { public const API_ENDPOINT = 'https://api.iconify.design'; - private const ATTR_XMLNS_URL = 'https://www.w3.org/2000/svg'; + private const ATTR_XMLNS_URL = 'http://www.w3.org/2000/svg'; // URL must be 500 chars max (iconify limit) // -39 chars: https://api.iconify.design/XXX.json?icons= diff --git a/src/Icons/tests/Integration/RenderIconsInTwigTest.php b/src/Icons/tests/Integration/RenderIconsInTwigTest.php index c8555c3d647..ad189bb9fbe 100644 --- a/src/Icons/tests/Integration/RenderIconsInTwigTest.php +++ b/src/Icons/tests/Integration/RenderIconsInTwigTest.php @@ -33,8 +33,8 @@ public function testRenderIcons()
  • -
  • -
  • +
  • +
  • HTML, trim($output) @@ -49,7 +49,7 @@ public function testRenderAliasIcons() $templateAlias = ''; $outputAlias = self::getContainer()->get(Environment::class)->createTemplate($templateAlias)->render(); - $expected = ''; + $expected = ''; $this->assertSame($outputIcon, $expected); $this->assertSame($outputIcon, $outputAlias); } diff --git a/src/Icons/tests/Unit/IconifyTest.php b/src/Icons/tests/Unit/IconifyTest.php index 9b728e50769..83b31ae8752 100644 --- a/src/Icons/tests/Unit/IconifyTest.php +++ b/src/Icons/tests/Unit/IconifyTest.php @@ -47,7 +47,7 @@ public function testFetchIcon() $icon = $iconify->fetchIcon('bi', 'heart'); $this->assertEquals($icon->getInnerSvg(), ''); - $this->assertEquals($icon->getAttributes(), ['viewBox' => '0 0 24 24', 'xmlns' => 'https://www.w3.org/2000/svg']); + $this->assertEquals($icon->getAttributes(), ['viewBox' => '0 0 24 24', 'xmlns' => 'http://www.w3.org/2000/svg']); } public function testFetchIconByAlias() @@ -78,7 +78,7 @@ public function testFetchIconByAlias() $icon = $iconify->fetchIcon('bi', 'foo'); $this->assertEquals($icon->getInnerSvg(), ''); - $this->assertEquals($icon->getAttributes(), ['viewBox' => '0 0 24 24', 'xmlns' => 'https://www.w3.org/2000/svg']); + $this->assertEquals($icon->getAttributes(), ['viewBox' => '0 0 24 24', 'xmlns' => 'http://www.w3.org/2000/svg']); } public function testFetchIconThrowsWhenIconSetDoesNotExists() diff --git a/src/Toolkit/tests/Functional/__snapshots__/ComponentsRenderingTest__testComponentRendering with data set Kit shadcn, component Alert, code 1__1.html b/src/Toolkit/tests/Functional/__snapshots__/ComponentsRenderingTest__testComponentRendering with data set Kit shadcn, component Alert, code 1__1.html index c3586e297f7..2ea8f8f9a3d 100644 --- a/src/Toolkit/tests/Functional/__snapshots__/ComponentsRenderingTest__testComponentRendering with data set Kit shadcn, component Alert, code 1__1.html +++ b/src/Toolkit/tests/Functional/__snapshots__/ComponentsRenderingTest__testComponentRendering with data set Kit shadcn, component Alert, code 1__1.html @@ -13,7 +13,7 @@ ``` - Rendered code (prettified for testing purposes, run "php vendor/bin/phpunit -d --update-snapshots" to update snapshots): -->