-
Notifications
You must be signed in to change notification settings - Fork 672
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
Could not get class storage for opensslcertificate #7100
Comments
I found these snippets: https://psalm.dev/r/f8a923cc47<?php
$result = openssl_x509_verify('a', 'b');
|
It's interesting that we still have this issue even when Psalm is targeting 7.1: https://psalm.dev/r/f8a923cc47?php=7.1 |
I found these snippets: https://psalm.dev/r/f8a923cc47<?php
$result = openssl_x509_verify('a', 'b');
|
I believe it is entirely dependent on the actual PHP version that is being used to run it, and not the language level at all. If i run the above test script through psalm, while using PHP 7.4 i do not get the internal error. Perhaps it is related to the introduction of the OpenSSLCertificate class introduced in PHP 8.0 ? I noticed that another function, that also takes the OpenSSLCertificate class as argument does not cause an internal error. Which led my to try this out: https://psalm.dev/r/7b64ca57f3 It seems, as long as there is a prior call that loads in the OpenSSLCertificate class, everything is happy. Lastly the Adding the following line to that file, seems to remove the crash.
But i honestly have limited idea whether that is the right thing to do ? Not sure if any of this is of any help, |
I found these snippets: https://psalm.dev/r/7b64ca57f3<?php
$a = openssl_x509_read('a');
$b = openssl_x509_verify('a', 'b');
https://psalm.dev/r/4f4e4b8e61<?php
new OpenSSLCertificate();
$b = openssl_x509_verify('a', 'b');
|
This should be fixed in latest release. Sorry it took so long, this was a pretty simple change that you even suggested... I just missed it completely |
Ran into this issue, when changing from running psalm on PHP 7.4 to PHP 8.0
After a lot of trial and error, i was able to create a simple reproducer that shows on the psalm.dev interface aswell.
https://psalm.dev/r/f8a923cc47
The text was updated successfully, but these errors were encountered: