Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

schemaValidate error in Psalm/Config.php:707 #6281

Closed
ar2r opened this issue Aug 11, 2021 · 4 comments
Closed

schemaValidate error in Psalm/Config.php:707 #6281

ar2r opened this issue Aug 11, 2021 · 4 comments

Comments

@ar2r
Copy link

ar2r commented Aug 11, 2021

I`m using latest vimeo/psalm (4.9.2)

When i run psalm without internet i get error:

vendor/bin/psalm --config=psalm.xml

My config:

<?xml version="1.0"?>
<psalm
    errorLevel="4"
    findUnusedVariablesAndParams="true"
    resolveFromConfigFile="true"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns="https://getpsalm.org/schema/config"
    xsi:schemaLocation="https://getpsalm.org/schema/config vendor/vimeo/psalm/config.xsd"
>
    <projectFiles>
        <directory name="src"/>
        <ignoreFiles>
            <directory name="vendor"/>
        </ignoreFiles>
    </projectFiles>
</psalm>
Uncaught RuntimeException: PHP Error: DOMDocument::schemaValidate(http://www.w3.org/2001/03/xml.xsd): failed to open stream: HTTP request failed! in /builds/Gz-QYUcE/1/cde106/self/backend/libs/sms-gate/vendor/vimeo/psalm/src/Psalm/Config.php:707 in /builds/Gz-QYUcE/1/cde106/self/backend/libs/sms-gate/vendor/vimeo/psalm/src/Psalm/Internal/ErrorHandler.php:66
Stack trace:
#0 [internal function]: Psalm\Internal\ErrorHandler::Psalm\Internal\{closure}(2, 'DOMDocument::sc...', '/builds/Gz-QYUc...', 707, Array)
#1 /builds/Gz-QYUcE/1/cde106/self/backend/libs/sms-gate/vendor/vimeo/psalm/src/Psalm/Config.php(707): DOMDocument->schemaValidate('/builds/Gz-QYUc...')
#2 /builds/Gz-QYUcE/1/cde106/self/backend/libs/sms-gate/vendor/vimeo/psalm/src/Psalm/Config.php(652): Psalm\Config::validateXmlConfig('/builds/Gz-QYUc...', '<?xml version="...')
#3 /builds/Gz-QYUcE/1/cde106/self/backend/libs/sms-gate/vendor/vimeo/psalm/src/Psalm/Config.php(625): Psalm\Config::loadFromXML('/builds/Gz-QYUc...', '<?xml version="...', '/builds/Gz-QYUc...', '/builds/Gz-QYUc...')
#4 /builds/Gz-QYUcE/1/cde106/self/backend/libs/sms-gate/vendor/vimeo/psalm/src/Psalm/Internal/CliUtils.php(487): Psalm\Config::loadFromXMLFile('/builds/Gz-QYUc...', '/builds/Gz-QYUc...')
#5 /builds/Gz-QYUcE/1/cde106/self/backend/libs/sms-gate/vendor/vimeo/psalm/src/Psalm/Internal/Cli/Psalm.php(552): Psalm\Internal\CliUtils::initializeConfig('/builds/Gz-QYUc...', '/builds/Gz-QYUc...', 'console', Object(Composer\Autoload\ClassLoader), false)
#6 /builds/Gz-QYUcE/1/cde106/self/backend/libs/sms-gate/vendor/vimeo/psalm/src/Psalm/Internal/Cli/Psalm.php(1007): Psalm\Internal\Cli\Psalm::loadConfig('/builds/Gz-QYUc...', '/builds/Gz-QYUc...', 'console', Object(Composer\Autoload\ClassLoader), false, Array)
#7 /builds/Gz-QYUcE/1/cde106/self/backend/libs/sms-gate/vendor/vimeo/psalm/src/Psalm/Internal/Cli/Psalm.php(216): Psalm\Internal\Cli\Psalm::initConfig('/builds/Gz-QYUc...', Array, 'vendor', Object(Composer\Autoload\ClassLoader), '/builds/Gz-QYUc...', 'console', false, Array)
#8 /builds/Gz-QYUcE/1/cde106/self/backend/libs/sms-gate/vendor/vimeo/psalm/psalm(4): Psalm\Internal\Cli\Psalm::run(Array)
#9 {main}
(Psalm 4.9.2@00c062267d6e3229d91a1939992987e2d46f2393 crashed due to an uncaught Throwable)
@psalm-github-bot
Copy link

Hey @ar2r, can you reproduce the issue on https://psalm.dev ?

@ar2r
Copy link
Author

ar2r commented Aug 11, 2021

To reproduce you need to install vimeo/psalm (4.9.2)
Then turn off the internet!
Run: vendor/bin/psalm --config=psalm.xml

And then you will get the same error:

Uncaught RuntimeException: PHP Error: DOMDocument::schemaValidate(): php_network_getaddresses: getaddrinfo failed: nodename nor servname provided, or not known in /Users/artur/PhpstormProjects/libs/sms-gate_/vendor/vimeo/psalm/src/Psalm/Config.php:707 in /Users/artur/PhpstormProjects/libs/sms-gate_/vendor/vimeo/psalm/src/Psalm/Internal/ErrorHandler.php:66
Stack trace:
#0 [internal function]: Psalm\Internal\ErrorHandler::Psalm\Internal\{closure}(2, 'DOMDocument::sc...', '/Users/artur/Ph...', 707, Array)
#1 /Users/artur/PhpstormProjects/libs/sms-gate_/vendor/vimeo/psalm/src/Psalm/Config.php(707): DOMDocument->schemaValidate('/Users/artur/Ph...')
#2 /Users/artur/PhpstormProjects/libs/sms-gate_/vendor/vimeo/psalm/src/Psalm/Config.php(652): Psalm\Config::validateXmlConfig('/Users/artur/Ph...', '<?xml version="...')
#3 /Users/artur/PhpstormProjects/libs/sms-gate_/vendor/vimeo/psalm/src/Psalm/Config.php(625): Psalm\Config::loadFromXML('/Users/artur/Ph...', '<?xml version="...', '/Users/artur/Ph...', '/Users/artur/Ph...')
#4 /Users/artur/PhpstormProjects/libs/sms-gate_vendor/vimeo/psalm/src/Psalm/Internal/CliUtils.php(487): Psalm\Config::loadFromXMLFile('/Users/artur/Ph...', '/Users/artur/Ph...')
#5 /Users/artur/PhpstormProjects/libs/sms-gate_vendor/vimeo/psalm/src/Psalm/Internal/Cli/Psalm.php(552): Psalm\Internal\CliUtils::initializeConfig('/Users/artur/Ph...', '/Users/artur/Ph...', 'console', Object(Composer\Autoload\ClassLoader), false)
#6 /Users/artur/PhpstormProjects/libs/sms-gate_/vendor/vimeo/psalm/src/Psalm/Internal/Cli/Psalm.php(1007): Psalm\Internal\Cli\Psalm::loadConfig('/Users/artur/Ph...', '/Users/artur/Ph...', 'console', Object(Composer\Autoload\ClassLoader), false, Array)
#7 /Users/artur/PhpstormProjects/libs/sms-gate_/vendor/vimeo/psalm/src/Psalm/Internal/Cli/Psalm.php(216): Psalm\Internal\Cli\Psalm::initConfig('/Users/artur/Ph...', Array, 'vendor', Object(Composer\Autoload\ClassLoader), '/Users/artur/Ph...', 'console', false, Array)
#8 /Users/artur/PhpstormProjects/libs/sms-gate_/vendor/vimeo/psalm/psalm(4): Psalm\Internal\Cli\Psalm::run(Array)
#9 {main}
(Psalm 4.9.2@00c062267d6e3229d91a1939992987e2d46f2393 crashed due to an uncaught Throwable)

@orklah
Copy link
Collaborator

orklah commented Aug 11, 2021

Hi! This was fixed here but not yet released

@weirdan
Copy link
Collaborator

weirdan commented Aug 11, 2021

Duplicate of #6228

@weirdan weirdan marked this as a duplicate of #6228 Aug 11, 2021
@weirdan weirdan closed this as completed Aug 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants