From aaea82757bb738a39ca21542a4415211bd099e0d Mon Sep 17 00:00:00 2001 From: Sebastian Bergmann Date: Sat, 5 Oct 2024 10:37:18 +0200 Subject: [PATCH] Improve name (and work around https://github.com/theseer/Autoload/issues/115) --- .../Xml/Migration/Migrations/UpdateSchemaLocation.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/TextUI/Configuration/Xml/Migration/Migrations/UpdateSchemaLocation.php b/src/TextUI/Configuration/Xml/Migration/Migrations/UpdateSchemaLocation.php index f095fa0a00..4e73344a89 100644 --- a/src/TextUI/Configuration/Xml/Migration/Migrations/UpdateSchemaLocation.php +++ b/src/TextUI/Configuration/Xml/Migration/Migrations/UpdateSchemaLocation.php @@ -22,7 +22,7 @@ */ final readonly class UpdateSchemaLocation implements Migration { - private const NAMESPACE = 'http://www.w3.org/2001/XMLSchema-instance'; + private const NAMESPACE_URI = 'http://www.w3.org/2001/XMLSchema-instance'; private const LOCAL_NAME_SCHEMA_LOCATION = 'noNamespaceSchemaLocation'; public function migrate(DOMDocument $document): void @@ -31,14 +31,14 @@ public function migrate(DOMDocument $document): void assert($root instanceof DOMElement); - $existingSchemaLocation = $root->getAttributeNodeNS(self::NAMESPACE, self::LOCAL_NAME_SCHEMA_LOCATION)->value; + $existingSchemaLocation = $root->getAttributeNodeNS(self::NAMESPACE_URI, self::LOCAL_NAME_SCHEMA_LOCATION)->value; if (str_contains($existingSchemaLocation, '://') === false) { // If the current schema location is a relative path, don't update it return; } $root->setAttributeNS( - self::NAMESPACE, + self::NAMESPACE_URI, 'xsi:' . self::LOCAL_NAME_SCHEMA_LOCATION, 'https://schema.phpunit.de/' . Version::series() . '/phpunit.xsd', );