Error message:
PHP Fatal error: Uncaught Psalm\Exception\ConfigException: Error
parsing file /home/runner/work/php-curl-class/php-curl-class/ on
line 8: Element '{https://getpsalm.org/schema/config}psalm': No
matching global declaration available for the validation root.
Messages:
ERROR: UndefinedClass - src/Curl/Curl.php:217:64 - Class, interface or enum named CurlHandle does not exist (see https://psalm.dev/019)
if (is_resource($this->curl) || $this->curl instanceof \CurlHandle) {
ERROR: UndefinedClass - src/Curl/Curl.php:1570:64 - Class, interface or enum named CurlHandle does not exist (see https://psalm.dev/019)
if (is_resource($this->curl) || $this->curl instanceof \CurlHandle) {
ERROR: UndefinedClass - src/Curl/MultiCurl.php:396:74 - Class, interface or enum named CurlMultiHandle does not exist (see https://psalm.dev/019)
if (is_resource($this->multiCurl) || $this->multiCurl instanceof \CurlMultiHandle) {
This change allows continuous integration test failures on future PHP
releases without triggering some of the user interface warnings:
- Red x mark instead of a green checkmark
- Pull request merge warning:
"Some checks were not successful
7 successful and 1 failing checks"
The void return type was implemented in PHP 7.1 and PHP 7.0 treats the
void return type as a class name.
Errors:
1) CurlTest\CurlTest::testExtensionsLoaded
TypeError: Return value of CurlTest\CurlTest::setUp() must be an instance of CurlTest\void, none returned
/home/runner/work/php-curl-class/php-curl-class/tests/PHPCurlClass/PHPCurlClassTest.php:18
2) CurlTest\CurlTest::testCaseInsensitiveArrayGet
TypeError: Return value of CurlTest\CurlTest::setUp() must be an instance of CurlTest\void, none returned
/home/runner/work/php-curl-class/php-curl-class/tests/PHPCurlClass/PHPCurlClassTest.php:18
3) CurlTest\CurlTest::testCaseInsensitiveArraySet
TypeError: Return value of CurlTest\CurlTest::setUp() must be an instance of CurlTest\void, none returned
/home/runner/work/php-curl-class/php-curl-class/tests/PHPCurlClass/PHPCurlClassTest.php:18
[...]
Enable the PHP_CURL_CLASS_SKIP_SLOW_TESTS flag to skip the slow tests:
$ time ./tests/run.sh
real 16m24.624s ←
user 0m1.682s
sys 0m1.645s
$ time PHP_CURL_CLASS_SKIP_SLOW_TESTS=1 ./tests/run.sh
real 0m47.441s ←
user 0m20.005s
sys 0m10.802s
Warning message:
Method name "Curl::__get_[...]" is discouraged; PHP has reserved all
method names with a double underscore prefix for future use.
(PHPCompatibility.FunctionNameRestrictions.ReservedFunctionNames.MethodDoubleUnderscore)