This function doesn't return correct result when the $base is an URL, and the $rel is an absolute path.
You can test with this WSDL, which via imports, ends up trying to load XMLDSig schema, defined in this file which is imported by the WSDL:
<import namespace="http://www.w3.org/2000/09/xmldsig#" schemaLocation="http://www.w3.org/TR/xmldsig-core/xmldsig-core-schema.xsd"/>
Debugging \GoetasWebservices\XML\XSDReader\SchemaReader::loadImport, just before calling UrlUtils::resolveRelativeUrl:
# $namespace
"http://www.w3.org/2000/09/xmldsig#"
# $schemaLocation (from XSD)
"http://www.w3.org/TR/xmldsig-core/xmldsig-core-schema.xsd"
# $schemaLocation (resolved to a known local file and overwritten)
"/var/www/html/vendor/goetas-webservices/xsd-reader/src/Resources/xmldsig-core-schema.xsd"
# $base
"https://prewww2.aeat.es/static_files/common/internet/dep/aplicaciones/es/aeat/tikeV1.0/cont/ws/SistemaFacturacion.wsdl"
So it ends up calling
UrlUtils::resolveRelativeUrl('https://prewww2.aeat.es/static_files/common/internet/dep/aplicaciones/es/aeat/tikeV1.0/cont/ws/SistemaFacturacion.wsdl', '/var/www/html/vendor/goetas-webservices/xsd-reader/src/Resources/xmldsig-core-schema.xsd'), which ends in the file https://prewww2.aeat.es/var/www/html/vendor/goetas-webservices/xsd-reader/src/Resources/xmldsig-core-schema.xsd, which is wrong.
IMHO if $rel is an absolute path, it should just be returned as is. Or treat it differently in \GoetasWebservices\XML\XSDReader\SchemaReader::loadImport.
This function doesn't return correct result when the
$baseis an URL, and the$relis an absolute path.You can test with this WSDL, which via imports, ends up trying to load XMLDSig schema, defined in this file which is imported by the WSDL:
Debugging
\GoetasWebservices\XML\XSDReader\SchemaReader::loadImport, just before callingUrlUtils::resolveRelativeUrl:So it ends up calling
UrlUtils::resolveRelativeUrl('https://prewww2.aeat.es/static_files/common/internet/dep/aplicaciones/es/aeat/tikeV1.0/cont/ws/SistemaFacturacion.wsdl', '/var/www/html/vendor/goetas-webservices/xsd-reader/src/Resources/xmldsig-core-schema.xsd'), which ends in the filehttps://prewww2.aeat.es/var/www/html/vendor/goetas-webservices/xsd-reader/src/Resources/xmldsig-core-schema.xsd, which is wrong.IMHO if
$relis an absolute path, it should just be returned as is. Or treat it differently in\GoetasWebservices\XML\XSDReader\SchemaReader::loadImport.